Update a DID
Update an existing Decentralized Identifier (DID) using the cheqd Cosmos CLI.
Last updated
Was this helpful?
Update an existing Decentralized Identifier (DID) using the cheqd Cosmos CLI.
Last updated
Was this helpful?
The purpose of this document is to describe how an existing DID (and associated DIDDoc) can be updated using .
NOTE: The procedures below are only recommended for development purposes!
Using
cheqd-node
Cosmos CLI for real-world production usage is not recommended, since the identity keys are passed in raw form to the CLI. This is fine in development/testing usage, but is not recommend for mainnet.Developers are encouraged to use or look at .
Learn how to
with cheqd Cosmos CLI
Given this procedure below is intended for development/training purposes, we assume that the user stores their public/private keys safely during the DID creation process and has access to it.
Updating a DIDDoc requires the full updated DIDDoc to be sent. Only the updated/changed parts cannot be sent. This accounts for scenarios where the DIDDoc may have been updated on ledger, but the local copy is not synced with the latest changes.
Use a text editor like nano
to edit the body of the DIDDoc (the example below assumes it's saved in a file called payload.json
).
Send the updated DIDDoc to the ledger. This must be signed with the correct identity keys:
Payload_in_JSON
- previously compiled JSON.
--from
: Cosmos account key which will pay fees for the transaction to be written to ledger.
--node
: IP address or URL of node to send request to
--chain-id
: E.g., cheqd-testnet-6
--fees
: Set to 25000000000ncheq, which is the fixed fee for updating a DID
For example, we can and change the Service Endpoint from bar.example.com
to foo.example.com
:
As in flow with we need to compile payload.json
file with private key inside and pass it to the CLI. The result JSON in our example will look liks:
Note that each of cheqd's on-ledger identity transactions has a fixed fee, . If your account has insufficient balance the transaction will fail.