mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Introduce KeyOriginInfo for fingerprint + path
This commit is contained in:
@@ -1460,11 +1460,8 @@ UniValue decodepsbt(const JSONRPCRequest& request)
|
||||
UniValue keypath(UniValue::VOBJ);
|
||||
keypath.pushKV("pubkey", HexStr(entry.first));
|
||||
|
||||
uint32_t fingerprint = entry.second.at(0);
|
||||
keypath.pushKV("master_fingerprint", strprintf("%08x", bswap_32(fingerprint)));
|
||||
|
||||
entry.second.erase(entry.second.begin());
|
||||
keypath.pushKV("path", WriteHDKeypath(entry.second));
|
||||
keypath.pushKV("master_fingerprint", strprintf("%08x", ReadBE32(entry.second.fingerprint)));
|
||||
keypath.pushKV("path", WriteHDKeypath(entry.second.path));
|
||||
keypaths.push_back(keypath);
|
||||
}
|
||||
in.pushKV("bip32_derivs", keypaths);
|
||||
@@ -1522,12 +1519,8 @@ UniValue decodepsbt(const JSONRPCRequest& request)
|
||||
for (auto entry : output.hd_keypaths) {
|
||||
UniValue keypath(UniValue::VOBJ);
|
||||
keypath.pushKV("pubkey", HexStr(entry.first));
|
||||
|
||||
uint32_t fingerprint = entry.second.at(0);
|
||||
keypath.pushKV("master_fingerprint", strprintf("%08x", bswap_32(fingerprint)));
|
||||
|
||||
entry.second.erase(entry.second.begin());
|
||||
keypath.pushKV("path", WriteHDKeypath(entry.second));
|
||||
keypath.pushKV("master_fingerprint", strprintf("%08x", ReadBE32(entry.second.fingerprint)));
|
||||
keypath.pushKV("path", WriteHDKeypath(entry.second.path));
|
||||
keypaths.push_back(keypath);
|
||||
}
|
||||
out.pushKV("bip32_derivs", keypaths);
|
||||
|
||||
Reference in New Issue
Block a user