πŸ”‘ Implicit accounts

Namada has multiple account types. An implicit account is used for certain transaction types and is generated from a keypair, similar to accounts on most other blockchains.

Generate a new key

namadaw gen --alias wallet

Recover an existing key from mnemonic

namadaw derive --alias wallet

List keys

namadaw list --transparent

# list the implicit account address
namadaw find --alias wallet

πŸ‘› Established accounts

In Namada, established accounts are created with a transaction on chain. Their address is known after the on-chain transaction completes. Think of these accounts as extensions of your wallet, allowing you to use all the functionality of Namada.

Initialize a new account

namadac init-account \
  --public-keys wallet \
  --signing-keys wallet \
  --threshold 1 \
  --alias account

πŸ’± Shielded accounts

MASP (the multi-asset shielded pool) enables zero-knowledge transfers without revealing who is involved in the transaction or how much is being sent. Inside the shielded pool, you use a separate key and address from your transparent account. You will create a spending (private) key, which you use as the sender address. Generating a spending key also derives a viewing key, which can be used to see transaction details. To receive transactions, you create a payment (receiver) address. A single spending key can have multiple associated payment addresses.

Generate a new spending key

namadaw gen --shielded --alias shielded-key

Create a new payment address

namadaw gen-payment-addr --key shielded-key --alias shielded-addr

List keys

# hand out payment addresses so others can transfer to you
# but, keep the viewing key private to yourself
namadaw list --shielded

# the spending key should really be kept private
namadaw list --shielded --unsafe-show-secret --decrypt

πŸ’± Transactions

Query account balance

When checking spending key (shielded account) balance, you see the total across all associated payment addresses.

namadac balance --owner account
namadac balance --owner shielded-key

# or query a single token only
namadac balance --token NAM --owner account
namadac balance --token NAM --owner shielded-key

Send a transaction

Generally, the first signing key will be paying the gas fee. A different implicit account can be specified with the --gas-payer keysha option. You can also use your shielded account for fees, by providing the --gas-spending-key shielded-key option, and (optionally) the --disposable-gas-payer option for enhanced privacy (generating a single-use transparent gas payer).

# transparent transfer (from transparent account to transparent account)
namadac transfer \
  --signing-keys wallet \
  --source account \
  --target atest1d9khqw368ycrvvjp89rrgse4xycnvdpsxsuyyvp5xvmyv329g9zrzdecgyc5x3pkxaz5zde3gce4dy \
  --token NAM \
  --amount 10
# shielding transfer (from transparent account to shielded account)
namadac transfer \
  --signing-keys wallet \
  --source account \
  --target shielded-addr \
  --token NAM \
  --amount 10
# shielded transfer (from shielded account to shielded account)
namadac transfer \
  --signing-keys wallet \
  --source shielded-key \
  --target patest12tpl9w9ya3wlrdwaeuxvcuqufxyzqmxkkhwuf2c3yw5dfrdgtkjs3ee2ksd8zm4wwe7vkvyhd5h \
  --token NAM \
  --amount 10
# unshielding transfer (from shielded account to transparent account)
namadac transfer \
  --signing-keys wallet \
  --source shielded-key \
  --target account \
  --token NAM \
  --amount 10

πŸ‘· Validator operations

Create a new validator

namadac init-validator \
  --alias "YOUR_VALIDATOR_ALIAS" \
  --account-keys wallet \
  --signing-keys wallet \
  --commission-rate 0.05 \
  --max-commission-rate-change 0.01 \
  --email validator@example.com

Unjail validator

namadac unjail-validator --validator "YOUR_VALIDATOR_ALIAS"

Query validator state

namadac validator-state --validator "YOUR_VALIDATOR_ALIAS"

πŸ’² PoS staking

Skip the --source wallet option if self-delegating from validator account.

Delegate/bond tokens

namadac bond \
  --source wallet \
  --validator "YOUR_VALIDATOR_ALIAS" \
  --amount 12.34

Query delegations/bonds

# to see where a wallet is delegating to
namadac bonds --owner wallet

# to see who is delegating to a validator
namadac bonds --validator "YOUR_VALIDATOR_ALIAS"

Unbond tokens

namadac unbond \
  --source wallet \
  --validator "YOUR_VALIDATOR_ALIAS" \
  --amount 12.34

Withdraw unbonded tokens

namadac withdraw \
  --source wallet \
  --validator "YOUR_VALIDATOR_ALIAS"

πŸ—³ Governance

List all proposals

namadac query-proposal

View proposal by ID

namadac query-proposal --proposal-id 0
namadac query-proposal-result --proposal-id 0

Vote β€˜Yes’

namadac vote-proposal \
    --proposal-id 0 \
    --vote yay \
    --address wallet

Vote β€˜No’

namadac vote-proposal \
    --proposal-id 0 \
    --vote nay \
    --address wallet

🚨 Maintenance

Update ports

export CUSTOM_PORT=266
sed -i \
  -e "s|^proxy_app = \"tcp://127.0.0.1:26658\"|proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"|" \
  -e "s|^laddr = \"tcp://127.0.0.1:26657\"|laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"|" \
  -e "s|^laddr = \"tcp://0.0.0.0:26656\"|laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"|" \
  -e "s|^prometheus_listen_addr = \":26660\"|prometheus_listen_addr = \":${CUSTOM_PORT}66\"|" \
  $HOME/.local/share/namada/namada.5f5de2dd1b88cba30586420/config.toml

Update indexing configuration

Disable indexer

sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.local/share/namada/namada.5f5de2dd1b88cba30586420/config.toml

Enable indexer

sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.local/share/namada/namada.5f5de2dd1b88cba30586420/config.toml

Update pruning configuration

Pruning is currently not configurable. All nodes are full nodes, starting their history from genesis block.

Reset node

sudo systemctl stop namada.service
namadan ledger reset

Delete node

Please, note before proceeding with the next step! All data will be lost! Make sure you have backed up your keys!

sudo systemctl stop namada.service
sudo systemctl disable namada.service

sudo rm /etc/systemd/system/namada.service
sudo systemctl daemon-reload

rm -f $HOME/.local/bin/namada* $HOME/.local/bin/cometbft
rm -rf $HOME/.local/share/namada

βš™οΈ Service Management

Enable service start on boot

sudo systemctl enable namada.service

Disable service start on boot

sudo systemctl disable namada.service

Start service

sudo systemctl start namada.service

Stop service

sudo systemctl stop namada.service

Restart service

sudo systemctl restart namada.service

Check service status

sudo systemctl status namada.service

Check service logs

sudo journalctl -u namada.service -f --no-hostname -o cat