update validateaddress help
This commit is contained in:
@@ -468,14 +468,14 @@ UniValue validateaddress(const UniValue& params, bool fHelp, const CPubKey& mypk
|
|||||||
{
|
{
|
||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"validateaddress \"hushaddress\"\n"
|
"validateaddress \"addr\"\n"
|
||||||
"\nReturn information about the given Hush address.\n"
|
"\nReturn information about the given Hush or Hush Smart Chain (HSC) address.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"hushaddress\" (string, required) The Hush address to validate\n"
|
"1. \"addr\" (string, required) The address to validate\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
|
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
|
||||||
" \"address\" : \"hushaddress\", (string) The Hush address validated\n"
|
" \"address\" : \"addr\", (string) The Hush or HSC address validated\n"
|
||||||
" \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n"
|
" \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n"
|
||||||
" \"ismine\" : true|false, (boolean) If the address is yours or not\n"
|
" \"ismine\" : true|false, (boolean) If the address is yours or not\n"
|
||||||
" \"isscript\" : true|false, (boolean) If the key is a script\n"
|
" \"isscript\" : true|false, (boolean) If the key is a script\n"
|
||||||
@@ -484,8 +484,8 @@ UniValue validateaddress(const UniValue& params, bool fHelp, const CPubKey& mypk
|
|||||||
" \"account\" : \"account\" (string) DEPRECATED. The account associated with the address, \"\" is the default account\n"
|
" \"account\" : \"account\" (string) DEPRECATED. The account associated with the address, \"\" is the default account\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("validateaddress", "\"RTZMZHDFSTFQst8XmX2dR4DaH87cEUs3gC\"")
|
+ HelpExampleCli("validateaddress", "\"RTZMZHDFSTFQst8XmX2dR4DaH87cEUlulz\"")
|
||||||
+ HelpExampleRpc("validateaddress", "\"RTZMZHDFSTFQst8XmX2dR4DaH87cEUs3gC\"")
|
+ HelpExampleRpc("validateaddress", "\"RTZMZHDFSTFQst8XmX2dR4DaH87cEUlulz\"")
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
@@ -495,7 +495,7 @@ UniValue validateaddress(const UniValue& params, bool fHelp, const CPubKey& mypk
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
CTxDestination dest = DecodeDestination(params[0].get_str());
|
CTxDestination dest = DecodeDestination(params[0].get_str());
|
||||||
bool isValid = IsValidDestination(dest);
|
bool isValid = IsValidDestination(dest);
|
||||||
|
|
||||||
UniValue ret(UniValue::VOBJ);
|
UniValue ret(UniValue::VOBJ);
|
||||||
ret.push_back(Pair("isvalid", isValid));
|
ret.push_back(Pair("isvalid", isValid));
|
||||||
|
|||||||
Reference in New Issue
Block a user