1#![cfg_attr(not(test), warn(clippy::unwrap_used))]
16#![cfg_attr(not(test), warn(clippy::expect_used))]
17#![cfg_attr(not(test), warn(clippy::panic))]
18#![allow(clippy::unused_async)]
20
21#![allow(missing_docs)]
54#![allow(missing_debug_implementations)]
55#![warn(rust_2018_idioms)]
56
57pub mod address;
59
60pub mod network;
62
63pub mod dht;
65
66pub mod dht_network_manager;
68
69pub mod transport;
71
72pub mod mcp;
74
75pub mod security;
77
78pub mod identity;
80
81pub mod storage;
83
84pub mod chat;
86
87pub mod messaging;
89
90pub mod discuss;
92
93pub mod projects;
95
96pub mod threshold;
98
99pub mod quantum_crypto;
101
102pub mod utils;
104
105pub mod validation;
107
108pub mod production;
110
111pub mod bootstrap;
113
114pub mod error;
116
117pub mod peer_record;
119
120pub mod crypto_verify;
122
123pub mod monotonic_counter;
125
126pub mod secure_memory;
128
129pub mod key_derivation;
131
132pub mod encrypted_key_storage;
134
135pub mod persistent_state;
137
138pub mod identity_manager;
140
141pub mod adaptive;
143
144pub mod config;
146
147pub mod health;
149
150pub mod geographic_enhanced_network;
152
153pub mod placement;
155
156pub use address::{AddressBook, NetworkAddress};
158pub use bootstrap::{BootstrapCache, BootstrapManager, CacheConfig, ContactEntry};
159pub use crypto_verify::{
160 BatchVerificationRequest, BatchVerificationResult, EnhancedSignatureVerification,
161 EnhancedSignatureVerifier, VerificationStats,
162};
163pub use dht::{Key, Record};
164pub use dht_network_manager::{
165 BootstrapNode, DhtNetworkConfig, DhtNetworkEvent, DhtNetworkManager, DhtNetworkOperation,
166 DhtNetworkResult, DhtPeerInfo,
167};
168pub use encrypted_key_storage::{
169 Argon2Config, DerivationPriority as KeyDerivationPriority, EncryptedKeyStorageManager,
170 KeyMetadata, PasswordValidation, SecurityLevel, StorageStats,
171};
172pub use error::{P2PError, P2pResult as Result};
173pub use health::{
174 ComponentChecker, ComponentHealth, HealthEndpoints, HealthManager, HealthResponse,
175 HealthServer, HealthStatus, PrometheusExporter,
176};
177pub use identity_manager::{
178 Identity, IdentityCreationParams, IdentityKeyPair, IdentityManager, IdentityState,
179 IdentityStats, IdentitySyncPackage, IdentityUpdate, IdentityVerification,
180 RevocationCertificate, RevocationReason,
181};
182pub use key_derivation::{
183 BatchDerivationRequest, BatchDerivationResult, DerivationPath, DerivationPriority,
184 DerivationStats, DerivedKey, HierarchicalKeyDerivation, MasterSeed,
185};
186pub use mcp::{MCPServer, MCPService, Tool};
187pub use monotonic_counter::{
188 BatchUpdateRequest, BatchUpdateResult, CounterStats, MonotonicCounterSystem, PeerCounter,
189 SequenceValidationResult,
190};
191pub use network::{NodeBuilder, NodeConfig, P2PEvent, P2PNode};
192pub use peer_record::{EndpointId, NatType, PeerDHTRecord, PeerEndpoint, SignatureCache, UserId};
193pub use persistent_state::{
194 FlushStrategy, IntegrityReport, PersistentStateManager, RecoveryMode, RecoveryStats,
195 StateChangeEvent, StateConfig, TransactionType, WalEntry,
196};
197pub use production::{ProductionConfig, ResourceManager, ResourceMetrics};
198pub use secure_memory::{
199 PoolStats, SecureMemory, SecureMemoryPool, SecureString, SecureVec, allocate_secure,
200 secure_string_with_capacity, secure_vec_with_capacity,
201};
202pub use validation::{
203 RateLimitConfig, RateLimiter, Sanitize, Validate, ValidationContext, ValidationError,
204 sanitize_string, validate_dht_key, validate_dht_value, validate_file_path,
205 validate_message_size, validate_network_address, validate_peer_id,
206};
207
208pub use identity::enhanced::{
210 Department, EnhancedIdentity, EnhancedIdentityManager, Organization, Permission, Team,
211};
212
213pub use storage::{FileChunker, StorageManager}; pub use chat::{Call, Channel, ChannelId, ChannelType, ChatManager, Message, MessageId, Thread};
218
219pub use discuss::{
221 Badge, Category, CategoryId, DiscussManager, Poll, Reply, ReplyId, Topic, TopicId, UserStats,
222};
223
224pub use projects::{
226 Document, DocumentId, Folder, Project, ProjectAnalytics, ProjectId, ProjectsManager,
227 WorkflowState,
228};
229
230pub use threshold::{
232 GroupMetadata, ParticipantInfo, ThresholdGroup, ThresholdGroupManager, ThresholdSignature,
233};
234
235pub use quantum_crypto::{
237 CryptoCapabilities,
238 KemAlgorithm,
239 NegotiatedAlgorithms,
240 ProtocolVersion,
241 QuantumCryptoError,
243 SignatureAlgorithm,
244 negotiate_algorithms,
246};
247
248pub use quantum_crypto::{
250 ChaCha20Poly1305Cipher,
252 EncryptedMessage,
254 HybridKem,
256 HybridKemCiphertext,
257 HybridKemPublicKey,
258 HybridKemSecretKey,
259 HybridPublicKeyEncryption,
260
261 HybridSignature,
262 HybridSignaturePublicKey,
263 HybridSignatureSecretKey,
264 HybridSignatureValue,
265
266 MlDsa65,
267
268 MlDsaOperations,
269
270 MlDsaPublicKey,
271 MlDsaSecretKey,
272 MlDsaSignature,
273 MlKem768,
275 MlKemCiphertext,
276 MlKemOperations,
278 MlKemPublicKey,
280 MlKemSecretKey,
281 PqcError,
283 SaorsaPqcResult,
284
285 SharedSecret,
286 SymmetricEncryptedMessage,
287
288 SymmetricError,
289 SymmetricKey,
290
291 saorsa_pqc_init,
293};
294
295pub use quantum_crypto::ant_quic_integration::{
297 create_default_pqc_config,
299 create_pqc_only_config,
300};
301
302pub use quantum_crypto::types::{
304 Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, FrostCommitment,
310 FrostGroupPublicKey,
311 FrostKeyShare,
312 FrostPublicKey,
314 FrostSignature,
315 GroupId,
317 HandshakeParameters,
318
319 ParticipantId,
320 PeerId as QuantumPeerId,
321 QuantumPeerIdentity,
322 SecureSession,
323 SessionId,
324 SessionState,
325};
326
327pub use placement::{
329 AuditSystem, DataPointer, DhtRecord, DiversityEnforcer, GeographicLocation, GroupBeacon,
330 NetworkRegion, NodeAd, PlacementConfig, PlacementDecision, PlacementEngine, PlacementMetrics,
331 PlacementOrchestrator, RegisterPointer, RepairSystem, StorageOrchestrator,
332 WeightedPlacementStrategy,
333};
334
335pub type PeerId = String;
341
342pub type Multiaddr = NetworkAddress;
346
347pub const VERSION: &str = env!("CARGO_PKG_VERSION");
349
350#[cfg(test)]
351mod tests {
352 use super::*;
353
354 #[test]
355 fn test_version() {
356 assert!(!VERSION.is_empty());
357 }
358}