Base abstraction for all Decentralized Identifier (DID) method implementations.

This base class serves as a foundational structure upon which specific DID methods can be implemented. Subclasses should furnish particular method and data models adherent to various DID methods, taking care to adhere to the W3C DID Core specification and the respective DID method specifications.

Hierarchy (view full)

Constructors

Methods

  • MUST be implemented by all DID method implementations that extend DidMethod.

    Given the W3C DID Document of a DID, return the verification method that will be used for signing messages and credentials. If given, the methodId parameter is used to select the verification method. If not given, each DID method implementation will select a default verification method from the DID Document.

    Parameters

    • _params: {
          didDocument: DidDocument;
          methodId?: string;
      }

      The parameters for the getSigningMethod operation.

      • didDocument: DidDocument

        DID Document to get the verification method from.

      • Optional methodId?: string

        ID of the verification method to use for signing.

    Returns Promise<undefined | DidVerificationMethod>

    Verification method to use for signing.

  • MUST be implemented by all DID method implementations that extend DidMethod.

    Resolves a DID URI to a DID Document.

    Parameters

    • _didUri: string

      The DID to be resolved.

    • Optional _options: DidResolutionOptions

      Optional parameters for resolving the DID.

    Returns Promise<DidResolutionResult>

    A Promise resolving to a DidResolutionResult object representing the result of the resolution.