<<  >> (p.2)
    Author Topic: Monitoring sequence of btc transactions  (Read 482 times)
    pooya87
    Legendary
    *
    Offline Offline

    Activity: 3892
    Merit: 11788



    View Profile
    March 28, 2024, 06:39:43 AM
     #21

    If I understood your question correctly, you don't need to use an escrow at all.
    You both want to send some coins to a destination, right? Lets say you want to send 1BTC and your partner wants to send 2BTC. So you can easily create a transaction that has an output with the total 3BTC, then include your own input(s) in it with the total being 1BTC and sign each input using the ANYONECANPAY sighash. Then the other party can also sign it using the same sighash while adding their own input(s) with the total being 2BTC.

    Keep in mind that the transaction itself remains invalid until the sum of all inputs surpasses the total of 3BTC.

    Other details may be needed like what the destination is (one or more addresses) or its type (like using 2-of-2 multisig) and stuff like that which depends on what it is you are trying to do.

Page 1
Viewing Page: 2