The DidWeb class provides an implementation of the did:web DID method.

Features:

  • DID Resolution: Resolve a did:web to its corresponding DID Document.

Remarks

The did:web method uses a web domain's existing reputation and aims to integrate decentralized identities with the existing web infrastructure to drive adoption. It leverages familiar web security models and domain ownership to provide accessible, interoperable digital identity management.

See

DID Web Specification

Example

// DID Resolution
const resolutionResult = await DidWeb.resolve({ did: did.uri });

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

methodName: string = 'web'

Name of the DID method, as defined in the DID Web specification.

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.