Expand description
Decoder-side validation per spec §7.
Functions§
- validate_
explicit_ origin_ required - Validate that every
@Nin a non-canonical wrapper has an explicit origin path on the wire — either viaOriginPathOverrides[idx]or via a non-empty entry in thepath_decl(shared or divergent). - validate_
multipath_ consistency - Validate that all multipaths in shared default + overrides share the same alt-count.
- validate_
placeholder_ usage - Validate the BIP 388 well-formedness of placeholder usage in the tree.
- validate_
tap_ script_ tree - Validate that all leaves in a tap-script-tree are permitted-leaf tags per §6.3.1.
- validate_
xpub_ bytes - Validate that every
PubkeysTLV entry’s 33-byte compressed pubkey field (bytes 32..65 of the 65-byte payload) parses as a valid secp256k1 point. The 32-byte chain code prefix is unvalidated (any 32 bytes are a structurally valid BIP 32 chain code).