How to use the Ledger with the Accumulate CLI

This guide will show you how to set up Accumulate Ledger CLI for a few operations like sending tokens, adding Accumulate credits, generate a faucet. Etc.

Clone the accumulate cli repo

git clone https://gitlab.com/accumulatenetwork/core/wallet.git

Enter Accumulate folder

cd wallet

Run Accumulate CLI

go run ./cmd/accumulate

Build Accumulate CLI

go build ./cmd/accumulate

Make the project

make

Make sure you plug in your Ledger device at this stage

Run make Accumulate command

make accumulate

Install go in accumulate folder

go install ./cmd/accumulate

Ledger device

  • On your ledger Device,

  • Open the Accumulate app.

  • If the Accumulate ledger app was sideloaded the app will show app is not genuine. Press the right button till you see, Open application. However, the app store version will not show this.

  • Then press both buttons to open the application.

  • You will see Accumulate is ready.

Accumulate is ready

Scan for a Ledger device using the CLI

Note: The Accumulate ledger app must be open and your device unlocked.

The above command will scan the USB port(s) for ledger devices and return an output similar to the following:

The Wallet ID will reference the device, representing the first Accumulate lite address.

Send token to a lite account.

In this section, you will learn how to send a token to a lite account using the Accumulate Ledger CLI.

Version 1.0 of the app only supports Send Tokens and Add Credits.

Run all your commands in the accumulate folder

To send a token, you need to follow the steps below.

  • Generate a Ledger key.

  • Generate a faucet.

  • Add credit to your Accumulate Ledger wallet ID.

  • Send token.

1. Generate the Ledger key

This will store the public key along with the derivation path & wallet id in the wallet database.

Syntax

Command

After running the command above, your Ledger device will prompt you to Review Key Information.

Confirm Key Name
  • Press the right button till you see, Approve.

  • Then press both buttons to approve the request.

  • Now, you will see Accumulate is ready.

The above command will return an output similar to the following on your Accumulate Ledger CLI:

Congratulations 🥳🥳👏👏🥳👏🥳👏🥳, Accumulate CLI is ready for use. Your key is now registered with the CLI and from this point forward, you can perform transactions using the ledger simply by referencing the registered key name or public key.

Your wallet id is also known as your lite account. You will add/ACMEat the end of the wallet id acc://1336bbe9ab0de46cbf2cbe539697ed0f654a0fddfefe8455/ACME

4. Add credit

This command will add credit to your lite account.

Make sure your Accumulate app is opened on the Ledger device.

Syntax

Command

After running the above command, your Ledger device will prompt you to Review Add Credits.

  • Press the left button till you see, Approve.

  • Then press both buttons to approve the request.

The above command will return an output similar to the following:

5. Send tokens

This command will send a token from one lite account to another.

Syntax

Command

After running the above command, your Ledger device will prompt you to Review Send Tokens.

  • Press the left button till you see, Approve.

  • Then press both buttons to approve the request.

The above command will return an output similar to the following:

Get token balance

The get token command will query the balance to check the token balance of a Lite Token Account. The Token URL in the output specifies the type of Token.

Syntax

Command

The above command will return an output similar to the following:

Last updated

Was this helpful?