UniversalResolverProtocolAdapter
interface UniversalResolverProtocolAdapter
Protocol adapter for Universal Resolver implementations.
Different Universal Resolver providers may use different:
Endpoint paths (e.g.,
/1.0/identifiersvs/1.0.0/universal-resolver/identifiers)Authentication mechanisms
Response formats
Error handling
This adapter abstracts these differences, allowing DefaultUniversalResolver to work with any Universal Resolver-compatible service.
Example Usage:
// Standard adapter for dev.uniresolver.io
val adapter = StandardUniversalResolverAdapter()
val resolver = DefaultUniversalResolver("https://dev.uniresolver.io", protocolAdapter = adapter)
// Custom adapter for specific provider
val customAdapter = object : UniversalResolverProtocolAdapter {
override fun buildResolveUrl(baseUrl: String, did: String) = "$baseUrl/custom/path/$did"
// ... implement other methods
}Content copied to clipboard
Inheritors
Properties
Functions
Link copied to clipboard
Builds the URL for querying supported methods.
Link copied to clipboard
Builds the URL for resolving a DID.
Link copied to clipboard
Configures HTTP request headers for authentication.
Link copied to clipboard
Extracts the DID document from the response.
Link copied to clipboard
Extracts document metadata from the response.
Link copied to clipboard
Extracts resolution metadata from the response.