validateaddress

util

v0.13.1

validateaddress "bitcoinaddress"

Return information about the given bitcoin address.

Arguments:
1. "bitcoinaddress" (string, required) The bitcoin address to validate

Result:
{
"isvalid" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
"address" : "bitcoinaddress", (string) The bitcoin address validated
"scriptPubKey" : "hex", (string) The hex encoded scriptPubKey generated by the address
"ismine" : true|false, (boolean) If the address is yours or not
"iswatchonly" : true|false, (boolean) If the address is watchonly
"isscript" : true|false, (boolean) If the key is a script
"pubkey" : "publickeyhex", (string) The hex value of the raw public key
"iscompressed" : true|false, (boolean) If the address is compressed
"account" : "account" (string) DEPRECATED. The account associated with the address, "" is the default account
"hdkeypath" : "keypath" (string, optional) The HD keypath if the key is HD and available
"hdmasterkeyid" : "" (string, optional) The Hash160 of the HD master pubkey
}

Examples:
> bitcoin-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
Don't trust. Verify. Docs extracted from src/rpc/misc.cpp#L149-L174.