# Useful commands

## 🖊️Working with your wallet🖊️

**Add new key**

```
quasarnoded keys add wallet
```

**Recover existing key**

```
quasarnoded keys add wallet --recover
```

**Query wallet balance**

```
quasarnoded q bank balances $(nolusd keys show wallet -a)
```

**List all keys**

```
quasarnoded keys list
```

**Delete key**

```
quasarnoded keys delete wallet
```

**Export key to a file**

```
quasarnoded keys export wallet
```

**Import key from a file**

```
quasarnoded keys import wallet wallet.backup
```

***

## 🔧Service🔧

**Info**

```
quasarnoded status 2>&1 | jq .NodeInfo
quasarnoded status 2>&1 | jq .SyncInfo
quasarnoded status 2>&1 | jq .ValidatorInfo
```

**Check node logs**

```
sudo journalctl -fu quasarnoded -o cat
```

**Check service status**

```
sudo systemctl status quasarnoded
```

**Restart service**

```
sudo systemctl restart quasarnoded
```

**Stop service**

```
sudo systemctl stop quasarnoded
```

**Start service**

```
sudo systemctl start quasarnoded
```

**Reload, disable, enable**

```
sudo systemctl daemon-reload
sudo systemctl disable quasarnoded
sudo systemctl enable quasarnoded
```

**Your Peer**

```
echo $(quasarnoded tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.quasarnode/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

***

## 🔗Validator Management🔗

**Create new validator**

```
quasarnoded tx staking create-validator \
  --amount 1000000uqsr \
  --from <walletName> \
  --commission-max-change-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey $(quasarnoded tendermint show-validator) \
  --moniker YOUR_MONIKER_NAME \
  --chain-id quasar-1 \
  --identity="YOUR_KEYBASE_ID" \
  --details="YOUR_DETAILS" \
  --website="YOUR_WEBSITE_URL"
  --gas-adjustment 1.4 \
  --gas auto \
  --gas-prices 0.1uqsr \
  -y
```

**Edit Validator**

```
quasarnoded tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--security-contact "Your_Email" \
--chain-id quasar-1 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.1uqsr \
-y
```

**Jail Info**

```
quasarnoded query slashing signing-info $(quasarnoded tendermint show-validator)
```

**Unjail**

```
quasarnoded tx slashing unjail --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Active Validators List**

```
quasarnoded 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
```

**Inactive Validators List**

```
quasarnoded 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
```

**View validator details**

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

***

## 🔈Governance🔈 <a href="#governance" id="governance"></a>

**List all proposals**

```
quasarnoded query gov proposals
```

**View specific proposal**

```
quasarnoded query gov proposal 1
```

**Vote yes**

```
quasarnoded tx gov vote 1 yes --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Vote no**

```
quasarnoded tx gov vote 1 no --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Vote abstain**

```
quasarnoded tx gov vote 1 abstain --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Vote no\_with\_veto**

```
quasarnoded tx gov vote 1 NoWithVeto --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

***

## ⚙️Token management⚙️ <a href="#token-management" id="token-management"></a>

**Withdraw all rewards from all validators**

```
quasarnoded tx distribution withdraw-all-rewards --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Withdraw and commission from your Validator**

```
quasarnoded tx distribution withdraw-rewards $(quasarnoded keys show wallet --bech val -a) --commission --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Delegate tokens to your validator**

```
quasarnoded tx staking delegate $(quasarnoded keys show wallet --bech val -a) 1000000uqsr --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Delegate tokens to different validator**

```
quasarnoded tx staking delegate <TO_VALOPER_ADDRESS> 1000000uqsr --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Redelegate tokens to another validator**

```
quasarnoded tx staking redelegate $(quasarnoded keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uqsr --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Unbond tokens from your validator**

```
quasarnoded tx staking unbond $(quasarnoded keys show wallet --bech val -a) 1000000uqsr --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```

**Send tokens to the wallet**

```
quasarnoded tx bank send wallet <TO_WALLET_ADDRESS> 1000000uqsr --from wallet --chain-id quasar-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.1uqsr -y
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://service.block-pro.net/mainnet/quasar/useful-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
