Send and Receive NAM tokens
In Namada, tokens are implemented as accounts with the Token Validity Predicate (opens in a new tab). The validity predicate (VP) checks, in particular, that the total supply (of the token) is preserved in any transaction that uses this token. Your wallet will be pre-loaded with some token addresses that are initialized in the genesis block.
If you already have a key in your wallet, you can skip this step. Otherwise, generate a new keypair now.
Then, send a transaction to initialize your new established account and save its address with the alias
keysha public key will be written into the account's storage for authorizing future transactions. We also sign this transaction with
Note the use of the placeholder
keysha for the key parameter. This is a completely configurable parameter, and should just refer to the alias of the key signing the transaction (that has a positive nam balance).
namada client init-account \
--alias establishment \
--public-keys keysha \
--signing-keys keysha \
Once this transaction has been applied, the client will automatically see the new address created by the transaction and add it to your wallet with the chosen alias
This command uses the prebuilt User Validity Predicate (opens in a new tab).
To submit a regular token transfer from your account to the
namada client transfer \
--source establishment \
--target validator-1 \
--token NAM \
--amount 10 \
This command will attempt to find and use the key of the source address to sign the transaction.
To query token balances for a specific token and/or owner:
namada client balance --token NAM --owner my-new-acc
For any client command that submits a transaction (
update and PoS transactions),
you can use the
--dry-run-wrapper flag to simulate the transaction being applied in the block and see what would be the result.
You can see the token's addresses known by the client when you query all tokens balances:
namada client balance