# ComDEX KT Document
BC rest and main app startup from genesis
---
- init genesis
```
maind init [moniker] --chain-id [chainID]
```
- add key
```
maincli keys add [name]
```
- adding genesis account to genesis.json
```
maind add-genesis-account [address_or_key_name] [coin]
ex: maind add-genesis-account commit 100000000ucommit
```
- generate a genesis tx with self delegation
```
maind gentx --name [name] --amount [amount_of_coins_to_bond] // It creates a genesis tx to create a validator with default parameters included
delegation amount: 100000000ucommit
commission rate: 0.1
commission max rate: 0.2
commission max change rate: 0.01
minimum self delegation: 1
ex: maind gentx --name commit --amount 100000000ucommit
```
- collect genesis txs and output a genesis.json file
```
maind collect-gentxs
```
- start chain with defalut nodeURI [tcp://0.0.0.0:26657]
```
maind start
```
- start rest-server with defalut port [1317]
```
maincli rest-server --chain-id [chainID]
```
Key add/delete/recover
---
- add
```
maincli keys add [name]
```
- delete
```
maincli keys delete [name]
```
- recover
```
maincli keys add [name] --recover
```
Telegram backup utility
---
- create telegram bot using @botFather
```
- /start
- /newbot
- [name_for_bot] //name for new bot
- [name_bot] // username for example: TetrisBot or tetris_bot. This will generate a token to access the HTTP API: ex: 924245082:AAGSDt3AuSEEq9tqWOkOq4hAUe0ZZ9WFQZI
- get your telegram chatID using @chatid_echo_bot
- copy this token and chatID in code which is there on 51.83.120.241 server
```
Check if there are any missing APIs
---
- no endpoints from our end
Run export state
---
- export app state to a file
```
maind export > [file_name.json]
```
Try validator add at the genesis
---
https://github.com/commitHub/genesisTransactions/blob/crust-2/crust-2/documents/2.gentx.md
- after pull request copy the gentx from other validators to `
- after pull request copy the gentx from other validators to main ` genesis.json`
- add account details too.
- start running chain.
Try validator add at run time
---
```
maincli tx staking create-validator --from commit --min-self-delegation 1 --commission-max-change-rate 0.1 --commission-max-rate 0.1 --commission-rate 0.1 --moniker main --amount 100000000ucommit --pubkey [validator_consensus_pubkey] --chain-id []chainID
```
Understand multi validators genesis transaction creation process
---
- same as add "Try validator add at the genesis"