1#![warn(clippy::unwrap_used)]
16#![warn(clippy::expect_used)]
17#![warn(clippy::panic)]
18
19#![allow(missing_docs)]
52#![allow(missing_debug_implementations)]
53#![warn(rust_2018_idioms)]
54
55pub mod address;
57
58pub mod network;
60
61pub mod dht;
63
64pub mod dht_network_manager;
66
67pub mod transport;
69
70pub mod mcp;
72
73pub mod security;
75
76pub mod identity;
78
79pub mod storage;
81
82pub mod chat;
84
85pub mod messaging;
87
88pub mod discuss;
90
91pub mod projects;
93
94pub mod threshold;
96
97pub mod quantum_crypto;
99
100pub mod utils;
102
103pub mod validation;
105
106pub mod production;
108
109pub mod bootstrap;
111
112pub mod error;
114
115pub mod peer_record;
117
118pub mod crypto_verify;
120
121pub mod monotonic_counter;
123
124pub mod secure_memory;
126
127pub mod key_derivation;
129
130pub mod encrypted_key_storage;
132
133pub mod persistent_state;
135
136pub mod identity_manager;
138
139pub mod adaptive;
141
142pub mod config;
144
145pub mod health;
147
148pub mod geographic_enhanced_network;
150
151pub mod placement;
153
154pub use address::{AddressBook, NetworkAddress};
156pub use bootstrap::{BootstrapCache, BootstrapManager, CacheConfig, ContactEntry};
157pub use crypto_verify::{
158 BatchVerificationRequest, BatchVerificationResult, EnhancedSignatureVerification,
159 EnhancedSignatureVerifier, VerificationStats,
160};
161pub use dht::{Key, Record};
162pub use dht_network_manager::{
163 BootstrapNode, DhtNetworkConfig, DhtNetworkEvent, DhtNetworkManager, DhtNetworkOperation,
164 DhtNetworkResult, DhtPeerInfo,
165};
166pub use encrypted_key_storage::{
167 Argon2Config, DerivationPriority as KeyDerivationPriority, EncryptedKeyStorageManager,
168 KeyMetadata, PasswordValidation, SecurityLevel, StorageStats,
169};
170pub use error::{P2PError, P2pResult as Result};
171pub use health::{
172 ComponentChecker, ComponentHealth, HealthEndpoints, HealthManager, HealthResponse,
173 HealthServer, HealthStatus, PrometheusExporter,
174};
175pub use identity_manager::{
176 Identity, IdentityCreationParams, IdentityKeyPair, IdentityManager, IdentityState,
177 IdentityStats, IdentitySyncPackage, IdentityUpdate, IdentityVerification,
178 RevocationCertificate, RevocationReason,
179};
180pub use key_derivation::{
181 BatchDerivationRequest, BatchDerivationResult, DerivationPath, DerivationPriority,
182 DerivationStats, DerivedKey, HierarchicalKeyDerivation, MasterSeed,
183};
184pub use mcp::{MCPServer, MCPService, Tool};
185pub use monotonic_counter::{
186 BatchUpdateRequest, BatchUpdateResult, CounterStats, MonotonicCounterSystem, PeerCounter,
187 SequenceValidationResult,
188};
189pub use network::{NodeBuilder, NodeConfig, P2PEvent, P2PNode};
190pub use peer_record::{EndpointId, NatType, PeerDHTRecord, PeerEndpoint, SignatureCache, UserId};
191pub use persistent_state::{
192 FlushStrategy, IntegrityReport, PersistentStateManager, RecoveryMode, RecoveryStats,
193 StateChangeEvent, StateConfig, TransactionType, WalEntry,
194};
195pub use production::{ProductionConfig, ResourceManager, ResourceMetrics};
196pub use secure_memory::{
197 PoolStats, SecureMemory, SecureMemoryPool, SecureString, SecureVec, allocate_secure,
198 secure_string_with_capacity, secure_vec_with_capacity,
199};
200pub use validation::{
201 RateLimitConfig, RateLimiter, Sanitize, Validate, ValidationContext, ValidationError,
202 sanitize_string, validate_dht_key, validate_dht_value, validate_file_path,
203 validate_message_size, validate_network_address, validate_peer_id,
204};
205
206pub use identity::enhanced::{
208 Department, EnhancedIdentity, EnhancedIdentityManager, Organization, Permission, Team,
209};
210
211pub use storage::{FileChunker, StorageManager}; pub use chat::{Call, Channel, ChannelId, ChannelType, ChatManager, Message, MessageId, Thread};
216
217pub use discuss::{
219 Badge, Category, CategoryId, DiscussManager, Poll, Reply, ReplyId, Topic, TopicId, UserStats,
220};
221
222pub use projects::{
224 Document, DocumentId, Folder, Project, ProjectAnalytics, ProjectId, ProjectsManager,
225 WorkflowState,
226};
227
228pub use threshold::{
230 GroupMetadata, ParticipantInfo, ThresholdGroup, ThresholdGroupManager, ThresholdSignature,
231};
232
233pub use quantum_crypto::{
235 CryptoCapabilities,
236 KemAlgorithm,
237 NegotiatedAlgorithms,
238 ProtocolVersion,
239 QuantumCryptoError,
241 SignatureAlgorithm,
242 negotiate_algorithms,
244};
245
246pub use quantum_crypto::{
248 ChaCha20Poly1305Cipher,
250 EncryptedMessage,
252 HybridKem,
254 HybridKemCiphertext,
255 HybridKemPublicKey,
256 HybridKemSecretKey,
257 HybridPublicKeyEncryption,
258
259 HybridSignature,
260 HybridSignaturePublicKey,
261 HybridSignatureSecretKey,
262 HybridSignatureValue,
263
264 MlDsa65,
265
266 MlDsaOperations,
267
268 MlDsaPublicKey,
269 MlDsaSecretKey,
270 MlDsaSignature,
271 MlKem768,
273 MlKemCiphertext,
274 MlKemOperations,
276 MlKemPublicKey,
278 MlKemSecretKey,
279 PqcError,
281 SaorsaPqcResult,
282
283 SharedSecret,
284 SymmetricEncryptedMessage,
285
286 SymmetricError,
287 SymmetricKey,
288
289 saorsa_pqc_init,
291};
292
293pub use quantum_crypto::ant_quic_integration::{
295 create_default_pqc_config,
297 create_pqc_only_config,
298};
299
300pub use quantum_crypto::types::{
302 Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, FrostCommitment,
308 FrostGroupPublicKey,
309 FrostKeyShare,
310 FrostPublicKey,
312 FrostSignature,
313 GroupId,
315 HandshakeParameters,
316
317 ParticipantId,
318 PeerId as QuantumPeerId,
319 QuantumPeerIdentity,
320 SecureSession,
321 SessionId,
322 SessionState,
323};
324
325pub use placement::{
327 AuditSystem, DataPointer, DhtRecord, DiversityEnforcer, GeographicLocation, GroupBeacon,
328 NetworkRegion, NodeAd, PlacementConfig, PlacementDecision, PlacementEngine, PlacementMetrics,
329 PlacementOrchestrator, RegisterPointer, RepairSystem, StorageOrchestrator,
330 WeightedPlacementStrategy,
331};
332
333pub type PeerId = String;
339
340pub type Multiaddr = NetworkAddress;
344
345pub const VERSION: &str = env!("CARGO_PKG_VERSION");
347
348#[cfg(test)]
349mod tests {
350 use super::*;
351
352 #[test]
353 fn test_version() {
354 assert!(!VERSION.is_empty());
355 }
356}