I'm reading the Bitcoin Core's descriptor documentation and I noticed that the
SCRIPT expression can only be used at descriptor top-level. Indeed when called with this descriptor
-5 error with the message
Can only have raw() at top level:
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?