An Introduction to Namada Addresses
All accounts in Namada have a unique address, exactly one Validity Predicate and optionally any additional data in its dynamic storage sub-space.
There are currently 3 types of account addresses:
- Implicit (not fully supported yet): An implicit account is derived from your keypair and can be used to authorize certain transactions from the account. They can be used as recipients of transactions even if the account has not been used on-chain before.
- Established: Used for accounts that allow the deployment of custom validation logic. These must be created on-chain via a transaction (e.g., account initialization). The address is generated on-chain and is not known until the transaction is applied (the user provides randomness).
- Internal: Special internal accounts, such as protocol parameters account, PoS and IBC.
Namada uses ed25519 (opens in a new tab) keypairs for signing cryptographic operations on the blockchain.
To manage your keys, various sub-commands are available under:
namada wallet key
It is possible to generate keys using the CLI. By doing so, an implicit account address is also derived in the process and added to storage.
namada wallet key gen --alias keysha
The derived implicit address shares the same
keysha alias. The previous command has the same effect as
namada wallet address gen --alias keysha.
By default, the keys are stored encrypted. The encryption password is not a part of key generation randomness.
namada wallet key gen --alias keysha --hd-path default
The default HD path for Namada is
Optionally, the user may specify an additional passphrase that is used as a part of keypair generation randomness.
WARNING: Keep your mnemonic code and passphrase safe. Loss of any of them would inevitably lead to impossible account recovery.
To recover the keypair from your mnemonic code and passphrase use
namada wallet key restore --alias keysha --hd-path default
namada wallet key list
To manage addresses, similar to keys, various sub-commands are available:
namada wallet address
Let's call the implicit address
namada wallet address gen --alias accountant
Note that this will also generate and save a key from which the address was derived and save it under the same
accountant alias. Thus, this command has the same effect as
namada wallet key gen --alias accountant.
namada wallet address gen --alias keysha --hd-path default
namada wallet address restore --alias keysha --hd-path default
namada wallet address list