Skip to main content
9 votes
Accepted

Expected use model for PSBT

It is important to note that with this process, you will want to use a wallet that does not have private keys. Otherwise, you could accidentally be sending Bitcoin to an address that is in the online ...
Ava Chow's user avatar
  • 71.1k
7 votes
Accepted

What does PSBT stand for?

It stands for "Partially Signed Bitcoin Transaction". Bitcoin Core's documentation describes it as: PSBT is an interchange format for Bitcoin transactions that are not fully signed yet, ...
Geremia's user avatar
  • 4,704
6 votes
Accepted

What is the difference between PSBT support in Coldcard and Trezor?

The Coldcard handles PSBT directly and natively. A PSBT can given to the device by writing it to a microSD card and inserting the card into the device. It will be able to load the PSBT and process it ...
Ava Chow's user avatar
  • 71.1k
5 votes

How to resolve error when trying to sign and broadcast PSBT transaction via electrum - (Witness program hash mismatch code -26)?

In signing with the second party, the multisig script that is your witness script got messed up. In both the initial PSBT and the first signing, we see that the witness script is ...
Ava Chow's user avatar
  • 71.1k
5 votes

Need help moving funds from legacy address, Coldcard won't sign psbt

It sounds like you imported only the xpub without the information that identifies where the xpub came from. This information, known as origin information, contains the fingerprint of the master key ...
Ava Chow's user avatar
  • 71.1k
4 votes
Accepted

How to convert PSBT transaction (base64) to raw/serialized (hex) transaction?

Yes, once the PSBT is finalized you can extract a fully-signed raw transaction from it (using the finalizepsbt RPC). As your PSBT does not have signatures yet, there is no point in constructing an ...
Pieter Wuille's user avatar
4 votes

Problem making multisig PSBT on walletcreatefundedpsbt

Create a multisig with bitcoin-cli createmultisig 2 "["pubkey1", "pubkey2"]" Here is your problem. createmultisig is a utility function that only computes the multisig ...
Pieter Wuille's user avatar
4 votes

Signing a bitcoin transaction OFFLINE fails

signrawtransactionwithwallet uses the wallet for two purposes: Finding the private keys necessary to sign with (which you dealt with by importing) Finding the transaction outputs that are being spent ...
Pieter Wuille's user avatar
4 votes
Accepted

What is the exact difference between combinepsbt and joinpsbts

combinepsbt takes multiple PSBTs that have different input data and merges them. The base transaction must be exactly the same, i.e. the same inputs are consumed and the same outputs are created. The ...
Ava Chow's user avatar
  • 71.1k
4 votes

Segwit & Offline Signing

Answered on Twitter The hash of the provided prevtx must match the prevtx hash given in the input. The attacker is unable to construct a fake prevtx that hashes to a predefined value. The prevtx ...
justinmoon's user avatar
4 votes
Accepted

Why was the bip32 fingerprint used for bip174 psbt?

Why was the fingerprint chosen for psbt instead of the full hash? Collisions aren't that rare for just 4 bytes of data and adding mitigations in the psbt transaction parsing for such a case seems ...
Ava Chow's user avatar
  • 71.1k
4 votes

Is it possible to broadcast psbt in bitcoin core?

No, it is not possible without using finalizepsbt first to get the raw transaction. This is intentional as PSBTs will primarily be incomplete and thus cannot be broadcast.
Ava Chow's user avatar
  • 71.1k
4 votes
Accepted

Signing PSBTs to spend from Taproot multisig address

When you create the PSBT with createpsbt, it does not contain any information about the inputs. As wallets1-3 also do not have any information about the inputs, they are unable to sign it. It is only ...
Ava Chow's user avatar
  • 71.1k
4 votes

What is the purpose of BIP32 derivation paths in PSBT?

The PSBT comes with the witness script. The witness script contains derived public keys with no information about their origin. The derivation paths in the PSBT tells the signer: What extended key ...
Antoine Poinsot's user avatar
4 votes
Accepted

Why is my P2WSH OP_IF/NOTIF argument not minimal?

In SegWit (by standardness) and Taproot (by consensus), the arguments to OP_IF and OP_NOTIF must be minimal, i.e. be either the empty vector or the one-byte vector 01. Your transaction uses 00, which ...
Vojtěch Strnad's user avatar
3 votes
Accepted

