Weave Dht Daemon
Protocol
Protocol surface for the Weave DHT daemon — service endpoints, message types, and required client behaviour.
Purpose
Runtime daemon wrapper around Weave DHT services and operational node process.
This page follows the real source shape for Weave Dht Daemon and explains the workflow a developer is likely to use first.
Developer workflow
Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.
Primary types to know
- No public items were detected by the source scan. This page should be updated when the crate exposes new items.
Example shape
# Wire protocol surface: the daemon speaks libp2p kademlia plus a local JSON-RPC
# endpoint. Every RPC maps to a libp2p outbound (or a local store hit).
# Start with verbose protocol logs so you can see kademlia message flow.
RUST_LOG=weave_dht=trace weave-dht-daemon \
--listen /ip4/0.0.0.0/udp/4040/quic \
--rpc-addr 127.0.0.1:4042
# Raw JSON-RPC invocations (the CLI wraps these).
curl -s http://127.0.0.1:4042/rpc -d '{"method":"put","params":{"key":"hello","value":"world"}}' -H 'content-type: application/json'
curl -s http://127.0.0.1:4042/rpc -d '{"method":"get","params":{"key":"hello"}}' -H 'content-type: application/json'
# Inspect peer routing table and listening multiaddrs.
curl -s http://127.0.0.1:4042/rpc -d '{"method":"peers"}' -H 'content-type: application/json'
curl -s http://127.0.0.1:4042/rpc -d '{"method":"listeners"}' -H 'content-type: application/json'