Parameters
- addressstringREQUIRED
The bitcoin address to validate
Returns
- resultobject
Validation result for the address
- isvalidboolean
If the address is valid or not
- addressstring
(Optional) The validated bitcoin address
- scriptPubKeystring
(Optional) The hex encoded scriptPubKey generated by the address
- isscriptboolean
(Optional) It verifies if the key is a script or not
- iswitnessboolean
(Optional) It verifies if the address is a witness address or not
- witness_versioninteger
(Optional) The version number of the witness program
- witness_programstring
(Optional) The hex value of the witness program
- errorstring
(Optional) Error message when
isvalidis false
- error_locationsarray
(Optional) Character indexes related to the validation error
- errorobject | null
(Optional) JSON-RPC error when the request failed; omitted or null on success
- codeinteger
Error code
- messagestring
Error message
Request
Response
1{2"jsonrpc": "2.0",3"result": {4"isvalid": true,5"address": "bc1q5hy2fmqr7ua0a6rj6scekgszctxmlts8smwxcl",6"scriptPubKey": "0014a5c8a4ec03f73afee872d4319b2202c2cdbfae07",7"isscript": false,8"iswitness": true,9"witness_version": 0,10"witness_program": "a5c8a4ec03f73afee872d4319b2202c2cdbfae07"11},12"id": 113}
1{2"jsonrpc": "2.0",3"result": {4"isvalid": true,5"address": "bc1q5hy2fmqr7ua0a6rj6scekgszctxmlts8smwxcl",6"scriptPubKey": "0014a5c8a4ec03f73afee872d4319b2202c2cdbfae07",7"isscript": false,8"iswitness": true,9"witness_version": 0,10"witness_program": "a5c8a4ec03f73afee872d4319b2202c2cdbfae07"11},12"id": 113}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free