<p>I realize my previous answer is wrong.</p>
<p><a href="https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki" rel="nofollow noreferrer">BIP174</a> defines a number of distinct rules, including:</p>
<ul>
<li>Updater (fill in information about a transaction)</li>
<li>Signer (produce signatures)</li>
<li>Finalizer (construct scriptSig/witnesses using all information/signatures)</li>
<li>Extractor (convert PSBT to a raw transaction that can be submitted to the network)</li>
</ul>
<p>The <code>walletprocesspsbt</code> RPC implements the Updater, Signer, and optionally Finalizer roles. The <code>finalizepsbt</code> RPC implements the Finalizer, and optionally Extractor roles.</p>
<p>Nothing really prevents <code>walletprocesspsbt</code> from also performing the Extractor role if possible, but that just has not been implemented.</p>

CC BY-SA 4.0
2024-07-12T17:27:21.287Z
Ah that makes sense, it finalizes but does not extract.
Fontaine
CC BY-SA 4.0
2024-07-11T15:35:13.910Z
2024-07-11T15:35:13.910Z
Pieter Wuille
<p>I am currently using <code>walletprocesspsbt</code> to optionally finalize a psbt and fill in <code>bip32derivs</code> if not signed already. The psbt is fully signed and finalized but I have to make an additional rpc command <code>finalizepsbt</code> to get the hex, is there a reason <code>walletprocesspsbt</code> doesn't return the final tx hex?</p>

CC BY-SA 4.0
2024-07-03T23:46:11.797Z
My understanding of the documentation is that it should return the hex by default if the transaction is final. Could you clarify that it indeed is complete before you call `finalizepsbt` but the result of `walletprocesspsbt` does not contain the hex?
Murch
CC BY-SA 4.0
2024-07-04T21:52:01.197Z
It's `walletprocesspsbt` which is not returning the hex. I am still on v0.25.0 if that is relevant.
Fontaine
<bitcoin-cli><bip174-psbt>
Why does walletprocesspsbt finalize the psbt but not return the transaction hex?
Fontaine
# Why does walletprocesspsbt finalize the psbt but not return the transaction hex?

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

I am currently using `walletprocesspsbt` to optionally finalize a psbt and fill in `bip32derivs` if not signed already. The psbt is fully signed and finalized but I have to make an additional rpc command `finalizepsbt` to get the hex, is there a reason `walletprocesspsbt` doesn't return the final tx hex?

**Tags:** bitcoin-cli, bip174-psbt

> **Comments:**
> **username_1**: My understanding of the documentation is that it should return the hex by default if the transaction is final. Could you clarify that it indeed is complete before you call `finalizepsbt` but the result of `walletprocesspsbt` does not contain the hex?  
> **username_0**: It's `walletprocesspsbt` which is not returning the hex. I am still on v0.25.0 if that is relevant.  

---

## 1 answers

### Answer by username_2 on 2024-07-11. Score: 1 | Accepted answer

I realize my previous answer is wrong.

[BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki) defines a number of distinct rules, including:

* Updater (fill in information about a transaction)
* Signer (produce signatures)
* Finalizer (construct scriptSig/witnesses using all information/signatures)
* Extractor (convert PSBT to a raw transaction that can be submitted to the network)

The `walletprocesspsbt` RPC implements the Updater, Signer, and optionally Finalizer roles. The `finalizepsbt` RPC implements the Finalizer, and optionally Extractor roles.

Nothing really prevents `walletprocesspsbt` from also performing the Extractor role if possible, but that just has not been implemented.

> **Comments:**
> **username_0**: Ah that makes sense, it finalizes but does not extract.  

---