`createpsbt` RPC call doesn't provide PSBT inputs & outputs

It's not supposed to. createpsbt does not have access to the wallet so it cannot fill in any input or output information. If you want those to be filled in, you can use walletcreatefundedpsbt.
Ava Chow's user avatar
  • 71.1k
3 votes

How do you switch your bitcoinjs integrationfrom TransactionBuilder to transactions-psbt.js?

You're only signing the first input? tx.sign(0, owner); Usually every input has to be signed somehow. I also struggled with the switch to Psbt. Biggest difference was basically requirement to have a ...
ildarmgt's user avatar
3 votes
Accepted

Why did the core developers choose base64 for PSBT encoding?

Since PSBTs can be fairly large, I wanted to use an encoding that compressed better than hex and was already in use and implemented by many clients. Base64 was already in use by other clients as ...
Ava Chow's user avatar
  • 71.1k
3 votes
Accepted

PSBT (BIP-174, Partially Signed Bitcoin Transaction) Ordering of keys

There is no mandatory ordering. If you assume your parser is correct, then it is fine to compare the objects themselves. However, to be sure everything is correct, I would suggest that you compare the ...
Ava Chow's user avatar
  • 71.1k
3 votes
Accepted

Create a .psbt using the BitcoinCore client

The "Create Unsigned" button is only available to wallets with private keys disabled (i.e. watch only wallets). So you will need to create a new wallet and choose the "Disable private ...
Ava Chow's user avatar
  • 71.1k
3 votes
Accepted

Which hardware wallets require importation of PSBT for knowledge of multisig set up?

One of the tasks of a signer is to determine whether it should sign something. There are a few different schools of thought on what should be done for this determination, however many hardware signers ...
Ava Chow's user avatar
  • 71.1k
2 votes

Why is not possibile to convert a signed transaction into psbt?

Given just a signed transaction, it is difficult to extract all of the data in the scriptSig or scriptWitness into PSBT's input fields. This requires having the UTXO and then interpreting and ...
Ava Chow's user avatar
  • 71.1k
2 votes
Accepted

`walletcreatefundedpsbt` with unconfirmed inputs

Bitcoin Core will never select unconfirmed incoming outputs. These are always considered to be untrusted and not safe for coin selection. This applies to any transactions that Bitcoin Core creates, ...
Ava Chow's user avatar
  • 71.1k
2 votes
Accepted

How to sign a PSBT transaction?

As I commented, with the psbt package from btcsuite/btcutil it is possible. I have created an example of how to use it. I don't know if this is the best/most efficient way of doing it. But I hope ...
Bjarne Magnussen's user avatar
2 votes

Why isn't my PSBT considered complete after walletprocesspsbt and finalizepsbt?

To get more details about the next steps for a PSBT, you can use the analyzepsbt RPC. Additionally, decodepsbt will tell you what information is in a PSBT so you can use that to inspect the PSBT to ...
Ava Chow's user avatar
  • 71.1k
2 votes
Accepted

WitnessScript vs. Script Witness

PSBT_IN_WITNESS_SCRIPT is specifically the actually executed script for a P2WSH or P2SH-P2WSH scriptPubKey being spent. It is added by an Updater who knows it. PSBT_IN_FINAL_SCRIPTWITNESS is the ...
Pieter Wuille's user avatar
2 votes
Accepted

How would a PSBT signer identify a non-bip32 key?

PSBT_*_BIP32_DERIVATION can and should be used even for keys that are not BIP32 derived. It would simply be the fingerprint of the key itself, followed by a derivation path of 0 length. Every key can ...
Ava Chow's user avatar
  • 71.1k
2 votes
Accepted

Handling 'Has SIGHASH_SINGLE' flag for psbt2 (BIP370)

Figuring out how to handle SIGHASH_SINGLE inputs in PSBTv2 was one of the major problems when designing it. Unfortunately, when this was brought up on the mailing list, there was little to no response,...
Ava Chow's user avatar
  • 71.1k
2 votes
Accepted

Taproot signing with PSBT: How to determine signing method?

Yes, that looks correct. I suppose you are correct that PSBT_IN_TAP_INTERNAL_KEY is not strictly necessary, but one of the main ideas with PSBTs is to include as much information as possible, and to ...
Ava Chow's user avatar
  • 71.1k

Only top scored, non community-wiki answers of a minimum length are eligible