Sending Tokens from a Lite Token Account via CLI
This guide will show you how to send tokens from a Lite Token Account (LTA) with the CLI
Lite Accounts are a ‘lite’ version of ADIs that may appeal to users who want to send and receive tokens and maintain a record of their token accounts and transactions despite their comparatively limited utility and flexibility. For more information, see the Lite Account Deep Dive section.
Lite token accounts can send transactions to other users by specifying the recipient's address and the number of tokens to be transferred. This article provides a general overview of sending a transaction using a lite token account.
Requirements:
You need basic knowledge of CLI
You need to understand Accumulate CLI Setup
You need basic knowledge of Git
Your account connects to the accumulate mainnet by default. If you want to connect to the testnet, append this flag and argument to every command you run: -s https://testnet.accumulatenetwork.io/v2
1: Generate a lite account
The first step is to create a lite token account using the account generate command.
This command will create an account URL and the corresponding public key stored locally on your computer.
If you are on Windows, you must use ./accumulate.exe instead.
Once you run the command, you should get an output with the address for your token account. It will look something like the following:
2: Fund your account
If you are on testnet, you can use the built-in faucet. The faucet account will broadcast the existence of your new account and give you some free tokens.
This command only exists on testnet. For Mainnet users, you will need to purchase ACME or receive some from a friend.
Syntax
Example
The above command will return an output similar to the following:
3: Send Credits
Credits are payments made by users to compensate for the computing energy required to process and validate transactions on the Accumulate protocol.
To send ACME tokens to another account, you need to purchase credits with ACME and send them to a recipient.
Check this link to view the Base Fees for different transactions.
To send credits to your lite account, run the example command in your terminal.
The command below gives your accumulate URL access to send credits to another lite account.
Syntax:
Example
The above command will return an output similar to the following:
4: Check your Balance
Check the account balance to see how many tokens you have received from the faucet. Then, use the account get command.
Syntax
Example
The above command will return an output similar to the following:
To get it in a JSON format, use this -j
flag.
The above command will return an output similar to the following:
5: Send Tokens
Let's try sending some ACME tokens from one account to the other. You can use the account we already funded as the sending account, then create an additional account to receive the tokens.
To send the tokens, use the command below.
Syntax:
Example:
The above command will return an output similar to the following:
6: Get Transaction Hash:
Finally, let's make sure that the transaction was successful. You will use the tx get command to do that and pass in the transaction id txid that you received in the response output from step 5.
Syntax:
Example:
The above command will return an output similar to the following:
Last updated