finalizepsbt

rawtransactions safe since 0.17.0

finalizes he inputs of a PSBT. If the transaction is fully signed, it will produce a network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete. Implements the Finalizer and Extractor roles.

Share: X Bluesky Mastodon Reddit HN
↑ shares the docs page. Use Share this query below for a link with your current arg values.
Run this RPC switch to raw JSON
A base64 string of a PSBT
If true and the transaction is complete,
running...
Signature: "psbt" ( extract )
Call from your own code

Replace $BITCOIN_RPC_USER / $BITCOIN_RPC_PASSWORD with credentials from your bitcoind's bitcoin.conf, and replace localhost:8332 with your node's RPC address.

Help

finalizepsbt "psbt" ( extract )

Finalize the inputs of a PSBT. If the transaction is fully signed, it will produce a
network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be
created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete.
Implements the Finalizer and Extractor roles.

Arguments:
1. psbt       (string, required) A base64 string of a PSBT
2. extract    (boolean, optional, default=true) If true and the transaction is complete,
              extract and return the complete transaction in normal network serialization instead of the PSBT.

Result:
{                             (json object)
  "psbt" : "str",             (string, optional) The base64-encoded partially signed transaction if not extracted
  "hex" : "hex",              (string, optional) The hex-encoded network transaction if extracted
  "complete" : true|false     (boolean) If the transaction has a complete set of signatures
}

Examples:
> bitcoin-cli finalizepsbt "psbt"
← back to all RPCs