Basic Key Management
Create, import, export and delete keys using the CLI keyring.
Create a new key
You can create a new key with the name Default
as in the following example:
The key comes with a "mnemonic phrase", which is serialized into a human-readable 24-word mnemonic. User can recover their associated addresses with the mnemonic phrase.
It is important that you keep the mnemonic for address secure, as there is no way to recover it. You would not be able to recover and access the funds in the wallet if you forget the mnemonic phrase.
Restore existing key by seed phrase
You can restore an existing key with the mnemonic.
List your keys
Multiple keys can be created when needed. You can list all keys saved under the storage path.
Retrieve key information
You can retrieve key information by its name:
Delete a key
You can delete a key in your storage path.
Make sure you have backed up the key mnemonic before removing any of your keys, as there will be no way to recover your key without the mnemonic.
Export private keys
You can export and backup your key by using the export
subcommand:
The keyring-backend option
Interacting with a node requires a public-private key pair. Keyring is the place holding the keys. The keys can be stored in different locations with specified backend type.
os backend
The default os
backend stores the keys in operating system's credential sub-system, which are comfortable to most users, yet without compromising on security.
Here is a list of the corresponding password managers in different operating systems:
macOS (since Mac OS 8.6): Keychain
Windows: Credentials Management API
file backend
The file
backend stores the encrypted keys inside the app's configuration directory. A password entry is required every time the user access it, which may also occur multiple times of repeated password prompts 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.
Last updated