From 9830de1bbd944b110e1dea01a9953ccd69ba19b2 Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Tue, 3 Nov 2020 13:12:02 -1000 Subject: [PATCH] fixing wallet dumps CandidateBlock --- 03_3_Setting_Up_Your_Wallet.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/03_3_Setting_Up_Your_Wallet.md b/03_3_Setting_Up_Your_Wallet.md index 9dcfeed..728521c 100644 --- a/03_3_Setting_Up_Your_Wallet.md +++ b/03_3_Setting_Up_Your_Wallet.md @@ -76,17 +76,19 @@ Invalid address ## Optional: Dump Your Wallet -It might seem dangerous having all of your irreplaceable private keys in a single file. That's what `bitcoin-cli backupwallet` is for. It lets you make a copy of your wallet.dat: +It might seem dangerous having all of your irreplaceable private keys in a single file. That's what `bitcoin-cli dumpwallet` is for. It lets you make a copy of your wallet.dat: ``` -$ bitcoin-cli backupwallet ~/backup.dat +$ bitcoin-cli dumpwallet ~/mywallet.txt ``` +The `mywallet.txt` file in your home directory will have a long list of private keys, addresses, and other information. Mind you, you'd never want to put this data out in a plain text file on a Bitcoin setup with real funds! + You can then recover it with `bitcoin-cli importwallet`. ``` -$ bitcoin-cli importwallet backup.dat +$ bitcoin-cli importwallet ~/mywallet.txt ``` But note this requires an unpruned node! ``` -$ bitcoin-cli importwallet ~/backup.dat +$ bitcoin-cli importwallet ~/mywallet.txt error code: -4 error message: Importing wallets is disabled when blocks are pruned @@ -94,17 +96,13 @@ Importing wallets is disabled when blocks are pruned ## Optional: View Your Private Keys -Sometimes, you might want to actually look at the private keys associated with your Bitcoin addresses. Perhaps you want to be able to sign a message or spend bitcoins from a different machine. Perhaps you just want to back up certain important private keys. - -To look at _all_ the keys in your wallet, type `bitcoin-cli dumpwallet ~/mywallet.txt`. +Sometimes, you might want to actually look at the private keys associated with your Bitcoin addresses. Perhaps you want to be able to sign a message or spend bitcoins from a different machine. Perhaps you just want to back up certain important private keys. You can also do this with your dump file, since it's human readable. ``` $ bitcoin-cli dumpwallet ~/mywallet.txt { "filename": "/home/standup/mywallet.txt" } ``` -This will create a `mywallet.txt` file in your home directory with a long list of private keys, addresses, and other information. Mind you, you'd never want to put this data out in a plain text file on a Bitcoin setup with real funds! - More likely, you just want to look at the private key associated with a specific address. This can be done with the `bitcoin-cli dumpprivkey` command. ``` $ bitcoin-cli dumpprivkey "moKVV6XEhfrBCE3QCYq6ppT7AaMF8KsZ1B" @@ -112,7 +110,7 @@ cTv75T4B3NsG92tdSxSfzhuaGrzrmc1rJjLKscoQZXqNRs5tpYhH ``` You can then save that key somewhere safe, preferably somewhere not connected to the internet. -You can import any private key, from a wallet dump or an individual key dump, as follows: +You can also import any private key, from a wallet dump or an individual key dump, as follows: ``` $ bitcoin-cli importprivkey cW4s4MdW7BkUmqiKgYzSJdmvnzq8QDrf6gszPMC7eLmfcdoRHtHh ```