New behavior for dumpwallet command

This commit is contained in:
Shannon Appelcline 2018-01-25 15:56:49 -08:00 committed by GitHub
parent 70cf29b095
commit 492872b987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,14 @@ $ bitcoin-cli importwallet backup.dat
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. 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`. This will create a mywallet.txt file in your current 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! To look at _all_ the keys in your wallet, type `bitcoin-cli ~/dumpwallet mywallet.txt`.
```
$ bitcoin-cli dumpwallet ~/mywallet.txt
{
"filename": "/home/user1/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. 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.
``` ```