Setting up Veramo CLI for cheqd
If you're looking to use the Veramo CLI with cheqd or develop a proof-of-concept application, use the official Veramo CLI setup guide.
Note: Depending on your system permissions, you might be prompted for additional permissions. Add
sudoto the beginning of the command in case that happens.
Verify the installation was correct. Command below should output latest version of veramo you installed.
did-provider-cheqdNPM package in a similar fashion:
You can check all of your NPM package versions by running the command:
npm list -g
agent.ymlfile that contains the configuration for cheqd network to be used with Veramo CLI.
You can do this in terminal through:
wget -c https://raw.githubusercontent.com/cheqd/did-provider-cheqd/main/agent.yml
You can open the
agent.ymlin a text editor/IDE of your choice to edit a few mandatory settings.
In terminal, you can edit the
agent.ymlfile using an editor like
Make sure you provide the actual relative/absolute path to the file.
By default, the
did-provider-cheqdpackage has a default SQLite database password, but it's a good idea to modify and change this to a new key unique to your install.
$ veramo config gen-key
X25519 raw private key (hex encoded):
You can use this key with @veramo/kms-local#SecretBox
or replace the default agent.yml 'dbEncryptionKey' constant
Take the key generated and replace the value under
In order to be able to read/query
did:cheqdentries from the ledger, you need to configure a REST API endpoint for a cheqd DID Resolver instance.
- url: 'https://resolver.cheqd.net/1.0/identifiers/'
The default value is set to
resolver.cheqd.net, which is an instance of the cheqd DID Resolver hosted by the cheqd team. This DID Resolver instance can handle requests for
did:cheqd:mainnetas well as
If you want, you can replace the
urlproperty with a different REST API endpoint for a different instance of the cheqd DID Resolver.
Note: This configuration is an advanced step and not recommended for most users. Skip it and continue to the next step in most cases, unless you know why you want to switch the resolver interface.
If you plan on interacting with multiple DID methods using Veramo CLI, you can alternatively query
did:cheqdusing a Universal Resolver instance instead. This allows your CLI configuration to handle any DID method supported by Universal Resolver.
Firstly, comment out the custom
did-cheqd-resolverentry and uncomment the
universal-resolverentry. This tells Veramo CLI to use the Universal Resolver interface for
# DID resolvers
# $ref: /did-cheqd-resolver
Also comment out this section for the
# $require: '@cheqd/did-provider-cheqd?t=function&p=/cheqd#getResolver'
# - url: 'https://resolver.cheqd.net/1.0/identifiers/'
Finally, uncomment and configure the
- url: https://dev.uniresolver.io/1.0/identifiers/
In order to add cheqd-testnet to your Keplr extension, please follow the following instructions:
Go to Axelar to add a custom network, then replace everything with cheqd-testnet json configuration below.
"chainName": "cheqd Testnet",
While reading/querying from the cheqd ledger incurs no cost, if you want to create/update a DID to cheqd ledger, you need to pay transaction fees for the ledger writes.
# DID Manager
- defaultKms: local
- defaultKms: local
You need to configure this in under
didManagersection as shown above, where you'll need to edit:
cosmosPayerMnemonic: Mnemonic associated with your cheqd/Cosmos SDK account. This is only stored locally, and the mnemonic is used to reconstitute the account address and keys used to pay for the transaction.
rpcUrl: For both
did:cheqd:mainnet:as well as
did:cheqd:testnet:sections, you can specify a Cosmos SDK RPC endpoint. This endpoint is where transactions are sent to. By default, this is populated with
rpc.cheqd.net(for mainnet) and
rpc.cheqd.network(for testnet), but you can can modify this to a different hosted RPC endpoint for cheqd or even your own local/private RPC endpoint.
defaultProvider: The default cheqd network is set to
did:cheqd:testnetto allow developers to test out network functionality. However, if you prefer, you can switch this out to
Make sure all your edits above are persisted and saved to a file that you can access.
Once you've completed Step 2 above, verify that your Veramo configuration is accurate using the following command. If your configuration is correct, you should get a success message like the one below.
$ veramo config check -f <path/to/>agent.yml
Your Veramo configuration seems fine. An agent can be created and the 'agent.execute()' method can be called on it.
config checkthrows an error, check out our troubleshooting guide for Veramo CLI setup to see common errors and fixes.
Now that your Veramo CLI installation is successfully set up to work with cheqd, try following our tutorials for creating a new DID or querying existing DIDs.