Skip to main content

validateaddress

Command#

pacprotocol-cli validateaddress "address"

Return information about the given PAC address. DEPRECATION WARNING: Parts of this command have been deprecated and moved to getaddressinfo. Clients must transition to using getaddressinfo to access this information before upgrading to v0.18. The following deprecated fields have moved to getaddressinfo and will only be shown here with -deprecatedrpc=validateaddress: ismine, iswatchonly, script, hex, pubkeys, sigsrequired, pubkey, addresses, embedded, iscompressed, account, timestamp, hdkeypath.

Arguments#

address *#

(string, required)

The PAC address to validate

Examples#

pacprotocol-cli validateaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Result#

{
"isvalid" : true|false, #(boolean) If the address is valid or not. If not, this is the only property returned.
"address" : "address", #(string) The PAC address validated
"scriptPubKey" : "hex", #(string) The hex encoded scriptPubKey generated by the address
"isscript" : true|false, #(boolean) If the key is a script
}

Running following help command

pacprotocol-cli help validateaddress

Will produce following output:

validateaddress "address"
Return information about the given PAC address.
DEPRECATION WARNING: Parts of this command have been deprecated and moved to getaddressinfo. Clients must
transition to using getaddressinfo to access this information before upgrading to v0.18. The following deprecated
fields have moved to getaddressinfo and will only be shown here with -deprecatedrpc=validateaddress: ismine, iswatchonly,
script, hex, pubkeys, sigsrequired, pubkey, addresses, embedded, iscompressed, account, timestamp, hdkeypath.
Arguments:
1. "address" (string, required) The PAC address to validate
Result:
{
"isvalid" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
"address" : "address", (string) The PAC address validated
"scriptPubKey" : "hex", (string) The hex encoded scriptPubKey generated by the address
"isscript" : true|false, (boolean) If the key is a script
}
Examples:
> pacprotocol-cli validateaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/