CLI reference

All the commands available via the Command Line Tool are documented below

Lite Token Account/Lite Identity Creation

This command will generate a new account URL for you.

Syntax

./accumulate account generate

Command

./accumulate account generate

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

lite identity        :       0143b52490530b90eef9b1a2405e322c6badc1e90e200c56
lite token account    :       acc://0143b52490530b90eef9b1a2405e322c6badc1e90e200c56/ACME
public key      :       03c633851507f63ef8517dc934075f2abe2f8c3b3053b5a49a477e8513e01955
key type        :       ed25519

Account List

This command will get the list of accounts.

Command

./accumulate account list

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

key name : 001846c0a1590675fd0ad816ab4873387ef127cd9b307c24
lite account : acc://001846c0a1590675fd0ad816ab4873387ef127cd9b307c24/ACME
public key : 3615e429b89fa3d6b636412d7a17b13cc321c14b2f2e5bf520868c9617401845
key type : legacyED25519
key name : 003df7b8b865b3eda520dbb224eaf7536ee98cc25874ce54
lite account : acc://003df7b8b865b3eda520dbb224eaf7536ee98cc25874ce54/ACME
public key : 45090e7cfa0edd52db7181fa0a30f1da8d2c0b1bdc6b4847de75fe922ad9e755
key type : ed25519

Faucet Transaction

