/** * Consensus witness-stack decoding, shared by every module that reads a * witness we did not build. * * Two independent decoders drifted apart before this existed: one accepted * non-minimal CompactSize encodings, the other rejected them. vaultd decodes * with rust-bitcoin, whose `VarInt::consensus_decode` * (0.32.8 `consensus/encode.rs:493-522`) returns `NonMinimalVarInt` for a 0xfd * carrying < 0xfd and a 0xfe carrying < 0x10000 — so the strict reading is the * only one that matches what the network will accept. * * @module tbv/core/utils/witness/witnessStack */ /** * Decode a consensus-encoded witness stack: item count, then (len, bytes)*. * * @param witness - The consensus-encoded witness bytes. * @param subject - Names the witness in error messages (e.g. "finalScriptWitness"). * @returns The stack items, as views over `witness`. * @throws If the encoding is truncated, non-minimal, out of range, or leaves * trailing bytes. */ export declare function decodeWitnessStack(witness: Uint8Array, subject: string): Uint8Array[]; //# sourceMappingURL=witnessStack.d.ts.map