New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RPC] dumpmasterprivkey command #9504
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
src/wallet/rpcwallet.cpp
Outdated
@@ -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, {} }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: column alignment.
src/wallet/rpcdump.cpp
Outdated
|
||
EnsureWalletIsUnlocked(); | ||
|
||
CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CWallet::IsHDEnabled()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well,... you need the masterKeys CKeyID
anyway,... but I guess it would still make sense to use CWallet::IsHDEnabled()
@jonasschnelli there is no sensitive data filter for the |
e86eb43
to
4589ad3
Compare
Addressed nits and added a test. It may need more tests, but I'm not sure what actually needs to be tested. |
4589ad3
to
342a564
Compare
Argh. Right. I was confusing the sensitiv history filter with the idea of having a filter that disables certain sensitive commands. |
c74e66b
to
dfa8648
Compare
RPC command to export the master private key from a wallet.
dfa8648
to
07fc811
Compare
Closing this for now |
RPC command to export the master private key from a wallet.