Package web5.sdk.dids.methods.dht
Object DidDht.Companion
-
- All Implemented Interfaces:
public class DidDht.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static DidDht.CompanionINSTANCE
-
Method Summary
-
-
Method Detail
-
create
final BearerDid create(DidDhtCreateOptions options)
Creates a new "did:dht" DID using the provided options.
This method generates a new "did:dht" DID by creating a key pair, constructing a DID document, and optionally publishing it to the DHT.
- Parameters:
options- The options to configure the DID creation.- Returns:
A BearerDid object representing the newly created "did:dht" DID.
-
publish
final Unit publish(BearerDid bearerDid, String gatewayUrl)
Publishes a "did:dht" DID to the DHT.
This method publishes the specified BearerDid to the DHT by converting its document into a packet, signing it, and sending it to the DHT gateway.
- Parameters:
bearerDid- The BearerDid instance representing the DID to publish.gatewayUrl- The optional gateway URL to use for publishing.
-
-
-
-