9

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 wallet. This especially important with change addresses because change addresses are automatically pulled from the current wallet. By disabling private keys, ...


4

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 (without this information you can't construct a valid transaction, and the offline wallet, being offline, does not have access to the transactions that ...


4

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 unnecessarily complicated. Fingerprint collisions would still require thousands of signers in a single PSBT to actually be a problem. Collisions aren't all that ...


4

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 hash in the input cannot be changed either, otherwise the network will reject the tx. Basically, you can't create fake previous transactions because that would ...


3

Create a multisig with bitcoin-cli createmultisig 2 "["pubkey1", "pubkey2"]" Here is your problem. createmultisig is a utility function that only computes the multisig address. It doesn't store or otherwise add that address to your wallet. As a result, when you invoke walletprocesspsbt to update/sign, the wallet has no idea ...


3

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 signed messages also uses Base64. It also works well with command line without escaping or quoting so it seemed like a good choice.


3

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 information for each input is combined into the same input. Inputs and outputs cannot be added or removed. This allows for people to send the same PSBT to be ...


3

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 serialized PSBTs themselves.


2

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 executing the script which is not necessarily available to bitcoind instance doing the conversion. Additionally, signed network serialized transactions are not ...


2

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, including those created by using walletcreatefundedpsbt or fundrawtransaction. For a code reference, the AvailableCoins function is used to fetch and filter the ...


2

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.


2

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 this gives you a template and example to work with. But it is relatively low-level and without some deeper technical understanding of Bitcoin it may be difficult ...


2

Run the below commands in electrum console: >> getaddresshistory('tb1qu2l4n8st9w3hhsxstd8muaxgnu63fql9rkylmd') [ { "height": 1807710, "tx_hash": "727707cced87f9bc2a1ca3ed28df39588e9881fd50c272e78bc76a5bb1ffde9c" } ] >> deserialize(gettransaction('727707cced87f9bc2a1ca3ed28df39588e9881fd50c272e78bc76a5bb1ffde9c')) { "inputs": [ ...


1

Hi it's moral_agent from the reddit post. https://www.reddit.com/r/Bitcoin/comments/ir308h/watch_only_balance_not_spendable_in_bitcoin_core/g5gg33f/ I do not know whether this will help you or not but I will tell you what helped me and what I think I was doing wrong. In order to create a PSBT that spends a watch-only output, it is not always sufficient to ...


1

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 learn what is missing.


1

How does an updater, signer, or finalizer know what this XPub is for? It's not just an xpub. It's an xpub with key origin information. The fingerprint of the master public key and the derivation path to that xpub is provided. This means that a prefix match can be done with the derivation paths given in the input and output maps to find which xpub can be ...


1

I am very embarrassed, just circling back to share, the above workflow works perfectly. My problem was I had an incorrect vout value in one of my inputs. Basically I was trying to spend money I don't have (/facepalm). As soon as I corrected that, everything worked flawlessly. Here's my multi-wallet.dat file Coinjoin :) https://live.blockcypher.com/btc-...


1

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 full transaction hex of every input for non-segwit inputs. Segwit inputs can be simpler but they can also be created using the full hex of the tx using non-...


1

No, that won't work. joinpsbts must be used before any signatures are created. Otherwise existing signatures will not be valid for the joined transaction. Rather, each person must create their own PSBT, send them to each other or to some coordinator where the PSBTs are then joined together with joinpsbts. Then the joined PSBT can be distributed back to ...


1

The "suffix" is not a fixed suffix. The number of 00 bytes needs to match the number of inputs and outputs of the transaction. Those bytes are the terminators for the key-value maps for each input and output. The automatic converter does not fill in those maps, but an empty map will still have its null terminator. So the number of empty maps (and thus the ...


1

I have a very old Greg Maxwell tutorial for this slightly old question https://web.archive.org/web/20171124193914/https://people.xiph.org/~greg/signdemo.txt The tutorial uses 'bitcoind' as the command because it was written before 'bitcoin-cli' became the correct command. Apart from this detail, the tutorial should still work with a recent Bitcoin Core ...


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