Ledger with HMY CLI

Download & Setup HMY

To interact with your Ledger device using the HMYC CLI, please click here to download and configure it first.

Interacting with Ledger

When using Ledger with HMY CLI, the only difference here is that you have to add parameter --ledgeron every command.
With that in mind, you can run any other command via HMY CLI using your Ledger.
Make sure HMY CLI is being run with super user permissions when interacting with Ledger.
Below, are a few practical examples on how to interact with your Ledger device.

1. Displaying your Address

For example, if you want to show your Ledger address you would simply run:

Using the Binary:

1
./hmy keys list --ledger
Copied!

Using the Shell Wrapper:

1
./hmy.sh -- keys list --ledger
Copied!

2. Displaying your Balance

Using the Binary:

1
./hmy balances --node="<endpoint-address>" <ONE-address> --ledger
Copied!

Using the Shell Wrapper:

1
./hmy.sh -- balances --node="<endpoint-address>" <ONE-address> --ledger
Copied!

3. Sending Transactions

Using the Binary:

1
./hmy transfer --node="<endpoint_address>" \
2
--from <ONE_address> --to <ONE_address> \
3
--from-shard <shard> --to-shard <shard> \
4
--amount <amount> --chain-id <chain-id> --passphrase --ledger
Copied!

Using the Shell Script:

1
./hmy.sh -- transfer --node="<endpoint_address>" \
2
--from <ONE_address> --to <ONE_address> \
3
--from-shard <shard> --to-shard <shard> \
4
--amount <amount> --chain-id <chain-id> --passphrase --ledger
Copied!
For a complete reference of all commands available, please check the HMY CLI cookbook.
Last modified 1yr ago