Skip to main content
These errors occur during key management, mnemonic handling, HD derivation, wallet encryption, and signing operations. They help diagnose issues with wallet setup and transaction signing.

Address Not Found in Wallet

Every wallet implementation throws this error when asked to sign for an address it does not hold:
This applies to Secp256k1HdWallet, DirectSecp256k1HdWallet, Secp256k1Wallet, DirectSecp256k1Wallet, and the Ledger signer. Fix: only sign for addresses returned by wallet.getAccounts().

Invalid Mnemonic

Thrown by EnglishMnemonic (and by extension all fromMnemonic factory methods) when the BIP-39 mnemonic is invalid — wrong word count, unknown words, or bad checksum:

HD Derivation Path Errors

Thrown by Slip10 when the derivation path is malformed:

Invalid Key Errors

Account Sequence Mismatch

Not a CosmJS-specific error, but a common chain-level rejection. When the sequence number in the signed transaction does not match the account’s current sequence on-chain, the node rejects it during CheckTx:
Fix: re-query the account sequence before signing, or avoid concurrent transactions from the same account.

Encryption / Decryption Errors

Wallet serialization uses XChaCha20-Poly1305 encryption. Deserialization throws when the password is wrong or the data is corrupted:
The only supported algorithm is xchacha20poly1305-ietf. Using anything else throws: