curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "1.0",
"method": "validateaddress",
"params": [
"bc1pmvg0vjl7cgayamkd4kvgyktx5849gul67c85pygvt52mpwmx6dtqp92l8r"
],
"id": 1
}
'{
"result": {
"isvalid": true,
"address": "<string>",
"scriptPubKey": "<string>",
"ismine": true,
"iswatchonly": true,
"isscript": true,
"script": "<string>",
"hex": "<string>",
"addresses": [
"<string>"
],
"sigsrequired": 123,
"pubkey": "<string>",
"iscompressed": true,
"account": "<string>",
"timestamp": 123,
"hdkeypath": "<string>",
"hdseedid": "<string>",
"hdmasterfingerprint": "<string>",
"labels": [
"<string>"
]
},
"error": {},
"id": 123
}curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "1.0",
"method": "validateaddress",
"params": [
"bc1pmvg0vjl7cgayamkd4kvgyktx5849gul67c85pygvt52mpwmx6dtqp92l8r"
],
"id": 1
}
'{
"result": {
"isvalid": true,
"address": "<string>",
"scriptPubKey": "<string>",
"ismine": true,
"iswatchonly": true,
"isscript": true,
"script": "<string>",
"hex": "<string>",
"addresses": [
"<string>"
],
"sigsrequired": 123,
"pubkey": "<string>",
"iscompressed": true,
"account": "<string>",
"timestamp": 123,
"hdkeypath": "<string>",
"hdseedid": "<string>",
"hdmasterfingerprint": "<string>",
"labels": [
"<string>"
]
},
"error": {},
"id": 123
}validateaddress method checks if a given Bitcoin address is valid and provides detailed information about it. This includes whether the address is valid, its scriptPubKey, if it belongs to the wallet, and more.
address (required): The Bitcoin address to validate.result — an object containing various details about the address, such as its validity, ownership, script type, associated public key, and more.error — an object containing an error message if an error occurred, otherwise null.id — an integer representing the ID of the request.validateaddress method is useful for verifying the validity of a Bitcoin address before sending transactions. It can also provide wallet-related information for addresses, aiding in wallet management and transaction preparation.Information about the validation of the address.
Show child attributes
Whether the address is a valid Bitcoin address.
The Bitcoin address validated (if valid).
The hex-encoded scriptPubKey generated by the address.
Whether the address belongs to the wallet (if wallet support is enabled).
Whether the address is watch-only (if wallet support is enabled).
Whether the address is a script.
The type of script, if isscript is true.
The hex-encoded redeemScript (for P2SH) or witnessScript (for P2WSH), if applicable.
Array of addresses associated with the script (for multisig scripts).
Number of signatures required (for multisig scripts).
The hex-encoded public key (for P2PKH and P2WPKH addresses).
Whether the public key is compressed.
DEPRECATED. The account associated with the address (will be removed in future versions).
Timestamp of the address if known.
The HD keypath, if the address is HD wallet related.
The Hash160 of the HD seed.
The fingerprint of the master key.
User-assigned labels for the address.
Was this page helpful?