<p>With a single leaf, there is no TapBranch step. That would be impossible, as there are no two branches to combine. The TapLeaf hash is directly used in the TapTweak step.</p>
<p>I will try to add a few examples to the BIP soon.</p>

CC BY-SA 4.0
2021-10-16T16:22:17.767Z
Thanks! Looking forward to more examples.
Burak
CC BY-SA 4.0
2021-10-16T18:01:02.533Z
Update: Used TapLeaf directly in the TapTweak step and this time managed to spend a single-leaf P2TR output (using btcdeb).
https://blockstream.info/testnet/tx/d5f3924fa35c913e03f6c16061c860c5209d6c7190c75c13b6e5ac8f4326b96d
Burak
CC BY-SA 4.0
2021-10-16T16:03:53.973Z
2021-10-16T16:03:53.973Z
Pieter Wuille
<p>I'm searching for Taproot script-path examples and so far found a two-leaf example <a href="https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example.md" rel="nofollow noreferrer">here</a>. Is there any single-leaf construction on testnet or somewhere?</p>
<p>I'm wondering if TapBranch calculation is skipped for single-leaf constructions. Is single-leaf TapLeaf directly commits to TapTweak, or TapBranch is applied in-between?</p>

<taproot><mast>
Single-leaf script-path example
Burak
# Single-leaf script-path example

(Asked by: username_0 on 2021-10-16)

I'm searching for Taproot script-path examples and so far found a two-leaf example [here](https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example.md). Is there any single-leaf construction on testnet or somewhere?

I'm wondering if TapBranch calculation is skipped for single-leaf constructions. Is single-leaf TapLeaf directly commits to TapTweak, or TapBranch is applied in-between?

**Tags:** taproot, mast


---

## 1 answers

### Answer by username_1 on 2021-10-16. Score: 3 | Accepted answer

With a single leaf, there is no TapBranch step. That would be impossible, as there are no two branches to combine. The TapLeaf hash is directly used in the TapTweak step.

I will try to add a few examples to the BIP soon.

> **Comments:**
> **username_0**: Thanks! Looking forward to more examples.  
> **username_0**: Update: Used TapLeaf directly in the TapTweak step and this time managed to spend a single-leaf P2TR output (using btcdeb). https://blockstream.info/testnet/tx/d5f3924fa35c913e03f6c16061c860c5209d6c7190c75c13b6e5ac8f4326b96d  

---

