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:

./hmy keys list --ledger

Using the Shell Wrapper:

./hmy.sh -- keys list --ledger

2. Displaying your Balance

Using the Binary:

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

Using the Shell Wrapper:

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

3. Sending Transactions

Using the Binary:

./hmy transfer --node="<endpoint_address>" \
 --from <ONE_address> --to <ONE_address> \
 --from-shard <shard> --to-shard <shard> \
 --amount <amount> --chain-id <chain-id> --passphrase --ledger

Using the Shell Script:

./hmy.sh -- transfer --node="<endpoint_address>" \
 --from <ONE_address> --to <ONE_address> \
 --from-shard <shard> --to-shard <shard> \
 --amount <amount> --chain-id <chain-id> --passphrase --ledger

For a complete reference of all commands available, please check the HMY CLI cookbook.

Last updated