Create a .json file (e.g. name it something like identity-keys-on-the-fly-with-did-docs.json in same working directory level).
Copy and paste the content from below into your newly created .json file. You can choose from any of the inputs and arguments below:
verificationMethod
Ed25519VerificationKey2020
JsonWebKey2020
Ed25519VerificationKey2018
methodSpecificIdAlgo
base58btc
uuid
network
mainnet
testnet
For example:
Then, instead of passing it as argument, we'll pass it as a file. Use command below to do it.
The above command will output something like this (i.e. a template DID DOC with the keys)
Then you can go back to your payload.json file (if you didn't have one you can simply create one manually, and paste content below as template) which should be something like this at first.
Then you're going to update keys and document section of it (payload.json) with keys and didDoc you generated in above step.
After populating keys and document section. Your payload.json file should look something like this:
Assuming you have enough ncheq tokens inside your wallet, you can now run the command below to create your DID.
If the above cmd resulted something like this:
Account does not exist on chain. Send some tokens there before trying to query sequence.
This means you don't have enough tokens in your wallet.
You can go to cheqd's testnet faucet to get your account some test tokens.
After successfully creating your DID, you should see something like this:
Notice, controllerKeyId is now the publicKeyHex you generated the firstly. i.e did is know associated to you via publickKeyHex or you're the controller of this the DID you created. 😄