Troubleshoot issues that may arise while using the Veramo CLI for cheqd.
$ veramo config check -f agent.yml
Unable to create agent from ./agent.yml. Error creating @cheqd/did-provider-cheqd['CheqdDIDProvider']: Cannot find module '@cheqd/did-provider-cheqd'$npm list -g
/usr/local/lib
├── @cheqd/[email protected]
├── @veramo/[email protected]+6fbd22fa
└── [email protected]$ npm list
@cheqd/[email protected] /path/to/some/other/folder
├── @cheqd/[email protected]
├── @cheqd/[email protected]
├── ...
├── @veramo/[email protected]
├── @veramo/[email protected]
├── @veramo/[email protected]
├── @veramo/[email protected]
├── @veramo/[email protected]
├── ...$ veramo config check -f agent.yml
Your Veramo configuration seems fine. An agent can be created and the 'agent.execute()' method can be called on it.
/usr/local/lib/node_modules/@cheqd/did-provider-cheqd/node_modules/@cosmjs/crypto/build/bip39.js:2137
throw new Error(`Invalid word count in mnemonic (allowed: ${allowedWordsLengths} got: ${words.length})`);Setup your Veramo CLI to start using cheqd's identity functionality, including Decentralized Identifiers (DIDs), Verifiable Credentials and DID-Linked Resources (DLRs).
did-provider-cheqd packageagent.yml configuration fileagent.yml file in an editor to customise the configagent.yml file and exitrpc.cheqd.networknpm i @veramo/cli@latest -gveramo -v
x.x.xnpm install @cheqd/did-provider-cheqd@latest -gnpm list -gwget -c https://raw.githubusercontent.com/cheqd/did-provider-cheqd/main/agent.ymlnano <path/to/>agent.yml$ veramo config gen-key
X25519 raw private key (hex encoded):
4a5aeb56c7956dd6f3312e7094130a03afc060b95621fa3a86577aaf2b67cc1d
You can use this key with @veramo/kms-local#SecretBox
or replace the default agent.yml 'dbEncryptionKey' constantdid-cheqd-resolver:
$require: '@cheqd/did-provider-cheqd?t=function&p=/cheqd#getResolver'
$args:
- url: 'https://resolver.cheqd.net/1.0/identifiers/'# DID resolvers
didResolver:
$require: '@veramo/did-resolver#DIDResolverPlugin'
$args:
- resolver:
$require: did-resolver#Resolver
$args:
- key:
$ref: /did-key-resolver
# cheqd:
# $ref: /did-cheqd-resolver
cheqd:
$ref: /universal-resolver# did-cheqd-resolver:
# $require: '@cheqd/did-provider-cheqd?t=function&p=/cheqd#getResolver'
# $args:
# - url: 'https://resolver.cheqd.net/1.0/identifiers/'universal-resolver:
$require: '@veramo/did-resolver#UniversalResolver'
$args:
- url: https://dev.uniresolver.io/1.0/identifiers/# DID Manager
didManager:
---
defaultProvider: did:cheqd:testnet
providers:
did:cheqd:mainnet:
$require: '@cheqd/did-provider-cheqd#CheqdDIDProvider'
$args:
- defaultKms: local
cosmosPayerMnemonic: <your_cosmos_mnemonic_paying_for_did_txs>
networkType: mainnet
rpcUrl: 'https://rpc.cheqd.net'
did:cheqd:testnet:
$require: '@cheqd/did-provider-cheqd#CheqdDIDProvider'
$args:
- defaultKms: local
cosmosPayerMnemonic: <your_cosmos_mnemonic_paying_for_did_txs>
networkType: testnet
rpcUrl: 'https://rpc.cheqd.network'$ 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.