Represents the interface for resolving a Decentralized Identifier (DID) to its corresponding DID document.

The DidResolver interface defines a single method, resolve, which takes a DID URL as input and returns a Promise that resolves to a DidResolutionResult. This result contains the DID document associated with the given DID, along with metadata about the resolution process.

Implementations of this interface are expected to support resolution of DIDs according to the specific rules and methods defined by the DID scheme in use.

More information on DID URL dereferencing can be found in the DID Core specification.

Example

const resolutionResult = await didResolver.resolve('did:example:123456789abcdefghi');
interface DidResolver {
    resolve(didUrl, options?): Promise<DidResolutionResult>;
}

Implemented by

Methods

Methods

  • Resolves a DID URI to a DID document and associated metadata.

    This function should resolve the DID URI in accordance with the relevant DID method specification, using the provided options.

    Parameters

    • didUrl: string
    • Optional options: DidResolutionOptions

      Optional. The options used for resolving the DID.

    Returns Promise<DidResolutionResult>

    A DidResolutionResult object containing the DID document and metadata or an error.