# Useful commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u pryzmd -f
```

Start service

```bash
sudo systemctl start pryzmd
```

Stop service

```bash
sudo systemctl stop pryzmd
```

Restart service

```bash
sudo systemctl restart pryzmd
```

Check service status

```bash
sudo systemctl status pryzmd
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable pryzmd
```

Disable Service

```bash
sudo systemctl disable pryzmd
```

Node info

```bash
pryzmd status 2>&1 | jq
```

Your node peer

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

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
pryzmd keys add $WALLET
```

Restore executing wallet

```bash
pryzmd keys add $WALLET --recover
```

List All Wallets

```bash
pryzmd keys list
```

Delete wallet

```bash
pryzmd keys delete $WALLET
```

Check Balance

```bash
pryzmd q bank balances $WALLET_ADDRESS 
```

Export Key (save to wallet.backup)

```bash
pryzmd keys export $WALLET
```

View EVM Prived Key

```bash
pryzmd keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
pryzmd keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

To valoper addressTo wallet addressAmount, upryzm

Withdraw all rewards

```bash
pryzmd tx distribution withdraw-all-rewards --from $WALLET --chain-id indigo-1 --fees 3000upryzm 
```

Withdraw rewards and commission from your validator

```bash
pryzmd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id indigo-1 --fees 3000upryzm -y 
```

Check your balance

```bash
pryzmd query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
pryzmd tx staking delegate $(pryzmd keys show $WALLET --bech val -a) 1000000upryzm --from $WALLET --chain-id indigo-1 --fees 3000upryzm -y 
```

Delegate

```bash
pryzmd tx staking delegate <TO_VALOPER_ADDRESS> 1000000upryzm --from $WALLET --chain-id indigo-1 --fees 3000upryzm -y 	
```

Redelegate Stake to Another Validator

```bash
pryzmd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000upryzm --from $WALLET --chain-id indigo-1 --fees 3000upryzm -y 
```

Unbond

```bash
pryzmd tx staking unbond $(pryzmd keys show $WALLET --bech val -a) 1000000upryzm --from $WALLET --chain-id indigo-1 --fees 3000upryzm -y 
```

Transfer Funds

```bash
pryzmd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000upryzm --fees 3000upryzm -y 
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

MonikerIdentityDetailsAmount, upryzmCommission rateCommission max rateCommission max change rate

Create New Validator

```bash
pryzmd tx staking create-validator \
--amount 1000000upryzm \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(pryzmd tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--chain-id indigo-1 \
--fees 3000upryzm \
-y 
```

Edit Existing Validator

```bash
pryzmd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--from $WALLET \
--chain-id indigo-1 \
--fees 3000upryzm \
-y 
```

Validator info

```bash
pryzmd status 2>&1 | jq
```

Validator Details

```bash
pryzmd q staking validator $(pryzmd keys show $WALLET --bech val -a) 
```

Jailing info

```bash
pryzmd q slashing signing-info $(pryzmd tendermint show-validator) 
```

Slashing parameters

```bash
pryzmd q slashing params 
```

Unjail validator

```bash
pryzmd tx slashing unjail --from $WALLET --chain-id indigo-1 --fees 3000upryzm -y 
```

Active Validators List

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

Check Validator key

```bash
[[ $(pryzmd q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(pryzmd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

```bash
pryzmd q slashing signing-info $(pryzmd tendermint show-validator) 
```

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

TitleDescriptionDeposit, upryzm

Create New Text Proposal

```bash
pryzmd  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000upryzm \
--type Text \
--from $WALLET \
--fees 3000upryzm \
-y 
```

Proposals List

```bash
pryzmd query gov proposals 
```

Proposal IDProposal optionYesNoNo with vetoAbstain

View proposal

```bash
pryzmd query gov proposal 1 
```

Vote

```bash
pryzmd tx gov vote 1 yes --from $WALLET --chain-id indigo-1  --fees 3000upryzm -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://monkeylabs.gitbook.io/services/services-testnet/pryzm/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.
