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
//! # P2P Foundation
//!
//! A next-generation peer-to-peer networking foundation built in Rust.
//!
//! ## Features
//!
//! - QUIC-based transport for modern networking
//! - IPv6-first with comprehensive tunneling support
//! - Kademlia DHT for distributed routing
//! - Built-in MCP server for AI capabilities
//! - Minimal dependencies and small footprint
//!
//! ## Example
//!
//! ```rust,no_run
//! use p2p_foundation::{P2PNode, NodeConfig};
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let node = P2PNode::builder()
//! .listen_on("/ip6/::/tcp/9000")
//! .with_mcp_server()
//! .build()
//! .await?;
//!
//! node.run().await?;
//! Ok(())
//! }
//! ```
/// Network core functionality
/// Distributed Hash Table implementation
/// Transport layer (QUIC, TCP)
/// IPv6/IPv4 tunneling protocols
/// Model Context Protocol server
/// Security and cryptography
/// Utility functions and types
/// Production hardening features
/// Bootstrap cache for decentralized peer discovery
/// Error types
// Re-export main types
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Placeholder types (will be replaced with actual libp2p types)
/// Peer identifier used throughout the P2P Foundation
///
/// Currently implemented as a String for simplicity, but will be replaced
/// with proper libp2p PeerId type in future versions.
pub type PeerId = String;
/// Multiaddress used for network addressing
///
/// Currently implemented as a String for simplicity, but will be replaced
/// with proper libp2p Multiaddr type in future versions.
pub type Multiaddr = String;
/// P2P Foundation version
pub const VERSION: &str = env!;