TelemetryWallet

class TelemetryWallet(delegate: Wallet) : Wallet

Reports wallet storage operations to Telemetry, and delegates everything else unchanged.

The wallet is where a credential goes to be found again, and it is usually backed by something that can be slow or unavailable — a database, a file system, a cloud store. Before this, a host seeing a slow presentation could not tell an expensive proof from a stalled read. Wrapping the configured wallet closes that gap without every storage plugin carrying instrumentation.

Kotlin interface delegation supplies every other member, so a method added to Wallet keeps working here rather than silently losing its implementation.

Nothing is recorded until a host installs a sink. Credential identifiers, subjects, issuers and filter contents are never attached to an event: they identify people, and these become metric labels. Result counts are not attached either, for the same reason a count of one is a fact about a subject.

Constructors

Link copied to clipboard
constructor(delegate: Wallet)

Properties

Link copied to clipboard
open override val capabilities: WalletCapabilities

Wallet capabilities for runtime discovery.

Link copied to clipboard
open override val walletId: String

Wallet identifier (DID or UUID).

Functions

Link copied to clipboard
open override fun close()

Release resources owned by this wallet (e.g. connection pools).

Link copied to clipboard
open suspend override fun delete(credentialId: String): Boolean

Delete a credential.

Link copied to clipboard
open suspend override fun get(credentialId: String): VerifiableCredential?

Get a credential by ID.

Link copied to clipboard
open suspend override fun getStatistics(): WalletStatistics

Get wallet statistics.

Link copied to clipboard
open suspend override fun list(filter: CredentialFilter? = null): List<VerifiableCredential>

List credentials matching a filter.

Link copied to clipboard
open suspend override fun query(query: CredentialQueryBuilder.() -> Unit): List<VerifiableCredential>

Query credentials using a query builder.

Link copied to clipboard
open suspend override fun store(credential: VerifiableCredential): String

Store a credential.

Link copied to clipboard
inline fun <T> Wallet.withCollections(block: (CredentialCollections) -> T): T?

Extension function for type-safe access to the CredentialCollections capability.

Link copied to clipboard
inline fun <T> Wallet.withDidManagement(block: (DidManagement) -> T): T?

Extension function for type-safe capability access.

Link copied to clipboard
inline fun <T> Wallet.withIssuance(block: (CredentialIssuance) -> T): T?

Extension function for type-safe capability access.

Link copied to clipboard
inline fun <T> Wallet.withKeyManagement(block: (KeyManagement) -> T): T?

Extension function for type-safe capability access.

Link copied to clipboard
inline fun <T> Wallet.withLifecycle(block: (CredentialLifecycle) -> T): T?

Extension function for type-safe capability access.

Link copied to clipboard
inline fun <T> Wallet.withOrganization(block: (CredentialOrganization) -> T): T?

Extension function for type-safe access to the combined CredentialOrganization capability.

Link copied to clipboard
inline fun <T> Wallet.withPresentation(block: (CredentialPresentation) -> T): T?

Extension function for type-safe capability access.

Link copied to clipboard
inline fun <T> Wallet.withTagging(block: (CredentialTagging) -> T): T?

Extension function for type-safe access to the CredentialTagging capability.

Link copied to clipboard

Wraps this wallet so its storage operations are reported to Telemetry.