@@ -3708,6 +3708,8 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
37083708 return NullUniValue;
37093709 }
37103710
3711+ const std::string example_address = " \" bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\" " ;
3712+
37113713 RPCHelpMan{" getaddressinfo" ,
37123714 " \n Return information about the given bitcoin address.\n "
37133715 " Some of the information will only be present if the address is in the active wallet.\n " ,
@@ -3758,8 +3760,8 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
37583760 " }\n "
37593761 },
37603762 RPCExamples{
3761- HelpExampleCli (" getaddressinfo" , " \" bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl \" " ) +
3762- HelpExampleRpc (" getaddressinfo" , " \" bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl \" " )
3763+ HelpExampleCli (" getaddressinfo" , example_address ) +
3764+ HelpExampleRpc (" getaddressinfo" , example_address )
37633765 },
37643766 }.Check (request);
37653767
@@ -3793,10 +3795,6 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
37933795
37943796 ret.pushKV (" iswatchonly" , bool (mine & ISMINE_WATCH_ONLY));
37953797
3796- // Return DescribeWalletAddress fields.
3797- // Always returned: isscript, ischange, iswitness.
3798- // Optional: witness_version, witness_program, script, hex, pubkeys (array),
3799- // sigsrequired, pubkey, embedded, iscompressed.
38003798 UniValue detail = DescribeWalletAddress (pwallet, dest);
38013799 ret.pushKVs (detail);
38023800
@@ -3809,8 +3807,6 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38093807
38103808 ret.pushKV (" ischange" , pwallet->IsChange (scriptPubKey));
38113809
3812- // Fetch KeyMetadata, if present, for the timestamp, hdkeypath, hdseedid,
3813- // and hdmasterfingerprint fields.
38143810 ScriptPubKeyMan* spk_man = pwallet->GetScriptPubKeyMan (scriptPubKey);
38153811 if (spk_man) {
38163812 if (const CKeyMetadata* meta = spk_man->GetMetadata (dest)) {
0 commit comments