I'm reading the Bitcoin Core's descriptor documentation and I noticed that the raw()
SCRIPT
expression can only be used at descriptor top-level. Indeed when called with this descriptor getdescriptorinfo
returns -5
error with the message Can only have raw() at top level
:
tr(c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5,raw(fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556))
I assume that raw()
is the only way you add an OP_RETURN
type commitment in a taproot script path, or at least I couldn't figure out a way to do otherwise. I could think of using the pk()
expression with a hash for example, but I guess it's bad to do that.
Why isn't it allowed to commit OP_RETURN
type commitments, let alone other arbitrary script, inside a taproot address? Is it a descriptor restriction or a more fundamental limitation?
I read this but I don't think it really answer my point. If descriptors support arbitrary script only at top-level, why then?