> For the complete documentation index, see [llms.txt](https://docs.degenlab.io/decentralized-mining-pool/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.degenlab.io/decentralized-mining-pool/sandbox-btcdeb.md).

# 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. &#x20;

{% embed url="<https://github.com/bitcoin-core/btcdeb/>" %}

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:&#x20;

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

{% embed url="<https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md>" %}

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

{% embed url="<https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example.md>" %}

### 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.&#x20;

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.degenlab.io/decentralized-mining-pool/sandbox-btcdeb.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
