BTQ Node CLI Wallet - Backup
Here's the adapted guide for managing and backing up a BTQ CLI wallet
BTQ Node CLI Wallet - Backup
Backing up a BTQ CLI wallet is similar to the GUI wallets offered. Print the secret keys and store them somewhere safe.
Additionally, the wallet.json
file can be encrypted using AES encryption and stored digitally until needed.
TIP: It's recommended that you store a copy of your private keys in at least 2 physical locations in case of catastrophe.
wallet.json
Secrets
wallet.json
SecretsSecret keys are stored in a wallet.json
file when an address is created using the BTQ CLI. This wallet file is the same as what is generated in the web wallet and can be loaded there as well.
If the wallet.json
is stored in plain text, unencrypted, the secret keys are simply contained in a JSON array inside of the file. Open or print the contents of the wallet.json
file to get the secret keys:
Example content:
Encrypted Wallet Keys
In the same directory as your BTQ wallet.json
file, enter the following command to print your private key information:
This will prompt for an address from the wallet to print the secrets for:
If you only have one address, simply leave the default and hit enter. If the wallet file is encrypted, you will then be prompted for the passphrase used to set up the wallet.
INFO: This requires a BTQ wallet to have already been generated and to be in the local directory. To specify an additional directory location for the wallet.json
file, use the --wallet_dir {PATH}
flag.
After successful decryption, the private key information will be printed.
Example output:
This information is needed to recover your wallet file. Store it in safe locations and ensure the recovery media is correct and opens the expected address.
WARNING: Anyone with private key information can unlock the wallet and steal funds!
Recover Wallet
To recover a wallet or load one onto a new computer, you will need one of three things:
The
wallet.json
fileIf encrypted, the passphrase to decrypt
The mnemonic phrase in the correct order
The hexseed.
Without one of these, it is impossible to recover the wallet.
Additionally, you will need a wallet application. Any of the BTQ wallet applications can be used to recover an address. Load the wallet.json
file to the application or enter the secret keys to recover the address.
CLI wallet.json
Recovery
wallet.json
RecoveryIf you have the wallet.json
file, simply copy it over to the new machine and use the BTQ functions as needed. The CLI will recognize that a wallet.json
file is found and load the secret keys from the file.
CLI Hexseed
To recover using the Mnemonic phrase, use the wallet_recover
command. By default, the command will expect a hexseed:
You will be prompted for the hexseed you have saved. Ensure you enter it correctly. The wallet address will be printed, and you will have a chance to save it. Enter yes
and your wallet will be recovered and saved into the directory you are currently in.
DANGER: This will save your file as an unencrypted wallet.json
file. Make sure you encrypt this file with a secure passphrase you will not lose.
Mnemonic Phrase
To recover using the mnemonic phrase, use the wallet_recover --seed-type mnemonic
command:
You will be prompted for the mnemonic you have saved. Ensure you enter it correctly. The wallet address will be printed, and you will have a chance to save it. Enter yes
and your wallet will be recovered and saved into the directory you are currently in.
DANGER: This will save your file as an unencrypted wallet.json
file. Make sure you encrypt this file with a secure passphrase you will not lose.
This guide ensures you can manage, back up, and recover your BTQ CLI wallet effectively.
Last updated