did
In this tutorial, you will learn how to generate DIDs by generating randomized mnemonics and uploading the DID documents to the VDR via the interface.
Complete code example: zkid-sdk-example /src/did/createDID.ts
Tutorial
Initialize @noble cryptographic library and wasm;
Generate random mnemonics;
Generate DID through mnemonics;
In the process of generating DIDs from mnemonic, the controller key and the key pairs of two different verification methods need to be managed by keyring structure.
Upload DID Document to VDR;
Uploading a DID document to the VDR requires two steps. First of all, you need to use your own controller key to sign the DID document, and the signature-related information will be appended to the back of the DID document structure, and then initiate a request to the RESTful API interface to send the structure to the server for storage and processing, which will be deposited into the database with Arweave.
Well, through the above steps, you will have mastered how to generate a DID and store it into VDR.
Last updated