analyzepsbt - Bitcoin
Example code for the analyzepsbt JSON_RPC method. Сomplete guide on how to use analyzepsbt JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCES_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "analyzepsbt",
"params": [
"cHNidP8BAEICAAAAATJIj43goxJCsLjdKM5Uly44S8Vp6cim1VW89Rx5fFPpAAAAAAD/////AQAAAAAAAAAABmoEAAECAwAAAAAAAAA="
],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "analyzepsbt",
"params": [
"cHNidP8BAEICAAAAATJIj43goxJCsLjdKM5Uly44S8Vp6cim1VW89Rx5fFPpAAAAAAD/////AQAAAAAAAAAABmoEAAECAwAAAAAAAAA="
],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS_TOKEN>',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"inputs": [
{
"has_utxo": true,
"is_final": false,
"next": "signer",
"missing": {
"signatures": [
"02c7b8...8e1f"
]
}
}
],
"estimated_vsize": 147,
"estimated_feerate": 0.00001000,
"fee": 0.00000147,
"next": "signer"
}
}Response Parameters
Field
Type
Description
Use Case
Error Handling
Status Code
Error Message
Cause
Integration Notes
Last updated
Was this helpful?