DumpKeys

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
Can anyone please give me the commands to dump all private keys at once, including change addresses? Is there a way to glean the private keys from the wallet.dat?

Thank you!

Pablo.
 

alex-ru

Grizzled Member
Dash Support Group
Jul 14, 2014
2,374
3,242
1,183
It is not the answer, but alternative way - send all DASH to one address and dump Private key of this address.
It is not good in terms of DarkSend-privacy, but much easier.
 
  • Like
Reactions: buster

splawik21

Moderator
Dash Core Team
Foundation Member
Dash Support Group
Apr 8, 2014
1,937
1,294
1,283
fible1 afaik you need to dump each address every time....
meaby UdjinM6 knows something better?
 

UdjinM6

Official Dash Dev
Core Developer
Dash Core Team
May 20, 2014
3,639
3,537
1,183
Can anyone please give me the commands to dump all private keys at once, including change addresses?
Not now, wait for v12:
Code:
> help dumpwallet

dumpwallet "filename"

Dumps all wallet keys in a human-readable format.

Arguments:
1. "filename"    (string, required) The filename

Examples:
> dash-cli dumpwallet "test"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:9998/
Is there a way to glean the private keys from the wallet.dat?
No, you need to create new one and import keys you need. And that will be easier in v12 too:
Code:
> help importwallet

importwallet "filename"

Imports keys from a wallet dump file (see dumpwallet).

Arguments:
1. "filename"    (string, required) The wallet file

Examples:

Dump the wallet
> dash-cli dumpwallet "test"

Import the wallet
> dash-cli importwallet "test"

Import using the json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:9998/
 

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
Thanks Udjin, looking good :).

Pablo.