validateaddress

Provide details regarding the specified Bitcoin address.

Example Request and Result for validateaddress method

In this section, we provide an illustrative example of a request made to retrieve details contents using the validateaddress method. Additionally, we present the resulting response containing information about the given Bitcoin address.

Parameters

FieldTypeDescription

address*

string

The bitcoin address to validate

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Provide details regarding the specified Bitcoin address.

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

jsonrpc*

string

1.0

id*

string

bwarelabs

method*

string

validateaddress

params*

string

["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]

{
    "result": {
        "isvalid": false,
        "error_locations": [
            35,
            36
        ],
        "error": "Invalid Bech32 checksum"
    },
    "error": null,
    "id": "bwarelabs"
}

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'content-type: application/json;' \
--data '{
    "jsonrpc": "1.0",
    "id": "bwarelabs",
    "method": "validateaddress",
    "params": [
        "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
    ]
}'

Last updated