Using the hardware wallet CLI
Overview
A hardware wallet is a physical ledger device that is used to store assets. Hardware wallets are protected by a seed phase, similar to software wallets, but they can be disconnected from the internet whenever they are ejected from your computer.
The DFINITY hardware-wallet-cli
tool is designed to integrate with Ledger Nano USB devices.
Prerequisites
Have a Ledger Nano device.
Download and install
Node.js
.
Ledger Nano device setup
Step 1: Connect your Ledger Nano device to your computer via USB.
Step 2: On the Nano device, select "Set up with Recovery phrase".
Choose a PIN. To connect your Ledger device to an Internet Identity, select "Recovery phrase with 24 words", then enter your Internet Identity's 24-word recovery phrase.
Step 3: On your computer, install Ledger Live from ledger.com and start it.
If offered to upgrade to a newer version then do so.
Step 4: Connect the Nano device to USB and, if necessary, unlock it with the PIN.
In Ledger Live, select "Manager" in the "Menu" column on the left. Confirm the access on the Nano device.
If prompted, upgrade the Nano device firmware.
Step 5: From within the Ledger Live "Manager" install the app called "Internet computer (ICP)" version >=2.0.6 onto your Nano device.
You can search for the app in the search bar by typing "ICP".
Installation
Open a terminal and run the command:
npm install -g @dfinity/hardware-wallet-cli
Usage
The hardware wallet CLI tool supports the following commands and options:
Commands:
info [options]
: Show the wallet's principal, address, and balance.icp
: Manage ICP tokens.neuron
: Manage neurons.sns
: Manage an SNS.icrc
: Manage ICRC tokens.node-provider
: Manage node providers.
Options:
--network <network>
: Specifies the IC network (local, mainnet). Default value is"https://ic0.app", env: IC_NETWORK
.--principal <principal>
: Specifies the derivation path to use for the principal.