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 private key in [privkey] 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 private 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.
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.
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:
$ aecli contract call --descrPath contract.aes.deploy.5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV.json sum '[1, 2]' ./wallet.json
Transaction hash ________________________ th_urgozuZRooNXrZxuvNDdT4BiApcGKsf6ZRpffargXcoZNHQ4C
Block hash ______________________________ mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME
Block height ____________________________ 4 (about now)
Signatures ______________________________ ["sg_Vn2cCsMk8RvBKyNTKTbq8V4vm6beuHxfYA7vLBNLnRF3x9hoydWWAtNkaiix8KhyEFSLmsmTy6jz9Lps2TQqVdmH6qmCG"]
Transaction type ________________________ ContractCallTx (ver. 1)
Caller address __________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E
Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV
Gas _____________________________________ 31 (0.000000031ae)
Gas price _______________________________ 0.000000001ae
Call data _______________________________ cb_KxHrtMsKKwIE32Kmfg==
ABI version _____________________________ 3 (Fate)
Amount __________________________________ 0ae
Fee _____________________________________ 0.00018198ae
Nonce ___________________________________ 3
TTL _____________________________________ 7 (in 6 minutes)
----------------------Call info-----------------------
Gas used ________________________________ 25 (0.000000025ae)
Return value (encoded) __________________ cb_BvMDXHk=
Return value (decoded) __________________ 3
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
$ aecli inspect ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx
Account ID ______________________________ ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx
Account balance _________________________ 52.1342501ae
Account nonce ___________________________ 3
No pending transactions
inspect transaction
$ aecli inspect th_iirV7mw49NfFY8NbBhbXGBLv9PPT3h1ou11oKtPsJVHGVpWVC
Transaction hash ________________________ th_iirV7mw49NfFY8NbBhbXGBLv9PPT3h1ou11oKtPsJVHGVpWVC
Block hash ______________________________ mh_2RojH44UtAjf8pRQekPp7o78CmCqMQJkRdxmfXvVmWg9M6ymcr
Block height ____________________________ 99005 (4 years ago)
Signatures ______________________________ ["sg_MjwB8zrhqGTqYWY2c5jLrikuCcwppnhNhjXg9TcdFbCkSvGhPL6Hf4iu81eoxWWJFSgRSFQ3h3qMv6vVNqYfo5NNBNDFK"]
Transaction type ________________________ NameClaimTx (ver. 2)
Account address _________________________ ak_2i74vkHbdciAdr7Bw3ogdTHsLykPf4ii1DQEGLh6RpySyhtA9H
Name ____________________________________ yanislav.test
Name salt _______________________________ 6632125367082877
Fee _____________________________________ 0.00001638ae
Nonce ___________________________________ 2