Skip to content

The Dart libp2p stack

dart_libp2p is a libp2p implementation in pure Dart, so the same peer code runs in a Flutter app, a CLI tool or a server. It speaks the libp2p wire protocols, so a Dart peer can connect directly to a go-libp2p peer.

pubspec.yaml
dependencies:
dart_libp2p: ^4.12.0
Layer What ships
Transports TCP and UDX; WebRTC for browsers and Bluetooth LE for devices nearby, in their own packages
Security Noise
Multiplexing Yamux
Connectivity Circuit Relay v2, AutoRelay, hole punching, mDNS discovery
Core protocols Ping, Identify
Operations Resource manager, peerstore, event bus
Package What it does
dart_libp2p_webrtc The libp2p WebRTC transport (/webrtc): direct connections between Dart or Flutter apps and js-libp2p in browsers, signaled through a relay
dart_libp2p_ble The Bluetooth LE transport (/ble): Android, iOS and macOS devices nearby connect without a network, with discovery and a gossipsub mesh over GATT links
dart_libp2p_pubsub GossipSub v1.1, FloodSub and RandomSub, with peer scoring and message validation
dart_libp2p_kad_dht Kademlia DHT for peer routing, content routing and signed records, with client, server and auto modes
dart_libp2p_bitswap Bitswap 1.2.0: exchange content-addressed blocks with peers
merkledag Merkle-CRDTs: Merkle-DAGs combined with CRDTs for strong eventual consistency
dart_libp2p_merkle_crdt Replicates Merkle-CRDTs across peers, announcing heads over GossipSub and fetching DAG nodes over streams

Built by Stephan Februarygithub.com/stephanfebLinkedIn