reference

AECLI commands

  • account

    • sign — sign a transaction using wallet

    • sign-message — sign a personal message using wallet

    • verify-message — check if message was signed by address

    • address — get wallet address and optionally secret key

    • create — create a wallet by a secret key or generate a new one

  • spend — send coins to another account or contract

  • name

    • full-claim — claim an AENS name in a single command

    • pre-claim — pre-claim an AENS name

    • claim — claim an AENS name (requires pre-claim)

    • bid — bid on name in auction

    • update — update a name pointer

    • extend — extend name TTL

    • revoke — revoke an AENS name

    • transfer — transfer a name to another account

  • contract

  • oracle

  • chain

    • top — query the top key/micro block of the chain

    • status — query node version, network id, and related details of the selected node

    • ttl — get relative TTL by absolute TTL

    • play — prints blocks from top until condition

    • broadcast — send signed transaction to the chain

  • inspect — get details of a node entity

  • tx

  • config — print the current sdk configuration

  • select-node — specify node to use in other commands

  • select-compiler — specify compiler to use in other commands

account group

sign

Sign a transaction using wallet. Useful in offline signing scheme.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --networkId [networkId] Network id. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). --json Print result in json format.

Example calls

sign-message

Sign a personal message using wallet.

Options

--filePath [path] Specify the path to the file for signing (ignore "data" argument and use file instead). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). --json Print result in json format.

Example calls

verify-message

Check if message was signed by address.

Options

--filePath [path] Specify the path to the file (ignore "data" argument and use file instead). --json Print result in json format.

Example calls

address

Get wallet address and optionally secret key.

Options

--secretKey Print secret key. --forcePrompt Force prompting. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). --json Print result in json format.

Example calls

create

Create a password-encrypted wallet by a secret key. Secret key can be provided in options, or cli will generate one. This command creates ethereum-like keyfile.

Arguments

wallet_path secretKey Secret key in sk_ or hex encoding.

Options

--overwrite Overwrite if exist. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). --json Print result in json format.

Example calls

spend

Sends coins to another account or contract.

Arguments

wallet A path to wallet file. receiver Address or name of recipient account. amount Amount of coins to send in aettos/ae (example: 1.2ae), or percent of sender balance (example: 42%).

Options

--payload [payload] Transaction payload as text (default: ""). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -N, --nonce [nonce] Override the nonce that the transaction is going to be sent with. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

name group

full-claim

Claim an AENS name in a single command. This command signs and sends a pre-claim transaction and waits until one block gets mined. After that, it sends a claim transaction. At the end, the update transaction is submitted, making a name point to the current account.

A name in arguments should end with ".chain". Be careful, shorter names are more expensive. If the name is shorter than 13 characters (without ".chain") then it won't be claimed immediately but would start an auction instead.

Options

--nameFee [nameFee] Amount of coins to pay for name. --nameTtl [nameTtl] A number of blocks until name expires (default: 180000 (1 year)). --clientTtl [clientTtl] A suggestion measured in seconds on how long clients should cache name pointers (default: 3600 (1 hour)). -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

pre-claim

Pre-claim an AENS name. The name should be claimed after one key block since the pre-claim gets mined. This command sends a pre-claim transaction, and outputs a salt that needs to be provided to aecli name claim.

A name in arguments should end with ".chain". Be careful, shorter names are more expensive. If the name is shorter than 13 characters (without ".chain") then it won't be claimed immediately but would start an auction instead.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

claim

Claim an AENS name, it requires a salt provided by aecli name pre-claim.

A name in arguments should end with ".chain". Be careful, shorter names are more expensive. If the name is shorter than 13 characters (without ".chain") then it won't be claimed immediately but would start an auction instead.

Options

--nameFee [nameFee] Amount of coins to pay for name. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

bid

Bid on name in auction.

Arguments

wallet_path name nameFee Amount of coins to pay for name.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

update

Update a name pointer.

Options

--extendPointers Extend pointers (default: false). --nameTtl [nameTtl] A number of blocks until name expires (default: 180000 (1 year)). --clientTtl [clientTtl] A suggestion measured in seconds on how long clients should cache name pointers (default: 3600 (1 hour)). -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

extend

