DecentralizedResolutionStrategy
Decentralized Resolution Strategy.
Implements multi-source resolution with fallback to maintain decentralization principles. Tries multiple resolution sources in order:
Local storage (fastest, but may be stale)
Method-specific resolver (most authoritative)
Universal Resolver (decentralized fallback)
Decentralization Benefits:
No single point of failure
Multiple resolution sources
Freshness checking for cached results
Graceful degradation
Example Usage:
val strategy = DecentralizedResolutionStrategy(
localResolver = RegistryBasedResolver(registry),
universalResolver = DefaultUniversalResolver("https://dev.uniresolver.io"),
methodSpecificResolvers = mapOf(
"web" to WebDidResolver(),
"key" to KeyDidResolver()
)
)
val result = strategy.resolve(Did("did:web:example.com"))Constructors
Functions
Resolves a DID to a DID resolution result.
Resolves with DID Resolution 1.0 §4.1 options, forwarded unchanged to whichever of localResolver, methodSpecificResolvers or universalResolver ends up answering — same three-stage precedence as the single-argument resolve. Each stage is itself a DidResolver and independently responsible for judging support for the options it receives (e.g. reporting FEATURE_NOT_SUPPORTED for a versionId it cannot honour); this strategy does not interpret options itself beyond forwarding them.
Resolves a DID and returns the document, or null if it could not be resolved.
Resolves a DID and returns the document, or throws if not found.