Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# PSBT Howto for Bitcoin Core3Since Bitcoin Core 0.17, an RPC interface exists for Partially Signed Bitcoin4Transactions (PSBTs, as specified in5[BIP 174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki)).7This document describes the overall workflow for producing signed transactions8through the use of PSBT, and the specific RPC commands used in typical9scenarios.11## PSBT in general13PSBT is an interchange format for Bitcoin transactions that are not fully signed14yet, together with relevant metadata to help entities work towards signing it.15It is intended to simplify workflows where multiple parties need to cooperate to16produce a transaction. Examples include hardware wallets, multisig setups, and17[CoinJoin](https://bitcointalk.org/?topic=279249) transactions.19### Overall workflow21Overall, the construction of a fully signed Bitcoin transaction goes through the22following steps:24- A **Creator** proposes a particular transaction to be created. They construct25a PSBT that contains certain inputs and outputs, but no additional metadata.26- For each input, an **Updater** adds information about the UTXOs being spent by27the transaction to the PSBT. They also add information about the scripts and28public keys involved in each of the inputs (and possibly outputs) of the PSBT.29- **Signers** inspect the transaction and its metadata to decide whether they30agree with the transaction. They can use amount information from the UTXOs31to assess the values and fees involved. If they agree, they produce a32partial signature for the inputs for which they have relevant key(s).33- A **Finalizer** is run for each input to convert the partial signatures and34possibly script information into a final `scriptSig` and/or `scriptWitness`.35- An **Extractor** produces a valid Bitcoin transaction (in network format)36from a PSBT for which all inputs are finalized.38Generally, each of the above (excluding Creator and Extractor) will simply39add more and more data to a particular PSBT, until all inputs are fully signed.40In a naive workflow, they all have to operate sequentially, passing the PSBT41from one to the next, until the Extractor can convert it to a real transaction.42In order to permit parallel operation, **Combiners** can be employed which merge43metadata from different PSBTs for the same unsigned transaction.45The names above in bold are the names of the roles defined in BIP174. They're46useful in understanding the underlying steps, but in practice, software and47hardware implementations will typically implement multiple roles simultaneously.49## PSBT in Bitcoin Core51### RPCs53- **`converttopsbt` (Creator)** is a utility RPC that converts an54unsigned raw transaction to PSBT format. It ignores existing signatures.55- **`createpsbt` (Creator)** is a utility RPC that takes a list of inputs and56outputs and converts them to a PSBT with no additional information. It is57equivalent to calling `createrawtransaction` followed by `converttopsbt`.58- **`walletcreatefundedpsbt` (Creator, Updater)** is a wallet RPC that creates a59PSBT with the specified inputs and outputs, adds additional inputs and change60to it to balance it out, and adds relevant metadata. In particular, for inputs61that the wallet knows about (counting towards its normal or watch-only62balance), UTXO information will be added. For outputs and inputs with UTXO63information present, key and script information will be added which the wallet64knows about. It is equivalent to running `createrawtransaction`, followed by65`fundrawtransaction`, and `converttopsbt`.66- **`walletprocesspsbt` (Updater, Signer, Finalizer)** is a wallet RPC that takes as67input a PSBT, adds UTXO, key, and script data to inputs and outputs that miss68it, and optionally signs inputs. Where possible it also finalizes the partial69signatures.70- **`descriptorprocesspsbt` (Updater, Signer, Finalizer)** is a node RPC that takes71as input a PSBT and a list of descriptors. It updates SegWit inputs with72information available from the UTXO set and the mempool and signs the inputs using73the provided descriptors. Where possible it also finalizes the partial signatures.74- **`utxoupdatepsbt` (Updater)** is a node RPC that takes a PSBT and updates it75to include information available from the UTXO set (works only for SegWit76inputs).77- **`finalizepsbt` (Finalizer, Extractor)** is a utility RPC that finalizes any78partial signatures, and if all inputs are finalized, converts the result to a79fully signed transaction which can be broadcast with `sendrawtransaction`.80- **`combinepsbt` (Combiner)** is a utility RPC that implements a Combiner. It81can be used at any point in the workflow to merge information added to82different versions of the same PSBT. In particular it is useful to combine the83output of multiple Updaters or Signers.84- **`joinpsbts`** (Creator) is a utility RPC that joins multiple PSBTs together,85concatenating the inputs and outputs. This can be used to construct CoinJoin86transactions.87- **`decodepsbt`** is a diagnostic utility RPC which will show all information in88a PSBT in human-readable form, as well as compute its eventual fee if known.89- **`analyzepsbt`** is a utility RPC that examines a PSBT and reports the90current status of its inputs, the next step in the workflow if known, and if91possible, computes the fee of the resulting transaction and estimates the92final weight and feerate.95### Workflows97#### Multisig with multiple Bitcoin Core instances99For a quick start see [Basic M-of-N multisig example using descriptor wallets and PSBTs](./descriptors.md#basic-multisig-example).
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.