Key Management
A mnemonic phrase, also known as a seed phrase, is a sequence of words used to recover or restore a cryptocurrency wallet. It serves as a backup mechanism, allowing users to regain access to their funds if they lose access to their original wallet.
When creating a wallet, a 12- or 24-word mnemonic phrase is generated, which should be kept secure and private.
Importance of Mnemonic Phrases
Cryptocurrencies are stored in a decentralized manner, meaning no central authority can restore access to lost funds. If you lose access to your wallet (e.g., forget your password or lose your device), your mnemonic phrase is the only way to recover your account.
To protect your mnemonic phrase:
Store it securely on a physical medium (e.g., written on paper) or in a secure digital format.
Make multiple copies and store them in different locations to prevent total loss.
Mnemonic Phrase vs. Private Key
Feature
Mnemonic Phrase (Seed Phrase)
Private Key
Purpose
Generates multiple private keys
Grants direct access to a single address
Format
12 or 24 words
Long alphanumeric string
Recoverability
Can restore multiple accounts
If lost, funds cannot be recovered
Security Risk
Losing it means losing all associated accounts
Losing it affects only one address
A mnemonic phrase is used to derive multiple private keys, whereas a private key is specific to a single cryptocurrency address. Since the mnemonic phrase is the root of all private keys, losing it has severe consequences.
Managing Keys with LagomChain CLI
1. Creating a New Key (Generates Mnemonic Phrase)
When you create a new key, you receive a mnemonic phrase for backup.
Example Output:
Important: Write down the mnemonic phrase and store it securely.
2. Restoring a Key from a Mnemonic Phrase
If a key is lost, restore it using the mnemonic phrase:
You will be prompted to enter the mnemonic phrase.
Example Output:
Exporting and Importing Private Keys
If you need to back up or transfer a key without using the mnemonic phrase, you can export and import private keys.
Tendermint-Formatted Private Keys
1. Export a Private Key
You will be prompted to enter a decryption passphrase.
Example Output:
Save this output to a secure file:
2. Import a Private Key
To restore an exported key:
Ethereum-Formatted Private Keys
1. Export a MetaMask-Compatible Private Key
LagomChain allows exporting Ethereum-compatible private keys for use in MetaMask and other wallets.
Warning: This method exports the unencrypted private key, which should be stored securely.
You will be prompted with:
Enter your keyring passphrase to proceed.
2. Import an Ethereum-Formatted Private Key
You will be prompted to enter a new encryption passphrase for the imported key.
Verifying Stored Keys
To check that your keys have been correctly restored, imported, or created, list all stored keys:
📌 Example Output:
Security Considerations
Never share your mnemonic phrase or private key. Anyone with access can control your funds.
Store multiple copies of your mnemonic phrase securely. Losing it means you cannot recover your wallet.
Avoid exporting private keys unless necessary. If needed, encrypt them securely.
Last updated