> For the complete documentation index, see [llms.txt](https://services.liveraven.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://services.liveraven.net/cosmos-testnets/mantra-chain/management.md).

# Management

{% tabs %}
{% tab title="🔑 Key management" %}

#### ADD NEW KEY

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind keys add wallet
```

{% endcode %}

#### RECOVER EXISTING KEY

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind keys add wallet --recover
```

{% endcode %}

#### LIST ALL KEYS

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind keys list
```

{% endcode %}

#### DELETE KEY

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind keys delete wallet
```

{% endcode %}

#### EXPORT KEY TO A FILE

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind keys export wallet
```

{% endcode %}

#### IMPORT KEY FROM A FILE

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind keys import wallet wallet.backup
```

{% endcode %}

#### QUERY WALLET BALANCE

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind q bank balances $(mantrachaind keys show wallet -a)
```

{% endcode %}
{% endtab %}

{% tab title="👷 Validator management" %}
Please make sure you have adjusted moniker, identity, details and website to match your values.

#### CREATE NEW VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx staking create-validator \
--amount 1000000uom \
--pubkey $(mantrachaind tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id mantra-hongbai-1 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.05 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### EDIT EXISTING VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id mantra-hongbai-1 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### UNJAIL VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx slashing unjail \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### JAIL REASON

{% code overflow="wrap" fullWidth="false" %}

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

{% endcode %}

#### LIST ALL ACTIVE VALIDATORS

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind 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
```

{% endcode %}

#### LIST ALL INACTIVE VALIDATORS

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind 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
```

{% endcode %}

#### VIEW VALIDATOR DETAILS

{% code overflow="wrap" fullWidth="false" %}

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

{% endcode %}
{% endtab %}

{% tab title="💲 Token management" %}

#### WITHDRAW REWARDS FROM ALL VALIDATORS

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx distribution withdraw-all-rewards \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### WITHDRAW COMMISSION AND REWARDS FROM YOUR VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx distribution withdraw-rewards $(mantrachaind keys show wallet --bech val -a) \
--commission \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### DELEGATE TOKENS TO YOURSELF

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx staking delegate $(mantrachaind keys show wallet --bech val -a) 1000000uom \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### DELEGATE TOKENS TO VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx staking delegate <TO_VALOPER_ADDRESS> 1000000uom \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### REDELEGATE TOKENS TO ANOTHER VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx staking redelegate $(mantrachaind keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uom \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### UNBOND TOKENS FROM YOUR VALIDATOR

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx staking unbond $(mantrachaind keys show wallet --bech val -a) 1000000uom \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}

#### SEND TOKENS TO THE WALLET

{% code overflow="wrap" fullWidth="false" %}

```bash
mantrachaind tx bank send wallet <TO_WALLET_ADDRESS> 1000000uom \
--from wallet \
--chain-id mantra-hongbai-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.0002uom \
-y
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://services.liveraven.net/cosmos-testnets/mantra-chain/management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
