Deactivate an existing Decentralized Identifier (DID) using the cheqd Cosmos CLI.
The purpose of this document is to describe how an existing DID (and associated DIDDoc) can be deactivated using the cheqd-node Cosmos CLI.
NOTE: The procedures below are only recommended for development purposes!
Using
cheqd-nodeCosmos 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 production-grade CLI tools such as Veramo SDK for cheqd or look at our developer guide on how to integrate custom applications.
Learn how to
with cheqd Cosmos CLI
As in flow with we need to compile payload.json file with private key inside and pass it to the CLI. The resulting JSON in our example will look liks:
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
Note that each of cheqd's on-ledger identity transactions has a fixed fee, . If your account has insufficient balance the transaction will fail.
--chain-id: E.g., cheqd-testnet-6
--fees: Set to 10000000000ncheq, which is the fixed fee for deactivating a DID
{
"payload": {
"id": "did:cheqd:testnet:b0ca0b75-ca6a-4674-a261-45f6dd0c9c77"
},
"signInputs": [
{
"verificationMethodId": "did:cheqd:testnet:b0ca0b75-ca6a-4674-a261-45f6dd0c9c77#key1",
"privKey": "FxaJOy4HFoC2Enu1SizKtU0L+hmBRBAEpC+B4TopfQoyetOF5T68Ks3db5Yy9ykFdgEboPUes3m6wvXNLpbv+Q=="
}
]
}cheqd-noded tx cheqd deactivate-did <Payload_in_JSON> \
--from <cosmos_account> --node <url> --chain-id <chain> --fees <fee>cheqd-noded tx cheqd deactivate-did "payload.json" \
--from my_account --node http://rpc.cheqd.network:443 --chain-id cheqd-testnet-6 --fees 10000000000ncheq