Do not lose or share your 24 words with anyone. To prevent theft or loss of funds, it is best to keep multiple copies of your mnemonic stored in safe, secure places. If someone is able to gain access to your mnemonic, they will fully control the accounts associated with them.
Install the Cosmos Ledger application
Installing theCosmos application on your ledger device is required before you can use either Keplr or gaiad. To do so, you need to:
- Install Ledger Live on your machine.
- Using Ledger Live, update your Ledger Nano S with the latest firmware.
- On the Ledger Live application, navigate to the
Managermenu.
- Connect your Ledger Nano device and allow Ledger Manager from it.
- On the Ledger Live application, search for
Cosmos.
- Install the Cosmos application by clicking on
Install.
To see the
Cosmos application when you search for it, you might need to activate the Developer Mode, located in the Experimental features tab of the Ledger Live application.
Keplr + Ledger Nano
Note: You need to install the Cosmos app on your Ledger Nano before following this section- Connect your Ledger device to your computer, unlock it with the PIN and open the Cosmos app.
- Install the Keplr browser extension.
- Click on the Keplr extension icon and select
Import Ledgerand choose an account name and password. - Make sure your Ledger device is unlocked and has the Cosmos app open and then follow the instructions on the Keplr pop-up.
(Optional) Confirm your address
You can double check that Keplr is displaying the correct address directly on your Ledger Nano device. To do so:- Connect your Ledger to your computer and open the Cosmos application on the device.
- Once the Cosmos app is open, click on the right button to access the
Show Addressoption. - Click on both button, then select
Account 0andIndex 0.
Gaia CLI + Ledger Nano
Note: You need to install the Cosmos app on your Ledger Nano before following this section The tool used to generate addresses and transactions on the Cosmos Hub network isgaiad. Here is how to get started. If using a CLI tool is unfamiliar to you, scroll down and follow instructions for using the Keplr wallet instead.
Before you Begin
Verify that gaiad is installed correctly with the following commandAdd your Ledger key
- Connect and unlock your Ledger device.
- Open the Cosmos app on your Ledger.
- Create an account in gaiad from your ledger key.
Be sure to change the keyName parameter to be a meaningful name. The
ledger flag tells gaiad to use your Ledger to seed the account.>= 0 to choose the account for HD derivation):
Confirm your address
Run this command to display your address on the device. Use thekeyName you gave your ledger key. The -d flag is supported in version 1.5.0 and higher.
Connect to a full node
Next, you need to configure gaiad with the URL of a Cosmos full node and the appropriatechain_id. In this example we connect to the public load balanced full node operated by Chorus One on the cosmoshub-2 chain. But you can point your gaiad to any Cosmos full node. Be sure that the chain-id is set to the same chain as the full node.
To run your own full node locally read more here..
Sign a transaction
You are now ready to start signing and sending transactions. Send a transaction with gaiad using thetx send command.
Be sure to unlock your device with the PIN and open the Cosmos app before trying to run these commands
keyName you set for your Ledger key and gaia will connect with the Cosmos Ledger app to then sign your transaction.
confirm transaction before signing, Answer Y.
Next you will be prompted to review and approve the transaction on your Ledger device. Be sure to inspect the transaction JSON displayed on the screen. You can scroll through each field and each message. Scroll down to read more about the data fields of a standard transaction object.
Now, you are all set to start sending transactions on the network.
Receive funds
To receive funds to the Cosmos account on your Ledger device, retrieve the address for your Ledger account (the ones withTYPE ledger) with this command:
Further documentation
Not sure whatgaiad can do? Simply run the command without arguments to output documentation for the commands in supports.
The Or to print the
gaiad help commands are nested. So $ gaiad will output docs for the top level commands (status, config, query, and tx). You can access documentation for sub commands with further help commands.For example, to print the query commands:tx (transaction) commands:The Cosmos Standard Transaction
Transactions in Cosmos embed the Standard Transaction type from the Cosmos SDK. The Ledger device displays a serialized JSON representation of this object for you to review before signing the transaction. Here are the fields and what they mean:chain-id: The chain to which you are broadcasting the tx, such as thegaia-13003testnet orcosmoshub-2: mainnet.account_number: The global id of the sending account assigned when the account receives funds for the first time.sequence: The nonce for this account, incremented with each transaction.fee: JSON object describing the transaction fee, its gas amount and coin denominationmemo: optional text field used in various ways to tag transactions.msgs_<index>/<field>: The array of messages included in the transaction. Double click to drill down into nested fields of the JSON.