pub fn validate_placeholder_usage(root: &Node, n: u8) -> Result<(), Error>Expand description
Validate the BIP 388 well-formedness of placeholder usage in the tree.
Enforces two invariants:
- Every
@ifor0 ≤ i < nappears at least once in the tree. - The first occurrences (in pre-order traversal) of distinct placeholder
indices appear in canonical ascending order:
@0before@1before@2, etc.