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
namada wallet key gen --hd-path default --alias wallet
namada wallet key list
# list the implicit account address
namada wallet address 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.
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.
# you should keep this viewing key to yourself
namada wallet masp list-keys
# you should really keep this spending key private
namada wallet masp list-keys --unsafe-show-secret --decrypt
LIST ALL ADDRESSES
# you can give the payment address to others so they can transfer to you
namada wallet masp list-addrs
💱 Transactions
QUERY ACCOUNT BALANCE
When checking spending key (shielded account) balance, you see the total across all associated payment addresses.
namada client balance --owner account
namada client balance --owner shielded-key
# or query a single token only
namada client balance --token NAM --owner account
namada client 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)
namada client transfer \
--signing-keys wallet \
--source account \
--target atest1d9khqw368ycrvvjp89rrgse4xycnvdpsxsuyyvp5xvmyv329g9zrzdecgyc5x3pkxaz5zde3gce4dy \
--token NAM \
--amount 10
# shielding transfer (from transparent account to shielded account)
namada client transfer \
--signing-keys wallet \
--source account \
--target shielded-addr \
--token NAM \
--amount 10
# shielded transfer (from shielded account to shielded account)
namada client transfer \
--signing-keys wallet \
--source shielded-key \
--target patest12tpl9w9ya3wlrdwaeuxvcuqufxyzqmxkkhwuf2c3yw5dfrdgtkjs3ee2ksd8zm4wwe7vkvyhd5h \
--token NAM \
--amount 10
# unshielding transfer (from shielded account to transparent account)
namada client transfer \
--signing-keys wallet \
--source shielded-key \
--target account \
--token NAM \
--amount 10
# to see where a wallet is delegating to
namada client bonds --owner wallet
# to see who is delegating to a validator
namada client bonds --validator "YOUR_VALIDATOR_ALIAS"