The DID API is used to resolve DIDs.

Constructors

Properties

Methods

Constructors

  • Parameters

    • options: {
          agent: Web5Agent;
          connectedDid: string;
      }
      • agent: Web5Agent
      • connectedDid: string

    Returns DidApi

Properties

agent: Web5Agent

Holds the instance of a Web5Agent that represents the current execution context for the DidApi. This agent is used to process DID requests.

connectedDid: string

The DID of the tenant under which DID operations are being performed.

Methods

  • Initiates the creation of a Decentralized Identifier (DID) using the specified method, options, and storage preference.

    This method sends a request to the Web5 Agent to create a new DID based on the provided method, with method-specific options. It also specifies whether the newly created DID should be stored.

    Parameters

    • request: DidCreateRequest

      The request parameters for creating a DID, including the method, options, and storage flag.

    Returns Promise<DidCreateResponse>

    A promise that resolves to a DidCreateResponse, which includes the operation's status and, if successful, the newly created DID.