Object DidDht.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final BearerDid create(DidDhtCreateOptions options) Creates a new "did:dht" DID using the provided options.
      final Unit publish(BearerDid bearerDid, String gatewayUrl) Publishes a "did:dht" DID to the DHT.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.