linkspace/commons/mod.rs
1// Copyright Anton Sol
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
7use linkspace_core::point::{GroupID, PubKey};
8
9/// convention on for read/writing enckey in linkspace
10#[cfg(any(feature = "lmdb", feature = "inmem"))]
11pub mod identity;
12/// encode/decode a blob or stream of bytes
13pub mod stream;
14
15/// format for matching on multiple (domain*,group*,pubkey*)
16pub mod fset;
17// /// convention on group membership.
18// pub mod group_up;
19/// basic 3-way handshake to prove signing capability
20pub mod handshake;
21/// augment a stream with proof of work points
22pub mod pow;
23/// read/write queries into groups to signal interests
24pub mod pull;
25/// private group status message bus
26#[cfg(any(feature = "lmdb", feature = "inmem"))]
27pub mod status;
28
29/// fast best-effort duplication of a stream of points by hash
30pub mod dedup;
31pub mod file;
32pub mod prune_replacable;
33pub mod reply;
34pub mod username;
35
36pub fn lkc_our_group(p1: PubKey, p2: PubKey) -> GroupID {
37 p1 ^ p2
38}