Skip to content
LogoLogo

Add a private key and account

You will need to create at least one private key to hold your account that will be used to execute transactions from the node.

When you run the command below, you might be prompted to enter a password for your keyring.

terpd keys add <account-name>

The account comes with a human-readable 24-word mnemonic phrase (also called seed or simply mnemonic), which you can use to recover the account.

Restore existing account via mnemonics

To recover an existing account, add the --recover flag:

terpd keys add <key_name> --recover

You will be prompted to enter your bip39 mnemonic in order to add the key.

List your keys

terpd keys list

you can also retrieve information about a specific key:

terpd keys show <key_name>

Delete a key

terpd keys delete <key_name>

Make sure you are fully aware of the implications and have backed up the key mnemonic before removing any of your keys. There is no way to recover your key without the mnemonic.

Export private keys

You can export and backup your key by launching:

terpd keys export <key_name>

Keyring-backend flag

The Keyring is where the keys are stored, and there are a few options.

terpd keys [subcommands] --keyring-backend [backend type]

Os backend

The default os backend stores the keys in the operating system's credential sub-system.

File backend

By choosing the file backend, a password entry is required every time you need to access it. This implies that you may be prompted for your password multiple times in one single command.

Test backend

The test backend is a password-less variation of the file backend. It stores unencrypted keys inside the app's configuration directory. It should only be used in testing environments and never be used in production.

Operator Address vs Validator Consensus Address

We have been talking about your node address, which is your account address and it's used for holding funds and signing transactions. This is also referred to as Operator Address, and you can obtain it by launching terpd keys add &lt;your-key-name>. This address starts with "terp1..".

It is important to notice that there is also another type of address, derived from your validator's consensus public key. This is called Validator Consensus Address, and it is used in the staking and consensus process to identify your validator.This address starts with "terpvalcons.." (terpvaloper.. is the operator address, not the consensus one), and you can obtain it with terpd comet show-validator (validator pubkey) or terpd comet show-address (consensus address).

Do not leave priv_validator_key.json on the validator host. Split the consensus key across a k-of-n cosigner cluster (Horcrux). A single remote signer (TMKMS + HSM) is a stopgap, not the target.

Full walkthrough: Threshold signing.

Next steps

Now you are ready to join a network with genesis and peers. Optionally, you can take your time to configure your node, so that the node can be customized according to your needs and preferences. Also, note that you can use Cosmovisor in order to perform automatic upgrades.