WalletBuilder

class WalletBuilder(walletContext: WalletDslContext)

Wallet Builder DSL.

Provides a fluent API for creating and configuring wallets using a wallet DSL provider.

Example Usage:

val wallet = trustWeave.wallet {
id("my-wallet")
holder("did:key:holder")
enableOrganization()
enablePresentation()
}

Constructors

Link copied to clipboard
constructor(walletContext: WalletDslContext)

Functions

Link copied to clipboard
fun basic()

Use basic wallet (minimal features).

Link copied to clipboard
suspend fun build(): Wallet

Build the wallet.

Link copied to clipboard

Enable organization capabilities (collections, tags).

Link copied to clipboard

Enable presentation capabilities.

Link copied to clipboard
fun holder(did: String)

Set holder DID.

fun holder(did: Did)

Set wallet holder DID.

Link copied to clipboard
fun id(walletId: String)

Set wallet ID.

Link copied to clipboard
fun inMemory()

Use in-memory wallet (for testing).

Link copied to clipboard
fun option(key: String, value: Any?)

Add custom option for wallet creation.

Link copied to clipboard
fun provider(name: String)

Set wallet provider (e.g., "inMemory", "basic", "database", "file").

Link copied to clipboard
fun walletDid(did: String)

Set wallet DID.