libp2p-kad 0.4.0

Kademlia protocol for libp2p

Kademlia protocol. Allows peer discovery, records store and records fetch.


Usage is done in the following steps:

  • Build a KadSystemConfig and a KadConnecConfig object that contain the way you want the Kademlia protocol to behave.

  • Create a swarm that upgrades incoming connections with the KadConnecConfig.

  • Build a KadSystem from the KadSystemConfig. This requires passing a closure that provides the Kademlia controller of a peer.

  • You can perform queries using the KadSystem.