Autheod
autheod is an all-in-one command-line interface. It supports wallet management, funds transfers and staking operations.
Build and configurations
Build prerequisites
You can get the latestautheod binary here from the testnet page.
Using autheod
autheod is bundled with the Autheo Platform code. After you have obtained the latest autheod binary, run:
-h, --help command available.
Config and data directory
By default, your configuration and data are stored in the folder located in the~/.autheo directory. Ensure that you have backed up your wallet after creating it. Otherwise, your funds may be inaccessible in the event of an accident.
Configure autheod config and data directory
To specify the autheod config and data storage directory; you can add a global flag --home <directory>.
Configuration setting
We can view the default config setting by using autheod config command:auth_ChainID-1 from a blank name by:
.autheo/config/client.toml:
client.toml, then save. For example, if we directly change the chain-id to autheo_2127-1 and output to number, it would change instantly as shown below.
Options
A list of commonly used flags ofautheod is listed below:
Command list
A list of commonly usedautheod commands.
You may also add the flag
-h, --help on autheod [command] to get more available commands and details.
** Example: more details of subcommand - tx staking**
Key management - autheod keys
First of all, you will need an address to store and spend your THEO.
keys add <wallet_name>: Create a new key
You can create a new key with the name Default.
Example: Create a new address
keys add <key_name> --recover: Restore existing key by seed phrase
You can restore an existing key with the mnemonic.
Example: restore an existing key
keys list: List your keys
Multiple keys can be created when needed. You can list all keys saved under the storage path.
Example: list all of your keys
keys show <key_name>: Retrieve key information
You can retrieve key information by its name.
Example: Retrieve key information - account address and its public key
keys delete <key_name>: Delete a key
You can delete a key in your storage path.
Example: Remove a key
keys export <key_name>: Export private keys
You can export and backup your key by using the export subcommand.
Example: export your keys exporting the key Default
The keyring --keyring-backend option
Interacting with a node requires a public-private key pair. Keyring is the place holding the keys. The keys can be stored in different locations with specified backend type.
1. os backend
The default os backend stores the keys in operating system’s credential sub-system, which are comfortable to most users, yet without compromising on security.
Here is a list of the corresponding password managers in different operating systems:
- macOS (since Mac OS 8.6): Keychain
- Windows: Credentials Management API
- GNU/Linux:
2. file backend
The file backend stores the encrypted keys inside the app’s configuration directory. A password entry is required every time a user access it, which may also occur multiple times of repeated password prompts in one single command.
3. test backend
The test backend is a password-less variation of the file backend. It stores unencrypted keys inside the app’s configuration directory. It should only be used in testing environments and never be used in production.
Transaction subcommands - autheod tx
tx bank send: Transfer operation
Transfer operation involves the transfer of tokens between two addresses.
THEO uses 18 decimal places. 1 THEO = 1,000,000,000,000,000,000 aauth (10¹⁸). All CLI amounts must be expressed in
aauth. See Token overview for the full denomination table.tx bank send <from_key_or_address> <to_address> <amount> <network_id>]
Example: send 10aauth from one address to another
tx staking: Staking operations
Staking operations involve the interaction between an address and a validator. It allows you to create a validator and lock/unlocking funds for staking purposes.
Delegate your funds to a validator [tx staking delegate <validator-addr> <amount>]
To bond funds for staking, you can delegate funds to a validator by the delegate command
Example: delegate funds from mykey to a validator under the address tautheovaloper....lq
tx staking unbond <validator-addr> <amount>]
On the other hand, we can create a Unbond transaction to unbond the delegated funds
Example: unbond funds from a validator under the address tautheovaloper...lq
Once your funds are unbonded, it will be locked until the
unbonding_time has passed.Balance and transaction history - autheod query
query bank balances: Check your transferable balance
You can check your transferable balance with the balances command under the bank module.
Example: check your address balance
Advanced operations and transactions
rollback
To recover from an app-hash mismatch failure, it would take hours to re-run an archive node, a faster way to do it would be to userollback.
tx staking create-validator: Joining the network as a validator
Anyone who wishes to become a validator can submit a create-validator transaction.
tx slashing unjail: Unjail a validator
Validator could be punished and jailed due to network misbehavior, for example, if we check the validator set:
unjail transaction to unjail the validator and resume its normal operations by: