Skip to main content

deaddrop_core/
lib.rs

1//! DeadDrop core: protocol, crypto, identities, objects, storage.
2//! This crate MUST NOT depend on networking or applications.
3
4mod caps;
5mod destination;
6mod envelope;
7mod error;
8mod hexutil;
9mod ids;
10mod lifecycle;
11mod limits;
12mod mode;
13mod priority;
14mod trust;
15
16pub mod carrier;
17pub mod channel;
18pub mod chunk;
19pub mod config;
20pub mod crypto;
21pub mod event;
22pub mod identity;
23pub mod protocol;
24pub mod receipt;
25pub mod rules;
26pub mod sealed;
27pub mod space;
28pub mod store;
29
30pub use caps::*;
31pub use destination::*;
32pub use envelope::*;
33pub use error::*;
34pub use hexutil::*;
35pub use ids::*;
36pub use lifecycle::*;
37pub use limits::*;
38pub use mode::*;
39pub use priority::*;
40pub use sealed::{SEAL_QUORUM_EXT, SEAL_UNTIL_EXT};
41pub use trust::*;
42
43/// Wire protocol major version. Independent of the Cargo package version.
44pub const PROTOCOL_VERSION: u16 = 2;
45pub const PROTOCOL_LABEL: &str = "DDP/2";
46pub const STORAGE_SCHEMA_VERSION: u32 = 3;
47pub const APP_NAMESPACES: &[&str] = &[
48    "dd.chat",
49    "dd.file",
50    "dd.git",
51    "dd.package",
52    "dd.web",
53    "dd.sensor",
54    "dd.receipt",
55    "dd.identity-transition",
56    "dd.message",
57    "dd.board",
58    "dd.space",
59    "dd.channel",
60    "dd.web-capsule",
61    "dd.revocation",
62];
63
64pub type Result<T> = std::result::Result<T, DdError>;