Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 4,411 Lines • ▼ Show 20 Lines | UniValue getaddressinfo(const Config &config, const JSONRPCRequest &request) { | ||||
if (address_book_entry) { | if (address_book_entry) { | ||||
ret.pushKV("label", address_book_entry->GetLabel()); | ret.pushKV("label", address_book_entry->GetLabel()); | ||||
} | } | ||||
ret.pushKV("ischange", pwallet->IsChange(scriptPubKey)); | ret.pushKV("ischange", pwallet->IsChange(scriptPubKey)); | ||||
ScriptPubKeyMan *spk_man = pwallet->GetScriptPubKeyMan(scriptPubKey); | ScriptPubKeyMan *spk_man = pwallet->GetScriptPubKeyMan(scriptPubKey); | ||||
if (spk_man) { | if (spk_man) { | ||||
if (const CKeyMetadata *meta = spk_man->GetMetadata(dest)) { | if (const std::unique_ptr<CKeyMetadata> meta = | ||||
spk_man->GetMetadata(dest)) { | |||||
ret.pushKV("timestamp", meta->nCreateTime); | ret.pushKV("timestamp", meta->nCreateTime); | ||||
if (meta->has_key_origin) { | if (meta->has_key_origin) { | ||||
ret.pushKV("hdkeypath", WriteHDKeypath(meta->key_origin.path)); | ret.pushKV("hdkeypath", WriteHDKeypath(meta->key_origin.path)); | ||||
ret.pushKV("hdseedid", meta->hd_seed_id.GetHex()); | ret.pushKV("hdseedid", meta->hd_seed_id.GetHex()); | ||||
ret.pushKV("hdmasterfingerprint", | ret.pushKV("hdmasterfingerprint", | ||||
HexStr(meta->key_origin.fingerprint, | HexStr(meta->key_origin.fingerprint, | ||||
meta->key_origin.fingerprint + 4)); | meta->key_origin.fingerprint + 4)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 622 Lines • Show Last 20 Lines |