Package-level declarations

Types

Link copied to clipboard
class CachingDidResolver(delegate: DidResolver, ttl: Duration = 5.minutes, maxSize: Int = 1000, clock: Clock = Clock.System) : DidResolver

Caching decorator for any DidResolver.

Link copied to clipboard
class DecentralizedResolutionStrategy(localResolver: DidResolver, universalResolver: DidResolver, methodSpecificResolvers: Map<String, DidResolver> = emptyMap(), maxCacheAge: Duration = 1.hours) : DidResolver

Decentralized Resolution Strategy.

Link copied to clipboard
class DefaultUniversalResolver(val baseUrl: String, timeout: Int = 30, apiKey: String? = null, protocolAdapter: UniversalResolverProtocolAdapter = StandardUniversalResolverAdapter(), retryConfig: RetryConfig = RetryConfig.default().copy( nonRetryableExceptions = listOf( org.trustweave.did.exception.DidException.InvalidDidFormat::class, // Any DidException subtype is a domain-level error, not a transient network condition, // and must never be retried. org.trustweave.did.exception.DidException::class, ), ), httpClient: HttpClient? = null) : UniversalResolver

Default implementation of UniversalResolver using Java's built-in HTTP client.

Link copied to clipboard

Error type URIs defined by DID Resolution 1.0 §11, plus the §12.1 HTTP status mapping.

Link copied to clipboard
@Serializable
data class DidResolutionError(val type: String, val title: String? = null, val detail: String? = null)

An error data structure per RFC 9457 as required by DID Resolution 1.0 §4.2 / §5.2 / §11.

Link copied to clipboard
@Serializable
data class DidResolutionMetadata(val contentType: String = DidMediaTypes.DID, val error: DidResolutionError? = null, val proof: List<JsonObject> = emptyList(), val pattern: String? = null, val driverUrl: String? = null, val duration: Long? = null, val retrieved: Instant? = null, val properties: Map<String, String> = emptyMap())

DID resolution metadata per DID Resolution 1.0 §4.2 — metadata about the resolution process.

Link copied to clipboard
sealed class DidResolutionResult

Result of the DID resolution function per DID Resolution 1.0 §4.

Link copied to clipboard
fun interface DidResolver

Functional interface for resolving DIDs to DID documents.

Link copied to clipboard

Composite resolver that delegates to fallback when the primary resolver does not support the DID's method.

Link copied to clipboard

Resolver implementation that uses a DidMethodRegistry to resolve DIDs.

Link copied to clipboard

Resolution Fallback Strategy.

Link copied to clipboard
data class RetryConfig(val maxRetries: Int = 3, val initialDelayMs: Long = 100, val maxDelayMs: Long = 2000, val retryableStatusCodes: Set<Int> = setOf(500, 502, 503, 504), val retryableExceptions: Set<Class<out Throwable>> = setOf( java.net.ConnectException::class.java, java.net.SocketTimeoutException::class.java, java.io.IOException::class.java, ), val nonRetryableExceptions: List<KClass<out Throwable>> = listOf())

Configuration for retry logic in HTTP operations.

Link copied to clipboard

Protocol adapter for standard Universal Resolver implementations.

Link copied to clipboard

Interface for Universal Resolver implementations.

Link copied to clipboard

Protocol adapter for Universal Resolver implementations.

Properties

Link copied to clipboard

§4.3 document metadata; empty for failed resolutions, as §4 requires.

Link copied to clipboard

The resolved document, or null for deactivated and failed resolutions (§4).

Link copied to clipboard

The RFC 9457 error object, or null when resolution did not fail.

Link copied to clipboard

Human-readable failure text, or null when resolution did not fail.

Link copied to clipboard

The error type URI, or null when resolution did not fail.

Link copied to clipboard

True when resolution failed with an error. Deactivation is NOT an error.

Link copied to clipboard

True when the DID exists but is deactivated (§4.4).

Link copied to clipboard

True when the DID could not be found.

Link copied to clipboard

True when the DID resolved to a document.

Link copied to clipboard

§4.2 resolution metadata for any outcome.

Functions

Link copied to clipboard

Adapts a UniversalResolver (string-based, exception-throwing HTTP client interface) to the DidResolver contract (typed, always returns a DidResolutionResult).

Link copied to clipboard

Extension function to create a resolver from a registry.

Link copied to clipboard

Returns the resolved DidDocument or throws.