Skip to main content

Ledger

Ledger offers a hardware wallet to hold user's private keys.

Checklist

Introduction

Ledger's hardware wallets are cryptocurrency wallets that are used to store private keys offline.

“Hardware wallets are a form of offline storage. A hardware wallet is a cryptocurrency wallet that stores the user's private keys (a critical piece of information used to authorize outgoing transactions on the blockchain network) in a secure hardware device.” Investopedia

Installation

Ethereum Ledger App

If you want to connect to HAQQ mainnet and HAQQ testnet, you can use the Ethereum Ledger app on Ledger Live by setting the chain ID.

First, you will need to install the Ethereum Ledger app by following the instructions below:

  1. Open up Ledger Live app on your Desktop
  2. Select Manager from the menu
  3. Connect and unlock your device (this must be done before installation)
  4. In the App catalog search for Ethereum (ETH) and click Install. Your Ledger device will show Processing and once the installation is complete, the app will appear on your Ledger device

In the Ledger Live app, you should see the Ethereum app listed under the Apps installed tab on the Manager page. After the app has been successfully installed, you can close out of Ledger Live.

Chain IDs

In the table below you can find a list of Chain IDs to use with the Ethereum Ledger app.

NetworkEIP155 chain ID
HAQQ Mainnet11235
HAQQ Testnet54211

Import your Ledger Account

Metamask

Now that you've installed the app on Ledger Live, you can connect your Ledger to your computer and unlock it with your PIN-code and open the Ethereum app.

Note

Follow our Metamask Guide to add the HAQQ Mainnet and Testnet to your Settings

Now you can import your Ledger account to MetaMask by using the following steps:

  1. Click on connect hardware wallet

mm1.png

  1. Select Ledger hardware wallet

mm2.png

  1. Select your connected Ledger Device

mm4.png

  1. Import the hex addresses that you want to use

mm3.png

Keplr

Reference the Keplr Wallet to setup Ledger support.

HAQQ CLI

To use your Ledger with the HAQQ CLI, first connect your device to your computer, unlock it using your PIN, and open the Ethereum app.

Then, connect your Ledger to the CLI with keys add command, and select a name for your device:

haqqd keys add NAME --ledger

Example:

haqqd keys add myledger --ledger

- address: haqq1hnmrdr0jc2ve3ycxft0gcjjtrdkncpmmkeamf9
name: myledger
pubkey: '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"A19Ty8NGmXQj/oQ+LubST9eDIhEACmWXW6gdU8h60eXI"}'
type: ledger

To sign any transaction, simply append --from myledger to the end of the command to indicate that the Ledger account should be used to authenticate the message:

Example:

haqqd tx bank send myledger haqq1hnmrdr0jc2ve3ycxft0gcjjtrdkncpmmkeamf9 100000aislm --fees 2000aislm --from myledger

Now, you can use your Ledger as you would normally interact with the CLI.

EIP712 signing

In order to sign Cosmos transactions (staking, voting on proposals, IBC transfers), with Ledger hardware wallets, we implemented EIP712.

EIP712 means that the signer will generate a signature for something like a JSON representation of the Cosmos transaction and that signature will be included in the Cosmos transaction itself.

Ledger signing

If you have a Ledger connected to Metamask, you need to use it to sign the message.

The Ledger device will display the domain hash and message hash before asking you to sign the transaction.

hw_01.jpg

hw_02.jpg

hw_03.jpg

hw_04.jpg

Broadcast the transaction

After signing the message, that signature needs to be added to the cosmos transaction and broadcasted to the network.

This step should be done automatically by the same service that generated the message, in this case, app.haqq.network will broadcast the transaction for you.

txsent.png

Common errors

  • Make sure that the Ethereum Ledger app is installed. The Cosmos Ledger app is not supported on the HAQQ chain at the moment (see FAQ).
  • Make sure you have created at least one Ethereum address on the Ledger Ethereum app.
  • Make sure the Ledger device is unlocked and with the Ledger Ethereum app opened before starting the importing process.

Known issues

  • The denomination displayed as ETH when importing the wallet because we are using the Ethereum app.
  • If you have Metamask correctly configured, the balance on the extension will be displayed as HAQQ, but on the Ledger device it will be displayed as ETH.
warning

IMPORTANT: Make sure you are on the correct network before signing any transaction!

FAQs

How can I generate Cosmos secp256k1 keys with Ledger?

Cosmos secp256k1 keys are not supported on HAQQ with Ledger. Only Ethereum keys (eth_secp256k1) can be generated with Ledger.

My Ledger has trouble connecting or signing on the CLI

The Ledger's connection to the CLI can fail for a number of reasons. Make sure to close any other apps using the Ledger (such as Ledger Live or Metamask), unlock the Ledger, and open the Ethereum app. If this does not work, simply disconnecting and reconnecting the device often solves the issue.

I can’t use Metamask or Keplr with the Cosmos Ledger app

Since HAQQ only support Ethereum keys and uses the same HD (hierarchival determination) wallet derivation path as Ethereum, the Cosmos Ledger app doesn’t work to sign cosmos transactions. Using Keplr with the Cosmos Ledger app will only work with derivation path m/44'/118'/0'/0 (Cosmos) and not m/44'/60'/0'/0 (Ethereum). On your Ledger hardware device, you can always switch to Ethereum to reconnect to the Keplr HAQQ network.