Sandbox BTCDEB

The most direct approach to creating bitcoin transactions is using a regtest and a tool that simulates the process step by step.

Bitcoin Debugger is an excellent tool in this regard, it also is convenient for creating taproot leaves, branches, and trees.

By following the updated version of the BTCDEB you should be able to create a tree that contains that 2 script paths. The script flow is also very similar to the one wanted.

  1. Alice path is close to the reclaim path as the user who sent the funds can reclaim them from the script after X blocks.

  2. Bob path is similar to paying to PoX address as in the example

    1. it creates a transaction that uses the script path as UTXO and the output is another address

    2. it gets signed

    3. it gets broadcasted and the address receives the funds

All details and explanations are in the following files:

  1. A more straightforward example to just getting the transaction simulated can be found here

  1. A more detailed version which explains in detail how things are combined and how to obtain the values wanted is here

To check transactions in the end

  1. Get all transactions from the regtest. The list of transactions contains all of them, including the blocks mined.

  2. Save them in a variable locally on a browser console.

  3. Filter transactions by amount < 6 or by address to be the wanted address.

x = the whole list
x.filter(x => x.address === 'bcrt1qez0gdlpk50p0cxpgaf0gm3udtcjeujrfghydle')
x.filter(x => x.amount < 6)sc

Last updated