Create DID

Important

Before creating a DID, please ensure that you have defined and initialised holder.

Creates a Decentralised Identity (DID) and saves it globally for the holder.

To implement the following code block helps create identity with the help of identity wallet;

 const { did } = await identityWallet.createIdentity({
  method: core.DidMethod.Iden3,
  blockchain: core.Blockchain.Polygon,
  networkId: core.NetworkId.Mumbai,
  revocationOpts: {
    type: CredentialStatusType.Iden3ReverseSparseMerkleTreeProof,
    id: <Hosted_RHS_URL>,
  },
});

const userDID = did; // saving the user DID globally

Fetch and update the generated holder's DID to the issuer for it to issue a verifiable credential. The issuer uses it to generate BJJ Signed verifiable credential used in the next step.


Next Up: Acquire credentials →