1

I'm searching for Taproot script-path examples and so far found a two-leaf example here. 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?

Burak
  • 176
  • 6

1 Answers1

3

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.

Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287
  • Thanks! Looking forward to more examples. – Burak Oct 16 '21 at 16:22
  • 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 Oct 16 '21 at 18:01