DidDht

class DidDht(val uri: String, val keyManager: KeyManager, val didDocument: DidDocument? = null)

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

Constructors

Link copied to clipboard
constructor(uri: String, keyManager: KeyManager, didDocument: DidDocument? = null)

Types

Link copied to clipboard

Default companion object for creating a DidDhtApi with a default configuration.

Properties

Link copied to clipboard

The DidDocument associated with the DID, created by the class.

Link copied to clipboard

A KeyManager instance utilized to manage the cryptographic keys associated with the DID.

Link copied to clipboard
val uri: String

The URI of the "did:dht" which conforms to the DID standard.

Functions

Link copied to clipboard
fun fromDnsPacket(did: String = this.uri, msg: <Error class: unknown class>): <Error class: unknown class><DidDocument, List<DidDhtTypeIndexing>>

Calls DidDht.fromDnsPacket with the provided did and msg and returns the result.

Link copied to clipboard
fun suffix(id: String = this.uri): String

Calls DidDht.suffix with the provided id and returns the result.

Link copied to clipboard
fun toDnsPacket(didDocument: DidDocument, types: List<DidDhtTypeIndexing>? = emptyList()): <Error class: unknown class>

Calls DidDht.toDnsPacket with the provided didDocument and types and returns the result.

Link copied to clipboard
fun validate(did: String = this.uri)

Calls DidDht.validate with the provided did.