ResolutionOptions

@Serializable
data class ResolutionOptions(val accept: String? = null, val expandRelativeUrls: Boolean = false, val versionId: String? = null, val versionTime: Instant? = null, val noCache: Boolean = false, val additional: Map<String, String> = emptyMap(), parseError: String? = null)

Input options to the DID resolution function per DID Resolution 1.0 §4.1.

The structure is REQUIRED as an input to resolve but MAY be empty — use EMPTY.

fromQueryParameters and fromJson are the supported entry points for options arriving from outside this library (the §12.1 GET and POST bindings respectively): both parse defensively and surface a malformed value via validate rather than throwing. Direct Json.decodeFromString<ResolutionOptions>(…) is reserved for round-tripping values this library itself already produced — a malformed versionTime there still throws out of XmlDateTimeSerializer, since that serializer is shared with org.trustweave.did.resolver.DidResolutionMetadata and org.trustweave.did.model.DidDocumentMetadata, where silently nulling a bad timestamp would hide data loss.

Parameters

accept

media type of the caller's preferred DID document representation (§4.1)

expandRelativeUrls

expand relative DID URLs in the document to absolute ones (§4.1)

versionId

resolve a specific document version (§3, §13.4)

versionTime

resolve the version valid at this time (§3, §13.4)

noCache

request a fresh read from the verifiable data registry (§13.2)

additional

registered or method-specific options not modelled above

Constructors

Link copied to clipboard
constructor(accept: String? = null, expandRelativeUrls: Boolean = false, versionId: String? = null, versionTime: Instant? = null, noCache: Boolean = false, additional: Map<String, String> = emptyMap(), parseError: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

True when no option is set — the "MAY be empty" case of §4.

Link copied to clipboard

Options that only a DID method can satisfy. A resolver that cannot delegate these MUST return FEATURE_NOT_SUPPORTED (§4.4 step 3).

Link copied to clipboard

Returns an INVALID_OPTIONS error when the options are invalid (§4.4 step 4), else null.