utxoupdatepsbt - Bitcoin

Example code for the utxoupdatepsbt JSON-RPC method. Complete guide on how to use utxoupdatepsbt JSON-RPC in GetBlock Web3 documentation.

This method updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set, or both.

Parameters

Parameter
Type
Required
Description

psbt

string

Yes

A base64 string of a PSBT.

descriptors

array

No

An array of output descriptor strings or objects.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "utxoupdatepsbt",
    "params": ["cHNidP8BAHUCAAAAASaBcTce3/KF6Tig7cez..."],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "cHNidP8BAHUCAAAAASaBcTce3/KF6Tig7cez..."
}

Response Parameters

Field
Type
Description

result

string

The updated PSBT in base64 format with UTXO data filled in.

Use Case

The utxoupdatepsbt method is essential for:

  • Adding UTXO data to PSBTs for signing

  • Updating PSBTs with blockchain state

  • Preparing PSBTs for hardware wallet signing

  • Filling in missing witness UTXO information

  • Supporting offline signing workflows

  • Building complete PSBT signing pipelines

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN.

-25

Error parsing PSBT

The PSBT string is malformed or invalid.

Integration With Web3

The utxoupdatepsbt method helps developers:

  • Prepare PSBTs for offline signing

  • Fill in missing UTXO data from blockchain

  • Support hardware wallet integrations

  • Build complete signing workflows

  • Enable watch-only wallet spending

Last updated

Was this helpful?