Extend name TTL.

Arguments

wallet_path name nameTtl A number of blocks until name expires (default: 180000 (1 year)).

Options

--clientTtl [clientTtl] A suggestion measured in seconds on how long clients should cache name pointers (default: 3600 (1 hour)). -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

revoke

Revoke an AENS name. After that nobody will be able to claim it again. This action is irreversible!

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

transfer

Transfer a name to another account.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

contract group

compile

Compile a contract to get bytecode.

Options

--compilerUrl [compilerUrl] Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

encode-calldata

Encode calldata for contract call.

Arguments

fn args JSON-encoded arguments array of contract call (default: []).

Options

-d, --descrPath [descrPath] Path to contract descriptor file. --contractSource [contractSource] Contract source code file name. --contractAci [contractAci] Contract ACI file name. --compilerUrl [compilerUrl] Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

decode-call-result

Decode contract call result.

Options

-d, --descrPath [descrPath] Path to contract descriptor file. --contractSource [contractSource] Contract source code file name. --contractAci [contractAci] Contract ACI file name. --compilerUrl [compilerUrl] Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

call

Execute a function of the contract.

Arguments

fn Name of contract entrypoint to call. args JSON-encoded arguments array of contract call (default: []). wallet_path Path to secret storage file, not needed to make a static call.

Options

--contractAddress [contractAddress] Contract address to call. -s, --callStatic Estimate the return value, without making a transaction on chain. -t, --topHash Hash of block to make call. -d, --descrPath [descrPath] Path to contract descriptor file. --contractSource [contractSource] Contract source code file name. --contractAci [contractAci] Contract ACI file name. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -G, --gas [gas] Amount of gas to call/deploy the contract. --gasPrice [gasPrice] Gas price to call/deploy the contract (default: based on network demand). -N, --nonce [nonce] Override the nonce that the transaction is going to be sent with. -a, --amount [amount] Amount of coins to send (default: 0ae). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). --compilerUrl [compilerUrl] Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

deploy

Deploy a contract on the chain and create a deployment descriptor with the contract information that can be used to invoke the contract later on. The generated descriptor will be made in the same folder of the contract source file or at the location provided in descrPath. Multiple deploys of the same contract file will generate different deploy descriptors.

Arguments

wallet_path args JSON-encoded arguments array of contract call (default: []).

Options

--contractBytecode [contractBytecode] Contract bytecode file name. -d, --descrPath [descrPath] Path to contract descriptor file. --contractSource [contractSource] Contract source code file name. --contractAci [contractAci] Contract ACI file name. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -G, --gas [gas] Amount of gas to call/deploy the contract. --gasPrice [gasPrice] Gas price to call/deploy the contract (default: based on network demand). -N, --nonce [nonce] Override the nonce that the transaction is going to be sent with. -a, --amount [amount] Amount of coins to send (default: 0ae). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). --compilerUrl [compilerUrl] Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

oracle group

create

Register current account as oracle.

Options

--oracleTtl [oracleTtl] A number of blocks until oracle expires (default: 500 (1 day)). --queryFee [queryFee] Oracle query fee (default: 0ae). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

extend

Extend oracle's time to leave.

Arguments

wallet_path oracleTtl A number of blocks until oracle expires (default: 500 (1 day)).

Options

-P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

create-query

Create an oracle query.

Options

--queryTtl [queryTtl] A number of blocks while oracle can respond (default: 10 (30 minutes)). --responseTtl [responseTtl] A number of blocks while response available (default: 10 (30 minutes)). --queryFee [queryFee] Oracle query fee (default: provided by oracle). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

respond-query

Respond to an oracle query.

Options

--responseTtl [responseTtl] A number of blocks while response available (default: 10 (30 minutes)). -P, --password [password] Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). -F, --fee [fee] Override the transaction fee. --nonce [nonce] Override the nonce that the transaction is going to be sent with. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

chain group

top

Query the top key/micro block of the chain.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

status

Query node version, network id, and related details of the selected node.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

ttl

Get relative TTL by absolute TTL.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

play

Prints blocks from top until condition.

Options

-L, --limit [playLimit] Amount of blocks to print (default: 10). -P, --height [playToHeight] Print blocks till the height. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

