I read in the Bitcoin Core doc an example of a taproot output descriptor with 2 script paths :
tr(c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5,{pk(fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556),pk(e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13)})
I tried to pass a descriptor with a third script path, but I'm met with an error tr(): expected ')' after script expression
That makes sense since I read in the same doc that the syntax for taproot descriptor is tr(KEY,TREE)
, and that TREE
is defined as:
* any SCRIPT expression
* An open brace {, a TREE expression, a comma ,, a TREE expression, and a closing brace }
This is consistent with what I saw in the rust-bitcoin library, where a TAPTREE
is either a leaf, or 2 trees.
My question is what if I wanted to commit a third script, a very simple one like the 2 in the example?
I think I could compute the root of my tree myself and use the rawtr()
descriptor with the output pubkey, but what if I want to prove there's no hidden commitment?
I guess I could give all the scripts and that one could figure it out by recreating the scriptpubkey and check it's the same, but that's cumbersome.