The Test Faucet can be used to add test ACME tokens to a Lite Token Account. The Sponsor of the transaction is the Test Faucet address that holds Test ACME. (acc://7117c50f04f1254d56b704dc05298912deeb25dbc1d26ef6/ACME):

Syntax

Command

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

The Transaction Hash is a hash of the transaction without signatures and the Signature Hash is the Transaction Hash with the Signature appended to it and hashed.

TX Get Transaction Hash (TXID)

To query a transaction by the transaction ID a tx get command is required

Syntax

Command

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

TX Get Signature Hash

To query the transaction hash from the Faucet account transaction:

Syntax

Command

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

Synthetic TX Get

To query the synthetic transaction from the Faucet Account transaction

Syntax

Command

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:

Key

A named key can be generated using the key generating function. This will also output the public key's name and key type. Unless specified otherwise, this will create an ed25519 key. If you are creating an ADI DO NOT use a key other than an ed25519 key. Support for this will be added in the future.

Syntax

Command

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

Bitcoin

This command will sign an Accumulate transaction using the Bitcoin signature algorithm

Syntax

Command

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

Bitcoin Legacy

This command will sign an Accumulate transaction using the Bitcoin signature algorithm

Syntax

Command

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

Ethereum

This command will sign an Accumulate transaction using the Ethereum signature algorithm

Syntax

Command

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

Factom (RCD1)

This command will sign an Accumulate transaction using the Factom signature algorithm

Syntax

Command

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

Key Import Mnemonic

This command imports the key using the mnemonic phrase

Syntax

Command

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

Key Import Factoid

This command imports the key using the mnemonic

Syntax

Command

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

Key Import Lite


Syntax

Command

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

Key Export All

Syntax

Command

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

Key Export Private

Syntax

Command

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

Key Export Mnemonic

Syntax

Command

Key Export Seed

Syntax

Command

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

Key Label

Syntax

Command (assign)

The above command will return an output similar to the follow

Command (rename)

The above command will return an output similar to the follow

Command (remove)

The above command will return an output similar to the follow

Wallet

Export - Export Wallet Details ./accumulate export "C:\filepath\myaccounts.json" Check the file path and open the json file to view its contents Init - Import secret factoid key from terminal input ./accumulate wallet init create ./accumulate wallet init import Enter mnemonic : Serve - run wallet service daemon

./accumulate wallet serve

Credits

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 or Key Page, run the example command in your terminal

Adding Credits to a Lite Token Account/Lite Identity.

This command adds credit to your lite token account/lite identity.

Syntax

Command

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

Use the TX History command to see prior transactions

This command gets the list of your transactions using a range of numbers.

Syntax

Command

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

Oracle

To explicitly query the oracle to see the current price of ACME and the number of credits per ACME:

Syntax

Command

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

Lite Data Accounts

Lite Data Accounts are an extension of the Factom Protocol, which will be used to transition data from Factom to Accumulate.

Lite Data Account Creation from Lite Token Account/Lite Identity

This command creates a new lite data account from a lite token account.

Syntax

Command

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

Lite Data Account Creation from ADI

This command creates a new lite data account from an ADI

Syntax

Command

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

Writing to a Lite Data Account

This command writes to an Accumulate lite data account

Syntax

Command

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

Querying a Lite Data Account by URL

This command **** returns a lite data account by url.

Syntax

Command

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

Querying a Lite Data Account by URL and a Specific Entry Hash

This command returns a lite data account by using the url and entryhash.

Syntax

Command

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

Querying a Lite Data Account by URL and Index

This command returns a lite data account by using the url and index.

Syntax

Command

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

ADI Creation from a Lite Token Account:

This command creates an ADI from a lite token account.

Syntax

When public-key one is specified, it will be assigned to the first page. Otherwise, the origin key is used.

Command

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

ADI Creation from an ADI

This command creates ADI from another ADI.

Syntax

Command

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

ADIs can also be created using the following accounts as principals for the transaction: ADI Data Account, ADI Token Account, ADI Token Issuance, and a Sub-ADI and its Accounts.

ADI Creation from a Sub-ADI

This command creates ADI from a sub-ADI.

Syntax

Command

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

ADI Creation from a Sub-Sub-ADI

This command creates ADI from a sub-sub-ADI.

Syntax

Command

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

ADI Directory

This command returns the list of your ADI directory.

Syntax

Command

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

ADI List

To see a list of ADIs created and the initial Key specified for Key Page 1

ADI Get

An ADI get returns the ADI URL, as well as the Key Book, generated during the creation of the ADI.

Syntax

Command

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

Key Books

The Key Books store an ADI's Hierarchical Key Management Structure using Key Pages and Keys within those pages.

Get Key Book

This command returns the list of keybook

Syntax

Command

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

get Deprecated - use `accumulate get ...` fix in CLI

Create an Additional Key Book

An ADI can have multiple Key Books. To create an additional Key Book, a Public Key Hash or Key Book URL must be specified for the purpose of signing the transaction. A new public key or key name should be added to the new book.

Syntax

Command

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

Key Pages

A Key Page has entries that define the parties required to sign a transaction. If you have the same Key in multiple Key Pages you must explicitly specify the page using [email protected]/book/(page number).

Get Key Page

This command returns the list of key pages.

Syntax

Command

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

Adding Credits to a Key Page

An ACME token account must be referenced when adding credits to a Key Page. This can either be a Lite Token Account or an ADI Token Account.

Syntax

Command

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

Adding Additional Key Pages to a Key Book

A new Key Page can be added to a Key Book where public keys or key names can be specified. In the example below 3 keys were added to the new Key Page (Key1, Key3, and Key4. Due to this being the 2nd Key Page, the Key Page URL would be acc:/DefiDevs.acme/Keybook/2.

Syntax

Command

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

Adding a Key

Syntax

Command

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

Query Page

A get command will query the Key Page to show the new key that has been added.

Syntax

Command

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

Removing a Key

This command removes a key from a keypage.

Syntax

Command

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

Updating a Key of another party

This command updates a key in a key **** page and requires the page threshold to be met.

Syntax

Command

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

Updating your own Key

This command updates your own key in a key **** page and doesn't require the page threshold to be met.

Locking/Unlocking a Key page

This command is used to lock a Key page. This prevents "update" operation to a key page.

Syntax

Command

Output

To verify a locked key page

To verify the locked key page, retrieve the value of key page. The following entry should be present in output.

"transactionBlacklist":["updateKeyPage"]

This command is used to unlock a Key page.

Syntax

Command

Output

Setting a Threshold for a Key Page

By default, setting a threshold for a Key Page, the m of n will be 1 of 1. Because of this, any entry within the Key Page can update the signature threshold. In the example below, the number of Keys within acc://DefiDevs.acme/Keybook/2 is 3. Setting the threshold at two means that 2 of 3 signatures are required for the transaction to be processed.

Syntax

Command

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

Multi-Signature Transactions

A multi-signature transaction is defined by the signature threshold for a given Key Page. As a note, to sign with multiple keys at once you can add the --sign-with flag with a list of keys to a transaction.

Multi-Signature Transactions

A multi-signature transaction is defined by the signature threshold for a given Key Page. In the following examples, a new Key will be added to a Key Page using a multi-signature transaction.

Syntax

Command

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

Pending Transaction

A pending transaction can be queried to see the status.

Syntax

Command

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

Sign Transaction Hash

The second signer signs the transaction hash of the first transaction in the multi-signature sequence. If there are additional signers, they sign the same transaction hash.

Syntax

Command

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

Signing with a Delegate

If a Delegate is specified in a Key Page Entry, the Delegate can use any entry within its Key Book to sign a transaction. If the Delegate is of a different ADI (remote), the signing key must be specified using [keyname@adiname/keybookname]. In the example below, the Delegate is remote.

Syntax

Command

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

Adding a Delegate to a Key Page

Syntax

Command

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

Sign Transaction with Delegate

Syntax

Command

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

Updating a Delegate and Public Key Hash of a Key Page Entry (Signing with a Delegate)

Syntax

Command

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

Removing a Delegate and Public Key Hash of Key Page Entry

Syntax

Command

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

Key Book Authorities

An ADI and its accounts have a set of Key Books which manages the signers for that Account. When a Key Book Authority is added to an Account, the Key Book signs a transaction hash to approve its addition. The --auth flag can be added when creating an account to add multiple authorities at once.

Add an Authority

When adding an Authority, the Authority must sign the transaction hash to approve its addition.

Syntax

Command

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

Disable an Authority

To disable an Authority, the Authority you are disabling must sign the transaction for approval.

Syntax

Command

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

Enable an Authority

Enabling a Disabled Authority also requires a signature from the Disabled Authority.

Syntax

Command

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

Remove an Authority

Whether a Key Book is enabled or disabled, updating the authority set requires a signature from the Key Book being removed.

Syntax

Command

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

Create Sub-ADI and Sub-Sub-ADIs

A Sub-ADI is an ADI created within an ADI. An example could be an organization that creates an ADI and different departments within the origination are Sub-ADIs.

Syntax

Command

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

Adding Credits to a Sub-ADI Key Page

Syntax

Command

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

Create a Sub-Sub-ADI

In the example below, the Origin ADI URL is the Sub-ADI and the ADI URL to create is the Sub-Sub-ADI

Syntax

Command

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

ADI Token Account

An ADI can have different account types such as an ADI Token Account. An ADI can have multiple ADI Token Accounts, but each ADI token account can only hold one type of token such as ACME, Accumulate’s native token.

Token Account

Sender/Receiver

Lite Token Account

ADI Token Account

Sub-ADI Token Account

Lite Token Account

X

X

X

ADI Token Account

X

X

X

Sub-ADI Token Account

X

X

X

This matrix doesn’t capture sub-sub ADI token accounts and sub-sub-sub ADI Token accounts etc.

Create an ADI Token Account

The creation of an ADI Token Accounts requires Credits. These Credits must reside within the Key Page of the Key Book associated with the ADI Token Account. As per the fee schedule, 25 credits are required.

Syntax

Command

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

QR Codes

Within the CLI, QR codes can be generated for accounts such as an ADI token account.

Syntax

Command

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

Sub-ADI Token Account

Syntax

Command

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

Sending Tokens

Lite Token Account to Lite Token Account

From the matrix above, you can send tokens in multiple ways.

Syntax

Command

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

Lite Token Account to ADI Token Account

Syntax

Command

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

Lite Token Account to Sub-ADI Token Account

Syntax

Command

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

The signing Key used to sign ADI related token transactions must be specified.

ADI Token Account to Lite Token Account

Syntax

Command

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

ADI Token Account to ADI Token Account

Syntax

Command

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

ADI Token Account to Sub-ADI Token Account

Syntax

Command

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

Sub-ADI Token Account to Lite Token Account

Syntax

Command

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

Sub-ADI Token Account to ADI Token Account

Syntax

Command

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

Sub-ADI Token Account to Sub-ADI Token Account

Syntax

Command

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

Staking

Setup staking

Usage: accumulate staking convert [account] [flags]

Available Commands: convert Convert an existing token account into a staking account

Flags: --delegate url The account the stake should be delegated to -h, --help help for staking ****--rewards url Staking rewards account, if rewards should not be sent back into the staking account --type StakingType Type of staking account (pure, delegated, core-validator, core-follower, or staking-validator) (default inactive) --lockup Number of quarters stake will be locked (min. 2 max. 14) Delegated Staking Example:

./accumulate staking convert hello.acme/staking --delegate example.acme --rewards hello.acme/staking --type delegated --lockup 4 Password: ********************


Token Issuer

A Token Issuer defines the properties of a custom token to be issued such as the symbol and supply limit. When creating an ADI Token Account that will accept a custom token, the Token Issuer must be specified instead of acc://ACME. To create a Custom Lite Token account the Token Issuer must issue the tokens to the Lite Identity (URL without /ACME) with Token Issuer URL appended to the Lite Identity address.

Create a Token Issuer

Syntax

Command

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

Create a Custom ADI Token Account

Syntax

Command

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

Issuing Tokens

Syntax

Command

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

Creating a Custom Lite Token Account by Issuing Tokens to it

Append the Token Issuer Account to the Lite Token Account Address to receive custom tokens.

Command

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

Burn Tokens

Burn Tokens from a Lite Token Account

Syntax

Command

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

Burn Tokens from an ADI Token Account

A decimal value must be added (can be 0) when burning tokens

Syntax

Command

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

Create an ADI Data Account

Create an ADI Data Account

Syntax

Command

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

Write to an ADI Data Account

Syntax

Command

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

Querying an ADI Data Account by URL

Syntax

Command

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

Querying an ADI Data Account by URL and a Specific Entry Hash

Syntax

Command

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

Querying an ADI Data Account by URL and a Specific Index

Syntax

Command

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

Write to an ADI Data Account (Scratch Chain)

Write scratch data command:

Syntax

Command

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

Create a Sub-ADI Data Account

Syntax

The actor ADI is an AD or Sub-ADI

Command

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

Write to a Sub-ADI Data Account

Syntax

Command

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

Querying a Sub-ADI Data Account by URL

Syntax

Command

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

Querying a Sub-ADI Data Account by URL and a Specific Entry Hash

Syntax

Command

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

Querying a Sub-ADI Data Account by URL and a Specific Index

Syntax

Command

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

Write to a Sub-ADI Data Account (Scratch Chain)

Syntax

Command

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

How to allow anyone to write to a data account?

When an auth is "disabled" for a data account, anyone with valid signature can write into that account.

Steps:

  1. Disable auth

  2. Sign the transaction

  3. Write into data account by signing with any valid user.

Disable Auth

Sign the transaction

Write to data account

Minor Blocks

Syntax

The partition url is a BVN ADI, or a DN ADI

Command

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

Major Blocks

Syntax

The partition url is a BVN, ADI, or a DN ADI

Command

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

Block Validator Network Minor Blocks

Syntax

Command

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

Describe

Describe the Accumulate Node

./accumulate describe {"network":{"id":"DevNet","partitions":[{"basePort":26656,"id":"Directory","nodes":[{"address":"http://127.0.1.1:26656","type":"validator"}],"type":"directory"},{"basePort":26756,"id":"BVN1","nodes":[{"address":"http://127.0.1.1:26756","type":"validator"}],"type":"blockValidator"}],"subnets":[{"basePort":26656,"id":"Directory","nodes":[{"address":"http://127.0.1.1:26656","type":"validator"}],"type":"directory"},{"basePort":26756,"id":"BVN1","nodes":[{"address":"http://127.0.1.1:26756","type":"validator"}],"type":"blockValidator"}]},"networkAnchor":"0000000000000000000000000000000000000000000000000000000000000000","networkType":"directory","partitionId":"Directory","values":{"globals":{"feeSchedule":{"createIdentitySliding":[204800000,102400000,51200000,25600000,12800000,6400000,3200000,1600000,800000,400000,200000,100000]},"majorBlockSchedule":"0 */12 * * *","operatorAcceptThreshold":{"denominator":3,"numerator":2},"validatorAcceptThreshold":{"denominator":3,"numerator":2}},"network":{"networkName":"DevNet","partitions":[{"id":"BVN1","type":"blockValidator"},{"id":"Directory","type":"directory"}],"validators":[{"partitions":[{"active":true,"id":"Directory"},{"active":true,"id":"BVN1"}],"publicKey":"986511759eef5601701324cfa8961f99c3aad1dc62ef5932cbf63adc5e27a6b9","publicKeyHash":"aa157582befd1e5e150dbc4a0af48136e82a9b917b6f5af2ea5c732249ad4427"}]},"oracle":{"price":50000000},"routing":{"overrides":[{"account":"acc://ACME","partition":"Directory"},{"account":"acc://bvn-BVN1.acme","partition":"BVN1"},{"account":"acc://dn.acme","partition":"Directory"}],"routes":[{"partition":"BVN1"}]}}}\

Multiple operations in single transaction

Send tokens to multiple parties

User can "send tokens" to multiple parties in a single transaction as follows

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

Issue tokens to multiple parties

User can "issue tokens" to multiple parties in a single transaction as follows

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

Multiple updates to a key page

When a user wants to perform "update" operation on a key page and "add" a new key to a key page, he/she can perform both with a single transaction as follows

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

To validate the transaction

Multiple updates to a key page

When a user wants to perform multiple "updateAccountAuth" operation, he/she can perform them with a single transaction as follows

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

Last updated

Was this helpful?