An issue with using left-to-write is that since wallet policies have a separate list of xpubs (that are explicitly referenced by @index
in the descriptor template), the natural order of the keys would be the one in the list, which is not guaranteed to match the left-to-right order in the descriptor template.
E.g.:
descriptor_template: "tr(_,{pk(@1/**),pk(@0/**)})"
keys: ["xpubA", "xpubB"]
Here the left-to-right order doesn’t match with the natural order pubkeyA||pubkeyB
.
If the _
(or whichever other expression) to represent the deterministic NUMS key is only defined for wallet policies, I’d favor the wallet_policy-native approach.