finalizepsbt

finalizepsbt "psbt" ( extract )

Finalizes the inputs of a PSBT. If the transaction is fully signed, it will produce a network-serialized transaction that can be broadcast using sendrawtransaction. If not fully signed, a PSBT will be returned with the final_scriptSig and final_scriptWitness fields populated for the completed inputs.

This process implements both the Finalizer and Extractor roles.

Argument #1 – psbt

Type: string, required

A base64 string of a PSBT

Argument #2 – extract

Type: boolean, optional, default=true

If true and the transaction is complete,

it will extract and return the complete transaction in standard network serialization format, instead of returning the PSBT.

Result

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

Examples

bitcoinevo-cli finalizepsbt "psbt"