DidResolutionResult
Result of the DID resolution function per DID Resolution 1.0 §4.
The three outputs of resolve — didDocument, didDocumentMetadata and didResolutionMetadata — are modelled as a sealed hierarchy so that the spec's invariants hold by construction:
Success is the only variant carrying a document.
Deactivated carries no document and forces
deactivated = true(§4.4).Failure carries no document, empty document metadata, and a non-null RFC 9457 error (§4).
Example Usage:
when (val result = resolver.resolve(did)) {
is DidResolutionResult.Success -> println(result.document.id)
is DidResolutionResult.Deactivated -> println("deactivated: ${result.did}")
is DidResolutionResult.Failure -> println(result.error?.type)
}Inheritors
Types
The DID exists but has been deactivated (§4.4).
Resolution failed. Every variant carries a non-null DidResolutionMetadata.error, enforced by each variant's own init block (§4).
Resolution succeeded.
Properties
§4.3 document metadata; empty for failed resolutions, as §4 requires.
The resolved document, or null for deactivated and failed resolutions (§4).
The RFC 9457 error object, or null when resolution did not fail.
Human-readable failure text, or null when resolution did not fail.
The error type URI, or null when resolution did not fail.
True when resolution failed with an error. Deactivation is NOT an error.
True when the DID exists but is deactivated (§4.4).
True when the DID could not be found.
True when the DID resolved to a document.
§4.2 resolution metadata for any outcome.
Functions
Returns the resolved DidDocument or throws.