Delegate Your Cosmos Atom Using Command-line

Blockpower
Blockpower
Published in
2 min readMar 17, 2019

We are very excited for the Cosmos launch and below is a basic guide for using command-line tool to delegate your atoms .

1. Install gaiacli

There is no audited UI wallet at the moment for easy delegation, so gaiacli is the most secure way for delegation.

To start delegating atoms, you need to install gaiacli , the command-line interface (CLI) used to connect to a gaiad full-node and interface with the Cosmos Hub.

You will need to compile the CLI from the source code using the instructions below.

https://cosmos.network/docs/gaia/installation.html#install-gaia

2. Restore Fundraiser Account

To restore your fundraiser account, you will need the following three values:

· your_key_name : is an alias for the name of your account. It can be any value you want.

· passphrase : a unique password created by you to encrypt your wallet.

· mnemonic : a 12-word seed phrase issued in the ICO. Newly generated mnemonics contain 24 words.

To recover you account, copy and paste the following command into your terminal. You will need to replace your_key_name with an alias of your creation.

gaiacli keys add <your_key_name> —-recover

After entering the recover command, you will be prompted to enter both your mnemonic and passphrase.

3. Connecting to the Network

In order to query state and send transactions, you will need to connect to the Cosmos Hub network. You can do this by connecting to a full-node (or your own node). Connect to the full node by copying and pasting the following command into your terminal.

gaiacli config node xxx.xxx.xx:26657gaiacli config trust-node falsegaiacli config chain-id cosmoshub-1

4. Bond Your Atoms

To bond your ATOMs, you will need the following four values.

· validatorAddress : cosmosvaloper1rpgtz9pskr5geavkjz02caqmeep7cwwpv73axj

· amountToBound : The amount of ATOMs you want to delegate, multiplied by 1,000,000 and stated in uatom. For example, if you want to delegate 1000 Atoms, the value would be 1,000,000,000uatom

· gasPrice : Gas price for bonding tx (e.g 0.001)

· Delegatorkeyname : This is your delegator alias and can be any value you choose (e.g MyDelegatorAlias)

Make sure to replace the validatorAddress, amountToBound, gasPrice and delegatorKeyName with the values as instructed above and the copy and paste the following command into your terminal.

gaiacli tx staking delegate \    <validatorAddress> \    <amountToBond> \    --from <delegatorKeyName> \    --gas auto \    --gas-prices <gasPrice> --async

5. Claim Rewards

You will need the following two values to withdraw your unclaimed ATOMs.

· gasPrice : Gas price for bonding tx (e.g 0.001)

· Delegatorkeyname : This is your delegator alias and can be any value you choose (e.g MyDelegatorAlias)

To withdraw your unclaimed staking rewards execute the following single command in your terminal:

gaiacli tx distr withdraw-all-rewards \    --from <delegatorKeyName> \    --gas auto \    --gas-prices <gasPrice> \    --async

P.S: The above contents are from various of public sources.

--

--

Blockpower
Blockpower

Blockpower is a leading crypto asset management company, engaging in all spectrum of crypto asset investments.