Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
[RPC] dumpmasterprivkey command #9504
Conversation
|
|
|
|
fanquake
added
the
RPC/REST/ZMQ
label
Jan 10, 2017
jonasschnelli
requested changes
Jan 11, 2017
Not sure if we should add more private key exporting features because it increases the risk of doing something wrong with that.
If we are going to add this, it would require...
... add dumpmasterprivkey to the UI's sensitiv data filter
... add a test somewhere
| + | ||
| + EnsureWalletIsUnlocked(); | ||
| + | ||
| + CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID; |
jonasschnelli
Jan 11, 2017
Member
Well,... you need the masterKeys CKeyID anyway,... but I guess it would still make sense to use CWallet::IsHDEnabled()
| @@ -2602,6 +2603,7 @@ static const CRPCCommand commands[] = | ||
| { "wallet", "addwitnessaddress", &addwitnessaddress, true, {"address"} }, | ||
| { "wallet", "backupwallet", &backupwallet, true, {"destination"} }, | ||
| { "wallet", "dumpprivkey", &dumpprivkey, true, {"address"} }, | ||
| + { "wallet", "dumpmasterprivkey", &dumpmasterprivkey, true, {} }, |
|
@jonasschnelli there is no sensitive data filter for the |
|
Addressed nits and added a test. It may need more tests, but I'm not sure what actually needs to be tested. |
Argh. Right. I was confusing the sensitiv history filter with the idea of having a filter that disables certain sensitive commands. |
achow101 commentedJan 10, 2017
RPC command to export the master private key from a wallet.