Alice has a wallet. Let's say she uses a Coldcard with Sparrow.
Bob has a wallet. Let's say he uses a hot wallet on Electrum desktop.
Alice and Bob want to fund an address. This target address belongs to a third party. Alice will put one bitcoin. Bob will put another one. They want this funding to be atomic. This means, either they both fund the address or they don't. Hence, doing two transactions (Allce first and Bob after, or the other way around) doesn't work since the second sender could back down and not follow through.
Because of this, Alice and Bob decide to make a single transaction that uses UTXOs from both of their own wallets as inputs.
My question is: what tooling options exist for Alice and Bob to compose, sign and broadcast this joint transaction that uses UTXOs from two different wallets? Whatever you propose should leak no details between Alice and Bob (you can assume they don't trust each other). I'm specially interested in options that don't imply coding. The more user friendly, the better.
I'll award the bounty to the best answer according to my judgement. Thanks for your time.
10,000 sats paid
pillar's bounties
11.4k sats \ 1 reply \ @hynek 24 May 2023
I was having similar question here: #179331
At the end help me one guy at Bitcoin Pizza Day
  1. Download Bitcoin Core you don't need to sync the blockchain
  2. Open console (⌘ + T on mac)
  3. Insert in for example:
createpsbt '[{"txid" : "903f5ba285e093aef7423fac59bbfcd2979441766bf4a73a622f7e1d606ef17e", "vout" :0}]' '{"bc1qcmkwdrx3e20e0xsfn2se23wzj9r7dc3t4wd9a3": 0.00000546}'
  1. You get this fancy result: cHNidP8BAFICAAAAAX7xbmAdfi9iOqf0a3ZBlJfS/LtZrD9C966T4IWiWz+QAAAAAAD9////ASICAAAAAAAAFgAUxuzmjNHKn5eaCZqhlUXCkUfm4isAAAAAAAAA
  2. Open Electrum Wallet
  3. In toolbar select Tools>Load transaction>From text
  4. Insert that weird string and hit Load transaction button
  5. 👏 Now you have a transaction that you can sign (this will be disabled, because your wallet doesn't recognize my input)
  6. Click on share> Fo Coinjoin;strip privates > Copy to clipboard
  7. Send it to your peer
  8. He will sign it same way and broadcast it to the network
  9. 🎉 Profit
Now only change my example to yours. Let me know if you need help with that.. For me it was really frustrating to figure it out 🙂
reply
I still haven't found some time to test your instructions, but I see them as the clearest ones and also the closest to what I was asking for. So, yours is the bounty. Thanks a lot for taking the time to share your knowledge.
reply
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).
reply
PSBTs were supposed to fulfill this dream, but sadly wallets use them differently and don't expose all the functionality. You could probably do this using the bitcoin core cli but it'd be pretty involved.
reply
Well coinjoins exist so there must be a way.
Might be good to look through some command line with bitcoind
Maybe in here
reply