Useful commands
🔑 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 walletRECOVER AN EXISTING KEY FROM MNEMONIC
namadaw derive --alias walletLIST 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-keyCREATE A NEW PAYMENT ADDRESS
namadaw gen-payment-addr --key shielded-key --alias shielded-addrLIST 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-keySEND 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 [email protected]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.34QUERY 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.34WITHDRAW UNBONDED TOKENS
namadac withdraw \
--source wallet \
--validator "YOUR_VALIDATOR_ALIAS"🗳 Governance
LIST ALL PROPOSALS
namadac query-proposalVIEW PROPOSAL BY ID
namadac query-proposal --proposal-id 0
namadac query-proposal-result --proposal-id 0VOTE ‘YES’
namadac vote-proposal \
--proposal-id 0 \
--vote yay \
--address walletVOTE ‘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/shielded-expedition.88f17d1d14/config.tomlUPDATE INDEXING CONFIGURATION
Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.local/share/namada/shielded-expedition.88f17d1d14/config.tomlEnable indexer
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.local/share/namada/shielded-expedition.88f17d1d14/config.tomlUPDATE 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 resetDELETE 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.serviceDISABLE SERVICE START ON BOOT
sudo systemctl disable namada.serviceSTART SERVICE
sudo systemctl start namada.serviceSTOP SERVICE
sudo systemctl stop namada.serviceRESTART SERVICE
sudo systemctl restart namada.serviceCHECK SERVICE STATUS
sudo systemctl status namada.serviceCHECK SERVICE LOGS
sudo journalctl -u namada.service -f --no-hostname -o catLast updated