# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export TITAN_CHAIN_ID="titan-test-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
titand keys add wallet

#Recover Wallet
titand keys add wallet --recover

#List Wallet
titand keys list

#Delete Wallet
titand keys delete wallet

#Check Wallet Balance
titand q bank balances $(titand keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
titand tx staking create-validator \
--amount=1000000uttnt \
--pubkey=$(titand tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$TITAN_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uttnt\ 
-y

#Edit Validator
titand tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$TITAN_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uttnt\ 
-y

#Unjail Validator
titand tx slashing unjail --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#Check Jailed Reason
titand query slashing signing-info $(titand tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
titand tx distribution withdraw-all-rewards --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#Withdraw Rewards with Comission
titand tx distribution withdraw-rewards $(titand keys show wallet --bech val -a) --commission --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#Delegate Token to your own validator
titand tx staking delegate $(titand keys show wallet --bech val -a) 100000uttnt --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#Delegate Token to other validator
titand tx staking redelegate $(titand keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000uttnt --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#Unbond Token from your validator
titand tx staking unbond $(titand keys show wallet --bech val -a) 100000uttnt --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#Send Token to another wallet
titand tx bank send wallet <TO_WALLET_ADDRESS> 100000uttnt --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
titand tx gov vote 1 yes --from wallet --chain-id $TITAN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uttnt -y

#List all proposals
titand query gov proposals

#Create new text proposal
titand tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000uttnt \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1uttnt\ 
-y 
```

### SERVICES MANAGEMENT

```bash
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable titand

# Disable Service
sudo systemctl disable titand

# Start Service
sudo systemctl start titand

# Stop Service
sudo systemctl stop titand

# Restart Service
sudo systemctl restart titand

# Check Service Status
sudo systemctl status titand

# Check Service Logs
sudo journalctl -u titand -f --no-hostname -o cat
```

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.titan/config/config.toml

#Get Validator info
titand status 2>&1 | jq .ValidatorInfo

#Get denom info
titand q bank denom-metadata -oj | jq

#Get sync status
titand status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
titand status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
titand tendermint unsafe-reset-all --home $HOME/.titan --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop titand && sudo systemctl disable titand && sudo rm /etc/systemd/system/titand.service && sudo systemctl daemon-reload && sudo rm -rf $(which titand) && rm -rf $HOME/.titan
```


---

# 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://docs.syanodes.my.id/titan/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.
