DID Registry Functions (Authdid)

How to use Authdid model using mitumjs SDK.

Authdid is a DID registry model primarily used for account abstraction in Mitum. Users can create DIDs and manage DID documents by creating or updating them.

  1. Create a contract-account first using function of contract class. The account must be deployed on the Mitum network. (Create an operation with contract.createWallet(), and use operation.sign() and operation.send(), or use contract.touch() to sign and send at once.)

  2. Create a register model operation using function registerModel() of authdid class with did method name parameter.

  3. Sign and send the operation to Mitum network. (You can check whether the model information has been properly registered using the getModelInfo() function.)

  4. Every user account can create their own did to the contract. Create operation using create(), Since a did document is created first when creating a DID, additional information for the did document must be provided.

  5. Sign and send the operation to Mitum network. (Check the did using getDID() method, did document using getDocument())

  6. The owner of a DID can update their DID document using the update-document operation, which is created through updateDocument(). The updateDocument() method takes the DID document itself as an argument and updates it. Therefore, the document must strictly follow the required DID document format. Refer to the example of the updateDocument() method for details.

Last updated