Network Runtime
The core Dht and Swarm re-exports require the p2p feature.
Workflow and current contract
The core Dht and Swarm re-exports require the p2p feature. Dht::new(config, owner_did) is synchronous; Swarm::new(config, owner_did) is asynchronous and must be awaited. These are the core wrapper types, distinct from the standalone weave_dht::DhtNode and weave_swarm::Swarm APIs.
The DHT exposes bootstrap, put/get, content announcement/lookup, stats, and peer inspection. The Swarm exposes start/connect and peer inspection. Constructing either object is not proof that bootstrap succeeded; observe the corresponding network operations and returned peers. Core Dht::get returns a local hit when available; otherwise it initiates a query and immediately returns None, leaving event processing and later resolution to its integration. These legacy core wrappers derive transport key material from the owner DID string; this is not private-key possession proof. Use the SDK/session identity path for an authenticated peer integration.
Source reference
networkdeclarations —libs/weave-core/src/network/mod.rs.network::dhtdeclarations —libs/weave-core/src/network/dht.rs.network::swarmdeclarations —libs/weave-core/src/network/swarm.rs.