broadcast

Send signed transaction to the chain. Useful in offline signing scheme.

Options

-W, --no-waitMined Don't wait until transaction gets mined. --verify Verify Transaction before broadcasting. -u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

inspect

Prints details of:

  • account (ak_-prefixed string),

  • name (string ending with '.chain'),

  • contract (ct_-prefixed string),

  • oracle (ok_-prefixed string),

  • keyblock or microblock (prefixed with kh_, mh_),

  • keyblock by height (integer),

  • transaction (by th_-string or tx_).

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

tx group

spend

Build spend transaction.

Arguments

senderId receiverId amount Amount of coins to send. nonce Unique number that is required to sign transaction securely.

Options

--payload [payload] Transaction payload (default: ""). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

name-preclaim

Build name preclaim transaction.

Arguments

accountId name nonce Unique number that is required to sign transaction securely.

Options

-F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

name-claim

Build name claim transaction.

Arguments

accountId salt name nonce Unique number that is required to sign transaction securely.

Options

--nameFee [nameFee] Amount of coins to pay for name. -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

name-update

Build name update transaction.

Arguments

accountId nameId nonce Unique number that is required to sign transaction securely. pointers

Options

--nameTtl [nameTtl] A number of blocks until name expires (default: 180000 (1 year)). --clientTtl [clientTtl] A suggestion measured in seconds on how long clients should cache name pointers (default: 3600 (1 hour)). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

name-transfer

Build name transfer transaction.

Arguments

accountId recipientId name nonce Unique number that is required to sign transaction securely.

Options

-F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

name-revoke

Build name revoke transaction.

Arguments

accountId name nonce Unique number that is required to sign transaction securely.

Options

-F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

contract-deploy

Build contract deploy transaction.

Arguments

ownerId contractBytecode initCallData nonce Unique number that is required to sign transaction securely.

Options

-G, --gas [gas] Amount of gas to call/deploy the contract. --gasPrice [gasPrice] Gas price to call/deploy the contract (default: 1000000000). -a, --amount [amount] Amount of coins to send (default: 0ae). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

contract-call

Build contract call transaction.

Arguments

callerId contractId callData nonce Unique number that is required to sign transaction securely.

Options

-G, --gas [gas] Amount of gas to call/deploy the contract. --gasPrice [gasPrice] Gas price to call/deploy the contract (default: 1000000000). -a, --amount [amount] Amount of coins to send (default: 0ae). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

oracle-register

Build oracle register transaction.

Arguments

accountId queryFormat responseFormat nonce Unique number that is required to sign transaction securely.

Options

--queryFee [queryFee] Oracle query fee (default: 0ae). --oracleTtl [oracleTtl] A number of blocks until oracle expires (default: 500 (1 day)). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

oracle-extend

Build oracle extend transaction.

Arguments

oracleId oracleTtl nonce Unique number that is required to sign transaction securely.

Options

-F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

oracle-post-query

Build oracle post query transaction.

Arguments

accountId oracleId query nonce Unique number that is required to sign transaction securely.

Options

--queryFee [queryFee] Oracle query fee (default: provided by oracle). --queryTtl [queryTtl] A number of blocks while oracle can respond (default: 10 (30 minutes)). --responseTtl [responseTtl] A number of blocks while response available (default: 10 (30 minutes)). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

oracle-respond

Build oracle respond transaction.

Arguments

oracleId queryId response nonce Unique number that is required to sign transaction securely.

Options

--responseTtl [responseTtl] A number of blocks while response available (default: 10 (30 minutes)). -F, --fee [fee] Override the transaction fee. -T, --ttl [ttl] Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). --json Print result in json format.

Example calls

verify

Verify transaction using node.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). -f, --force Ignore node version compatibility check. --json Print result in json format.

Example calls

config

Print the current sdk configuration.

Options

-u, --url [nodeUrl] Node to connect to (default: mainnet, env: AECLI_NODE_URL). --compilerUrl [compilerUrl] Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL).

select-node

Specify node to use in other commands.

Arguments

nodeUrl Node URL.

select-compiler

Specify compiler to use in other commands.

Arguments

compilerUrl Compiler URL.

Last updated

Was this helpful?