Cheat Sheet
Wallet
Add New Wallet Key
junctiond keys add wallet
Recover existing key
junctiond keys add wallet --recover
List All Keys
junctiond keys list
Query Wallet Balance
junctiond q bank balances $(junctiond keys show wallet -a)
Check sync status
junctiond status 2>&1 | jq .sync_info
Create Validator
Obtain your validator public key by running the following command:
junctiond comet show-validator
The output will be similar to this (with a different key):
{"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="}
Then, create a file named validator.json
with the following content:
nano $HOME/validator.json
Change your info, from "pubkey" to "details" and Save them
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},
"amount": "1000000uamf",
"moniker": "<validator-name>",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
Finally, we're ready to submit the transaction to create the validator:
junctiond tx staking create-validator validator.json --from wallet --chain-id varanasi-1 --fees 5000uamf -y
Delegate Token to your own validator
junctiond tx staking delegate $(junctiond keys show wallet --bech val -a) 1000000uamf \
--from wallet --chain-id varanasi-1 \
--fees 5000uamf \
-y
Withdraw rewards and commission from your validator
junctiond tx distribution withdraw-rewards $(junctiond keys show wallet --bech val -a) \
--from wallet --chain-id varanasi-1 \
--fees 5000uamf \
-y
Unjail validator
junctiond tx slashing unjail --from wallet --chain-id varanasi-1 --fees 5000uamf -y
Services Management
# Reload Service
sudo systemctl daemon-reload
# Enable Service
sudo systemctl enable junctiond
# Disable Service
sudo systemctl disable junctiond
# Start Service
sudo systemctl start junctiond
# Stop Service
sudo systemctl stop junctiond
# Restart Service
sudo systemctl restart junctiond
# Check Service Status
sudo systemctl status junctiond
# Check Service Logs
sudo journalctl -u junctiond -f --no-hostname -o cat
Backup Validator
cat $HOME/.junction/config/priv_validator_key.json
Remove node
sudo systemctl stop junctiond
sudo systemctl disable junctiond
rm -rf /etc/systemd/system/junctiond.service
sudo systemctl daemon-reload
sudo rm -f /usr/local/bin/junctiond
sudo rm -f $(which junctiond)
sudo rm -rf $HOME/.junction
sudo rm -rf Junction_auto