Class DidDht
-
- All Implemented Interfaces:
public final class DidDhtProvides a specific implementation for creating and resolving "did:dht" method Decentralized Identifiers (DIDs).
A "did:dht" DID is a special type of DID that is based on an identity key, but can be extended to contain other keys, services, and other DID Document properties. It relies upon Distributed Hash Table (DHT) provided by the BitTorrent network, and an intermediary layer called Pkarr (Public Key Addressable Records) to store and retrieve the DID Document.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDidDht.DefaultDefault companion object for creating a DidDhtApi with a default configuration.
-
Field Summary
Fields Modifier and Type Field Description private final Stringuriprivate final KeyManagerkeyManagerprivate final DidDocumentdidDocumentpublic final static DidDht.DefaultDefault
-
Constructor Summary
Constructors Constructor Description DidDht(String uri, KeyManager keyManager, DidDocument didDocument)
-
Method Summary
Modifier and Type Method Description final StringgetUri()The URI of the "did:dht" which conforms to the DID standard. final KeyManagergetKeyManager()A KeyManager instance utilized to manage the cryptographic keys associated with the DID. final DidDocumentgetDidDocument()The DidDocument associated with the DID, created by the class. final Stringsuffix(String id)Calls DidDht.suffix with the provided id and returns the result. final Stringsuffix()Calls DidDht.suffix with the provided id and returns the result. final Unitvalidate(String did)Calls DidDht.validate with the provided did. final Unitvalidate()Calls DidDht.validate with the provided did. final MessagetoDnsPacket(DidDocument didDocument, List<DidDhtTypeIndexing> types)Calls DidDht.toDnsPacket with the provided didDocument and types and returns the result. final MessagetoDnsPacket(DidDocument didDocument)Calls DidDht.toDnsPacket with the provided didDocument and types and returns the result. final Pair<DidDocument, List<DidDhtTypeIndexing>>fromDnsPacket(String did, Message msg)Calls DidDht.fromDnsPacket with the provided did and msg and returns the result. final Pair<DidDocument, List<DidDhtTypeIndexing>>fromDnsPacket(Message msg)Calls DidDht.fromDnsPacket with the provided did and msg and returns the result. -
-
Constructor Detail
-
DidDht
DidDht(String uri, KeyManager keyManager, DidDocument didDocument)
-
-
Method Detail
-
getKeyManager
final KeyManager getKeyManager()
A KeyManager instance utilized to manage the cryptographic keys associated with the DID.
-
getDidDocument
final DidDocument getDidDocument()
The DidDocument associated with the DID, created by the class.
-
suffix
@JvmOverloads() final String suffix(String id)
Calls DidDht.suffix with the provided id and returns the result.
-
suffix
@JvmOverloads() final String suffix()
Calls DidDht.suffix with the provided id and returns the result.
-
validate
@JvmOverloads() final Unit validate(String did)
Calls DidDht.validate with the provided did.
-
validate
@JvmOverloads() final Unit validate()
Calls DidDht.validate with the provided did.
-
toDnsPacket
@JvmOverloads() final Message toDnsPacket(DidDocument didDocument, List<DidDhtTypeIndexing> types)
Calls DidDht.toDnsPacket with the provided didDocument and types and returns the result.
-
toDnsPacket
@JvmOverloads() final Message toDnsPacket(DidDocument didDocument)
Calls DidDht.toDnsPacket with the provided didDocument and types and returns the result.
-
fromDnsPacket
@JvmOverloads() final Pair<DidDocument, List<DidDhtTypeIndexing>> fromDnsPacket(String did, Message msg)
Calls DidDht.fromDnsPacket with the provided did and msg and returns the result.
-
fromDnsPacket
@JvmOverloads() final Pair<DidDocument, List<DidDhtTypeIndexing>> fromDnsPacket(Message msg)
Calls DidDht.fromDnsPacket with the provided did and msg and returns the result.
-
-
-
-