Summary
tinyminiscript rejects a valid descriptor when a raw compressed pubkey is prefixed with a BIP32 key origin.
Minimal repro
pkh([deadbeef/1/2'/3/4']03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)
Observed behavior
The parser rejects with:
InvalidKey { key: "[deadbeef/1/2'/3/4']03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd", position: 5, inner: "Invalid bitcoin::PublicKey key" }
Cross-check
The same descriptor is accepted by:
rust-miniscript
bitcoin/bitcoin
embit
bitcoinerlab/descriptors
Why this looks like a parser gap
The generic key parser only treats a token as an extended-key expression when the token contains "pub". An origin-prefixed raw compressed pubkey such as [fingerprint/path]02... therefore falls through to the plain pubkey path instead of being parsed as origin + raw pubkey.
Summary
tinyminiscriptrejects a valid descriptor when a raw compressed pubkey is prefixed with a BIP32 key origin.Minimal repro
Observed behavior
The parser rejects with:
Cross-check
The same descriptor is accepted by:
rust-miniscriptbitcoin/bitcoinembitbitcoinerlab/descriptorsWhy this looks like a parser gap
The generic key parser only treats a token as an extended-key expression when the token contains
"pub". An origin-prefixed raw compressed pubkey such as[fingerprint/path]02...therefore falls through to the plain pubkey path instead of being parsed asorigin + raw pubkey.