cosmos-sdk/docs/clients/ledger.md
Alexander Bezobchuk 2d92803b9f Merge PR #2040: Refactor Validator Account Types/Bech32 Prefixing
* Add new account bech32 prefixes with godocs

* Restructure spacing of existing account code

* Update account godocs

* More account godoc updates + new tm pub/addr helpers

* Update validator type to use new account types/bech32 prefixes

* Fix account documentation errors

* Update Bech32 prefix for consensus nodes

* Update Bech32 spec doc

* Fix account type tests

* Add missing account consensus functions, clear up godocs, and fix tests

* Add to TestRandBech32PubkeyConsistency check

* Update initialization of validator public keys

* Update query signing info command

* Implement new ConsAddress type with associated unit tests

* [WIP] Update stake and slashing parameters

* Update all calls to MustBech32ifyValPub

* [WIP] Validator operator API updates

* [WIP] Fix and update unit tests

* Fix gov logs (helping to debug failing tests)

* Fix gov tally

* Fix all broken x/ unit tests

* Update gaia app genesis address logic

* Fix linting errors

* Fix broken LCD tests

* Fix broken CLI tests

* Implement command to get validator address and pubkey from key name

* Add support for getting validator key information via REST endpoint

* Update PENDING log

* Update docs

* Revert GaiaGenTx.PubKey bech32 prefix

* Fix broken docs and cli tests

* Update genesis to use correct Bech32 (cons) prefix for pubkeys

* Update docs and unit tests to reflect new cosmos account bech32 prefix

* minor formatting
2018-08-31 00:06:44 -04:00

1.9 KiB

Ledger // Cosmos

Ledger Support for account keys

gaiacli now supports derivation of account keys from a Ledger seed. To use this functionality you will need the following:

  • A running gaiad instance connected to the network you wish to use.
  • A gaiacli instance configured to connect to your chosen gaiad instance.
  • A LedgerNano with the ledger-cosmos app installed
    • Install the Cosmos app onto your Ledger by following the instructions in the ledger-cosmos repository.
    • A production-ready version of this app will soon be included in the Ledger Apps Store

NOTE: Cosmos keys are derived acording to the BIP 44 Hierarchical Deterministic wallet spec. For more information on Cosmos derivation paths see the hd package.

Once you have the Cosmos app installed on your Ledger, and the Ledger is accessible from the machine you are using gaiacli from you can create a new account key using the Ledger:

$ gaiacli keys add {{ .Key.Name }} --ledger
NAME:	          TYPE:	  ADDRESS:						                                  PUBKEY:
{{ .Key.Name }}	ledger	cosmos1aw64xxr80lwqqdk8u2xhlrkxqaxamkr3e2g943	cosmospub1addwnpepqvhs678gh9aqrjc2tg2vezw86csnvgzqq530ujkunt5tkuc7lhjkz5mj629

This key will only be accessible while the Ledger is plugged in and unlocked. To send some coins with this key, run the following:

$ gaiacli send --from {{ .Key.Name }} --to {{ .Destination.AccAddr }} --chain-id=gaia-7000

You will be asked to review and confirm the transaction on the Ledger. Once you do this you should see the result in the console! Now you can use your Ledger to manage your Atoms and Stake!