user-guide

User guide

This guide assumes that you have aecli installed and you checked the Quick start.

Table of Contents

Account commands

The account (wallet) commands are those which create and report on key pairs, and sign transactions, messages. To perform transactions within aeternity, you need to have at least two wallets with some coins on their accounts.

Use aecli account create to create a new wallet. You can specify a password for accessing your wallet or just press Enter if you do not want to set a password. The wallet is created at the specified path.

Alternatively, you can pass the secret key in [secretKey] argument to generate a corresponding wallet.

View the address (public key) of your wallet using aecli account address command. Also, it can be used to reveal your secret key.

The name group

With the aeternity naming system (AENS), you can assign and register a name to your account or oracle. This way, instead of a complex hash, you can use a name you choose. These names have an expiration period, after which the name will no longer belong to anyone, so it can be claimed again. For more information, see Aeternity Naming System docs.

The name group consists of the following commands.

Use aecli name full-claim to create and register a name for your account.

After that, you can use aecli name update command to set a name pointer. You can assign the name to another account via pointers, you will still have the right to do other operations with this name.

Don't forget to run aecli name extend from time to time to don't lose access to your name. By default name TTL gets extended to one year, it can't be extended for a longer period.

You can transfer a name to another account or contract, just indicate another account's address. You will pass all rights regarding the name to another account.

At last, you can revoke your name using aecli name revoke. The revoked name can be claimed again after a fixed timeout of 2016 blocks (~ 4 days).

The contracts group

A smart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract. Smart contracts allow the performance of credible transactions without third parties. These transactions are trackable and irreversible. Smart contracts aim to provide security that is superior to traditional contract law and to reduce other transaction costs associated with contracting.

The contracts group consists of the following commands.

deploy

Here is an example contract that we will deploy

To deploy a contract, run aecli contract deploy adding a file that should be compiled.

call

To execute a function of the contract, run aecli contract call command. sum is a function which is executed by this contract, [1, 2] are arguments of this function:

In the above, the "Return value (decoded)" is a result of contract execution — it is a sum of values 1 and 2.

The chain group

These commands display basic information about the blockchain and require little explanation. play moves backward through the blockchain displaying blocks and transactions.

Inspect command examples

The inspect command allows you to see inside various æternity types. Because each æternity type starts with two letters identifying what sort of thing it is, you can throw anything you like at inspect, and it will bravely try to do the right thing.

inspect account by address

inspect transaction

inspect block

Offline signing

One of aecli use cases is offline signing. It requires the below steps.

  1. prepare a transaction using transaction builder on any device;

  2. optionally run aecli inspect to verify the generated transaction before signing on offline device;

  3. sign the transaction by aecli account sign on offline device;

  4. broadcast signed transaction using aecli chain broadcast on a device connected to the internet.

Last updated

Was this helpful?