<p>Finalizing a PSBT does not require private keys so can be done by any external finalizer that understands the output script.</p>
<p>One such is Bitcoin Core and it's <code>finalizepsbt</code> RPC. This will create the final scriptSig and scriptWitness for each input that it understands that has signatures. If all inputs are finalized, it will also produce the raw transaction hex that can be broadcast with <code>sendrawtransaction</code>.</p>

CC BY-SA 4.0
2024-08-08T15:45:30.287Z
2024-08-08T15:45:30.287Z
Ava Chow
<p>Most device APIs for HWI have a method <code>sign_tx(tx: PSBT)</code> that has a return type of PSBT. If the hardware device I'm interacting with provides the final signature necessary, how do I, from the output of the method, get a ready-to-broadcast PSBT?</p>

<bip174-psbt><hwi>
How do you finalize a PSBT when the last signature is provided by a HWW?
Myles Sherman
# How do you finalize a PSBT when the last signature is provided by a HWW?

(Asked by: username_0 on 2024-08-07)

Most device APIs for HWI have a method `sign_tx(tx: PSBT)` that has a return type of PSBT. If the hardware device I'm interacting with provides the final signature necessary, how do I, from the output of the method, get a ready-to-broadcast PSBT?

**Tags:** bip174-psbt, hwi


---

## 1 answers

### Answer by username_1 on 2024-08-08. Score: 3 | Accepted answer

Finalizing a PSBT does not require private keys so can be done by any external finalizer that understands the output script.

One such is Bitcoin Core and it's `finalizepsbt` RPC. This will create the final scriptSig and scriptWitness for each input that it understands that has signatures. If all inputs are finalized, it will also produce the raw transaction hex that can be broadcast with `sendrawtransaction`.


---

