Extract a broadcastable transaction from a signed PSBT
A signing service often returns a base64 PSBT while the broadcast service expects transaction hex. The finalizer tells the integration which format is available.
Read the completion flag first
Use a signed test packet in PSBT. With extraction enabled, a complete result contains hex. The inspection below reports only field presence, keeping full transaction bytes out of the log.
bitcoin-cli finalizepsbt "$PSBT" true | jq '{complete, has_hex: has("hex"), has_psbt: has("psbt")}'
Handle both outcomes
When complete is false, retain the returned PSBT and inspect unfinished inputs. When true, the extracted hex is suitable for a separate acceptance test or broadcast call. Finalization performs neither network submission nor a check that the inputs still exist in the current UTXO set.
bitcoincore.org finalizepsbt · bitcoincore.org testmempoolaccept