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::types::{GroupId, ParticipantId};
235
236pub use placement::{
238 PlacementEngine, PlacementConfig, PlacementDecision, PlacementMetrics,
239 PlacementOrchestrator, StorageOrchestrator, AuditSystem, RepairSystem,
240 WeightedPlacementStrategy, DiversityEnforcer, GeographicLocation, NetworkRegion,
241 NodeAd, GroupBeacon, DataPointer, RegisterPointer, DhtRecord,
242};
243
244pub type PeerId = String;
250
251pub type Multiaddr = NetworkAddress;
255
256pub const VERSION: &str = env!("CARGO_PKG_VERSION");
258
259#[cfg(test)]
260mod tests {
261 use super::*;
262
263 #[test]
264 fn test_version() {
265 assert!(!VERSION.is_empty());
266 }
267}