1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//! # DE-MLS: Decentralized MLS Chat Protocol
//!
//! A library for building decentralized, end-to-end encrypted chat applications
//! using the MLS (Messaging Layer Security) protocol with consensus-based membership management.
//!
//! ## Modules
//!
//! - **[`conversation`]** - The [`Conversation`] handle plus its
//! per-conversation state, state machine, and inbound dispatch
//! - **[`consensus`]** - Consensus plug-in contract, outcome application, and voting
//! - **[`peer_scoring`]** / **[`steward_list`]** / **[`freeze`]** - Protocol plug-ins
//! - **[`mls_crypto`]** - MLS cryptographic operations (OpenMLS wrapper)
//! - **[`protos`]** - Protobuf message definitions
//!
//! The library carries no transport. The reference delivery service (the
//! `DeliveryService` trait + Waku implementation) lives in the `de-mls-ds`
//! crate, and the reference integrator (`User`) in `de-mls-gateway`.
//!
//! ## Getting Started
//!
//! The library exposes the per-conversation [`Conversation`]
//! handle. It carries no transport: it buffers outbound and consumes inbound
//! payloads, and the integrator owns routing. A ready-to-use reference
//! integrator (the multi-conversation `User` with registry + routing +
//! lifecycle over a transport) lives in the `de-mls-gateway` crate.
//!
//! Integrators drain [`ConversationEvent`] from each conversation (for
//! transport and UI delivery), feed inbound packets to the conversation, and
//! dispatch the returned outcomes.
//!
//! ## Quick Example
//!
//! ```ignore
//! use de_mls::Conversation;
//!
//! // Build a conversation from direct arguments: the OpenMLS provider,
//! // credential + ciphersuite, the plug-in instances, and a consensus service.
//! let mut conversation = Conversation::create(
//! "de-mls-test", provider, credential, ciphersuite, &signer,
//! scoring, steward, consensus, app_id, config, member_id,
//! )?;
//!
//! // Send a chat message — buffered, never auto-sent.
//! conversation.send_message(b"Hello, world!".to_vec(), &signer)?;
//!
//! // Drain outbound and publish it on your own transport.
//! for out in conversation.drain_outbound() { /* publish */ }
//! ```
/// The [`Conversation`](conversation) handle, per-conversation
/// state, state machine, and inbound dispatch.
/// Consensus plug-in contract, outcome application, and voting.
/// Peer-scoring plug-in: vocabulary, traits, and reference service.
/// Steward-list plug-in: deterministic roster and rotation queries.
/// Freeze round candidate processing, selection, and commit application.
/// Conversation-event types produced for the integrator.
/// [`ProcessResult`](process_result::ProcessResult) returned by inbound processing.
/// Proposal classification.
/// Wall-clock anchor combined with the conversation state machine.
/// Library error types.
// Crate-root re-exports so flat-name imports resolve without the owning
// module path.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
// `consensus` and `phase_timer` are re-exported explicitly below to avoid glob
// collisions with the conversation glob.
pub use ;
pub use PhaseTimer;
/// MLS cryptographic operations: OpenMLS wrapper for encryption/decryption.
/// Reference implementations of the library's plug-in traits — in-memory
/// MLS / peer-score storage, default consensus + per-conversation
/// plug-in bundles, and a reference key-package provider. Production
/// integrators swap one or more for their own implementations.
pub