Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 833 Lines • ▼ Show 20 Lines | UniValue dumpwallet(const Config &config, const JSONRPCRequest &request) { | ||||
// add the base58check encoded extended master if the wallet uses HD | // add the base58check encoded extended master if the wallet uses HD | ||||
CKeyID masterKeyID = pwallet->GetHDChain().masterKeyID; | CKeyID masterKeyID = pwallet->GetHDChain().masterKeyID; | ||||
if (!masterKeyID.IsNull()) { | if (!masterKeyID.IsNull()) { | ||||
CKey key; | CKey key; | ||||
if (pwallet->GetKey(masterKeyID, key)) { | if (pwallet->GetKey(masterKeyID, key)) { | ||||
CExtKey masterKey; | CExtKey masterKey; | ||||
masterKey.SetMaster(key.begin(), key.size()); | masterKey.SetMaster(key.begin(), key.size()); | ||||
CBitcoinExtKey b58extkey; | file << "# extended private masterkey: " << EncodeExtKey(masterKey) | ||||
b58extkey.SetKey(masterKey); | |||||
file << "# extended private masterkey: " << b58extkey.ToString() | |||||
<< "\n\n"; | << "\n\n"; | ||||
} | } | ||||
} | } | ||||
for (std::vector<std::pair<int64_t, CKeyID>>::const_iterator it = | for (std::vector<std::pair<int64_t, CKeyID>>::const_iterator it = | ||||
vKeyBirth.begin(); | vKeyBirth.begin(); | ||||
it != vKeyBirth.end(); it++) { | it != vKeyBirth.end(); it++) { | ||||
const CKeyID &keyid = it->second; | const CKeyID &keyid = it->second; | ||||
std::string strTime = FormatISO8601DateTime(it->first); | std::string strTime = FormatISO8601DateTime(it->first); | ||||
▲ Show 20 Lines • Show All 608 Lines • Show Last 20 Lines |