284 sats \ 0 replies \ @shibe 23 May 2023 \ on: Composing transaction with UTXOs from different wallets bitcoin
I've tried to do experiments with PSBTs in the past but they're pretty finnicky. Here's a workflow that might work:
-
Create the transaction in sparrow that spends 1 Bitcoin and export the psbt (don't sign it)
-
Bob creates the same transaction in Electrum and export the psbt (don't sign it)
-
Use bitcoin-cli joinpsbts '["TRANSACTION1PSBT", "TRANSACTION2PSBT"]' | base64 -d > /tmp/transaction.psbt (You can omit the base64 part and load the psbt from the clipboard too, but this will save it to a file).
-
Load the transaction in Sparrow and sign it, then export the psbt
-
Load the signed psbt in Electrum and sign it
Unfortunately, even if this works, this would create 2 UTXOs in that joint address instead of 1, which you might not want. Creating a more advanced transaction would probably require use of createrawtransaction. Speaking of which, I'm not a fan of the fact that bitcoin-cli just refuses to work unless you launch bitcoind (even if the bitcoin-cli commands you're using don't require a node to be running such as joinpsbts or createrawtransaction).