DidManagement

interface DidManagement

DID management capability for wallets.

Wallets can implement this to provide DID operations.

Example Usage:

val wallet: Wallet = createWallet()

if (wallet is DidManagement) {
// Create DID
val did = wallet.createDid("key")

// Get wallet DID
println("Wallet DID: ${wallet.walletDid}")

// Resolve DID
val document = wallet.resolveDid(did)
}

Properties

Link copied to clipboard
abstract val holderDid: String

Holder DID (the DID that holds credentials in this wallet).

Link copied to clipboard
abstract val walletDid: String

Wallet's own DID.

Functions

Link copied to clipboard
open suspend fun createDid(method: String, configure: DidCreationOptionsBuilder.() -> Unit): String

abstract suspend fun createDid(method: String, options: DidCreationOptions = DidCreationOptions()): String

Create a new DID.

Link copied to clipboard
abstract suspend fun getDids(): List<String>

Get all DIDs managed by this wallet.

Link copied to clipboard
abstract suspend fun getPrimaryDid(): String

Get the primary DID for this wallet.

Link copied to clipboard
abstract suspend fun resolveDid(did: String): DidDocument?

Resolve a DID to its DID Document.

Link copied to clipboard
abstract suspend fun setPrimaryDid(did: String): Boolean

Set the primary DID.