A client for the DHT service.
getProviders(topic: string,key: Uint8Array,): ProvidersStream
Get the providers for a given key in a topic.
getRecord(topic: string,key: Uint8Array,): Promise<Uint8Array | null>
Get a record from the DHT.
provide(topic: string,key: Uint8Array,): Promise<void>
Register as a provider for a given key in a topic.
removeRecord(topic: string,key: Uint8Array,): Promise<void>
Remove a record from the DHT.
This only affects the local node and will only take effect in the network once the record expires.
stopProviding(topic: string,key: Uint8Array,): Promise<void>
Stop providing a key in a topic.
This only affects the local node and will only take effect in the network once the record expires.