TelemetryDidMethod

class TelemetryDidMethod(val delegate: DidMethod) : DidMethod

Reports the DID write lifecycle to Telemetry, and delegates everything else unchanged.

CachingDidResolver already reports resolution, which is the read half. Creation, update and deactivation are the half that changes something — the operations a host most needs to see when a registrar is slow, a chain is congested or a key rotation did not take. Instrumenting them here rather than in each method plugin means a new plugin is covered the day it is registered.

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

Nothing is recorded until a host installs a sink. The DID method name is attached because it is low-cardinality and the first thing worth grouping by; the DID itself never is, because it identifies a subject and these become metric labels.

Constructors

Link copied to clipboard
constructor(delegate: DidMethod)

Properties

Link copied to clipboard
open override val capabilities: MethodCapabilities?

Capabilities advertised by this DID method implementation.

Link copied to clipboard

The method this wraps.

Link copied to clipboard
open override val method: String

The DID method name (e.g., "web", "key", "ion").

Functions

Link copied to clipboard
open suspend override fun createDid(options: DidCreationOptions = DidCreationOptions()): DidDocument

Creates a new DID and returns its initial DID Document.

Link copied to clipboard

Convenience extension for creating a DID using a builder DSL.

Link copied to clipboard

Extension functions for DidMethod to provide fluent DSL.

Link copied to clipboard
open suspend override fun deactivateDid(did: Did): Boolean

Deactivates a DID.

Link copied to clipboard
open suspend override fun resolveDid(did: Did): DidResolutionResult

Implementation Note: Implementations should validate the DID format before processing. The DID must start with "did:{method}:" where {method} matches this method's name. Use DidValidator.validateFormat for validation.

open suspend override fun resolveDid(did: Did, options: ResolutionOptions): DidResolutionResult

Resolves a DID with DID Resolution 1.0 §4.1 resolution options.

Link copied to clipboard
open suspend override fun updateDid(did: Did, updater: (DidDocument) -> DidDocument): DidDocument

Updates a DID Document.

Link copied to clipboard

Wraps this method so its creations, updates and deactivations are reported to Telemetry.