Skip to main content

finalizepsbt

Overview

The 'finalizepsbt' method is used to finalize the inputs of a PSBT (Partially Signed Bitcoin Transaction). If the transaction is fully signed, it will generate a network serialized transaction which can be broadcast with a method such as sendrawtransaction. If not, a PSBT will be created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete. This method implements the Finalizer and Extractor roles.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--body-data '{
"jsonrpc": "1.0",
"id": "1",
"method": "finalizepsbt",
"params": []
}
' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • psbt (string, required): A base64 string of a PSBT.

Response

{
"psbt": "string",
"hex": "string",
"complete": "boolean"
}
  • psbt (string): The base64-encoded partially signed transaction if not extracted.
  • hex (string): The hex-encoded network transaction if extracted.
  • complete (boolean): Indicates if the transaction has a complete set of signatures.