@@ -3762,18 +3762,18 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
3762
3762
" getaddressinfo output fields for the embedded address, excluding metadata (timestamp, hdkeypath,\n "
3763
3763
" hdseedid) and relation to the wallet (ismine, iswatchonly).\n "
3764
3764
" \" iscompressed\" : true|false, (boolean, optional) If the pubkey is compressed.\n "
3765
- " \" label\" : \" label\" (string) The label associated with the address. Defaults to \"\" . Equivalent to the label name in the labels array below.\n "
3765
+ " \" label\" : \" label\" (string) DEPRECATED. The label associated with the address. Defaults to \"\" . Replaced by the labels array below.\n "
3766
3766
" \" timestamp\" : timestamp, (number, optional) The creation time of the key, if available, expressed in " + UNIX_EPOCH_TIME + " .\n "
3767
3767
" \" hdkeypath\" : \" keypath\" (string, optional) The HD keypath, if the key is HD and available.\n "
3768
3768
" \" hdseedid\" : \" <hash160>\" (string, optional) The Hash160 of the HD seed.\n "
3769
3769
" \" hdmasterfingerprint\" : \" <hash160>\" (string, optional) The fingerprint of the master key.\n "
3770
- " \" labels\" (json object) An array of labels associated with the address. Currently limited to one label but returned\n "
3771
- " as an array to keep the API stable if multiple labels are enabled in the future.\n "
3770
+ " \" labels\" (array) Array of labels associated with the address. Currently limited to one label but returned\n "
3771
+ " as an array to keep the API stable if multiple labels are enabled in the future.\n "
3772
3772
" [\n "
3773
- " \" label name\" (string) The label name. Defaults to \"\" . Equivalent to the label field above. \n \n"
3773
+ " \" label name\" (string) The label name. Defaults to \"\" .\n "
3774
3774
" DEPRECATED, will be removed in 0.21. To re-enable, launch bitcoind with `-deprecatedrpc=labelspurpose`:\n "
3775
- " { (json object of label data) \n "
3776
- " \" name\" : \" label name\" (string) The label name. Defaults to \"\" . Equivalent to the label field above. \n "
3775
+ " {\n "
3776
+ " \" name\" : \" label name\" (string) The label name. Defaults to \"\" .\n "
3777
3777
" \" purpose\" : \" purpose\" (string) The purpose of the associated address (send or receive).\n "
3778
3778
" }\n "
3779
3779
" ]\n "
@@ -3817,10 +3817,10 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
3817
3817
UniValue detail = DescribeWalletAddress (pwallet, dest);
3818
3818
ret.pushKVs (detail);
3819
3819
3820
- // Return label field if existing. Currently only one label can be
3821
- // associated with an address, so the label should be equivalent to the
3820
+ // DEPRECATED: Return label field if existing. Currently only one label can
3821
+ // be associated with an address, so the label should be equivalent to the
3822
3822
// value of the name key/value pair in the labels array below.
3823
- if (pwallet->mapAddressBook .count (dest)) {
3823
+ if (( pwallet->chain (). rpcEnableDeprecated ( " label " )) && (pwallet-> mapAddressBook .count (dest) )) {
3824
3824
ret.pushKV (" label" , pwallet->mapAddressBook [dest].name );
3825
3825
}
3826
3826
0 commit comments