Useful commands

Keys

Add new key

nibid keys add wallet

Recover existing key

nibid keys add wallet --recover

List all keys

nibid keys list

Delete key

nibid keys delete wallet

Query wallet balance

nibid q bank balances $(nibid keys show wallet -a)

Create new validator

nibid tx staking create-validator \
--amount 10000000unibi \
--pubkey $(nibid tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id cataclysm-1 \
--commission-rate 0.1 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--fees 5000unibi \
-y

Edit validator

nibid tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id cataclysm-1 \
--commission-rate 0.05 \
--from wallet \
--fees 5000unibi \
-y

Unjail validator

nibid tx slashing unjail --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Jail reason

nibid query slashing signing-info $(nibid tendermint show-validator)

List all active validators

nibid q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl

List all inactive validators

nibid q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl

Withdraw rewards from all validators

nibid tx distribution withdraw-all-rewards --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Withdraw commission and rewards from your validator

nibid tx distribution withdraw-rewards $(nibid keys show wallet --bech val -a) --commission --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Delegate to yourself

nibid tx staking delegate $(nibid keys show wallet --bech val -a) 1000000unibi --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Delegate tokens to validator

nibid tx staking delegate <TO_VALOPER_ADDRESS> 1000000unibi --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Redelegate tokens to another validator

nibid tx staking redelegate $(nibid keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000unibi --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Unbond tokens from your validator

nibid tx staking unbond $(nibid keys show wallet --bech val -a) 1000000unibi --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

Send tokens to the wallet

nibid tx bank send wallet <TO_WALLET_ADDRESS> 1000000unibi --from wallet --chain-id cataclysm-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.025unibi -y

View validator details

nibid q staking validator $(nibid keys show wallet --bech val -a)

Slashing params

nibid q slashing params

Signing Info

nibid q slashing signing-info $(nibid tendermint show-validator)

Get validator info

nibid status 2>&1 | jq .ValidatorInfo

Get sync info

nibid status 2>&1 | jq .SyncInfo

Check validator key

[[ $(nibid q staking validator $(nibid keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(nibid status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"

Remove node

cd $HOME
sudo systemctl stop nibid
sudo systemctl disable nibid
sudo rm /etc/systemd/system/nibid.service
sudo systemctl daemon-reload
rm -f $(which nibid)
rm -rf $HOME/.nibid
rm -rf $HOME/nibiru

Reload service configuration

sudo systemctl daemon-reload

Enable service

sudo systemctl enable nibid

Disable service

sudo systemctl disable nibid

Start service

sudo systemctl start nibid

Stop service

sudo systemctl stop nibid

Restart service

sudo systemctl restart nibid

Check service status

sudo systemctl status nibid

Check service logs

sudo journalctl -u nibid -f --no-hostname -o cat

Delete Node

sudo systemctl stop nibid
sudo systemctl disable nibid
sudo rm -rf /etc/systemd/system/nibid.service
sudo rm $(which nibid)
sudo rm -rf $HOME/.nibid
sed -i "/NIBIRU_/d" $HOME/.bash_profile

Last updated