gaiad v28.3.1. It is about wallet keys only: a validator’s consensus key is not a Ledger key. Signing blocks from a hardware module is covered on Remote signing.
What the device holds
A Ledger generates a 24-word mnemonic at setup and derives keys from it on the device (HD wallets). The Cosmos app on the device derives Cosmos Hub keys atm/44'/118'/<account>'/0/<index>. It shows the address on screen, and it signs transactions after you review them on screen. The computer only sees public keys and signatures. The same mnemonic restored on another Ledger, or typed into gaiad keys add --recover, yields the same addresses. That is the recovery path if the device is lost.
Keep the device firmware and the Cosmos app current through Ledger Live. Signing newer message types fails on an old app.
Install the Cosmos app
The Cosmos app is installed from Ledger Live’s catalog in four steps. It is required before either Keplr orgaiad can talk to the device.
- Install Ledger Live (
https://www.ledger.com/ledger-live). Set up or restore the device following Ledger’s guide (https://support.ledger.com/article/360007988874-zd). - Update the firmware if Ledger Live offers it (
https://support.ledger.com/article/360013713840-zd). - Open My Ledger in Ledger Live. Connect and unlock the device, then allow the connection on the device.
- Search the app catalog for Cosmos and install it. The Cosmos app is in the public catalog, so no developer mode is needed.
https://github.com/cosmos/ledger-cosmos. Ledger’s own page for the Cosmos app is https://support.ledger.com/article/4411149814417-zd.
Keplr with Ledger
Keplr connects to the device directly from its hardware wallet import flow. The only check worth doing afterwards is comparing the address on the device with the one Keplr shows.- Connect and unlock the device and open the Cosmos app on it.
- Install the Keplr extension (
https://www.keplr.app/). Choose to connect a hardware wallet, and pick Ledger. - Follow the prompts. Keplr reads the public key from the device and shows the
cosmos1...address. - Confirm the address on the device. In the Cosmos app choose Show Address with account 0 and index 0, and compare it with what Keplr shows. A mismatch means Keplr is using another path. Check its advanced import settings.
https://docs.keplr.app) covers the wallet side, including delegating and voting from the extension.
gaiad with Ledger
Thegaiad binary must be built with the ledger build tag. Default source builds include it. The Linux release binary and the container image do not: they are static musl builds that report netgo,muslc. Check with gaiad version --long, which lists the tags under build_tags. On Linux, build from source to use a Ledger. Connect and unlock the device and open the Cosmos app. Then store a reference to the device key in the keyring:
--ledger flag asks the device for the public key at the default path. It stores that public key as a key of type ledger. No private material is written. The --account and --index flags select other paths. The keys show -d command displays the address on the device screen so you can confirm the keyring entry matches. If the command fails with failed to generate ledger key, the device is locked, the Cosmos app is not open, or another program (Ledger Live or a browser extension) holds the USB connection.
Signing works like any other key. The gaiad command detects the key type and sends the transaction to the device in the amino JSON form the Cosmos app displays:
--generate-only, tx sign) and multisig membership work with a Ledger key the same way as with a local key (gaiad reference). Pass --sign-mode amino-json to tx sign if it reports an unsupported sign mode for the device.
What the device shows
The Cosmos app displays the fields of the signed document:chain_id, account_number, sequence, fee, memo, and each message with its type and fields (for a delegation: delegator, validator, and amount). The device can show either the full expanded view or a short view. Approve only after the message fields match what you intended to send.
Troubleshoot
Nearly every failure comes from the device being locked, the Cosmos app being closed or old, or a path mismatch between tools.failed to generate ledger keyorLedgerHID device not found: unlock the device, open the Cosmos app, and close Ledger Live and browser tabs that may be holding the USB connection. Then retry.ERR_UNKNOWN_DATAor the app rejects the transaction: the Cosmos app on the device is older than the message type being signed. Update it in Ledger Live and retry.- Keplr shows a different address than
gaiad keys show: the two tools used different paths. Compare--accountand--indexwith the account settings in Keplr. - A transaction sent with
--generate-onlyon another machine will not sign: the device needs the amino JSON form, so sign with--sign-mode amino-json.
Verify
Next
- HD wallets for the path arithmetic behind
--accountand--index. - Delegator CLI guide for the transactions to send with the device.
- Delegator security for custody and phishing guidance.