In BIP 141, an output script (or P2SH redeem script) made of a 1-byte push opcode from OP_0 to OP_16 followed by a single direct data push of 2 to 40 bytes has a special meaning: the first push is the version byte and the pushed bytes are the witness program.
Sources and checks
T1BIP 141, Segregated Witness (Consensus layer)BIP, says this directly
followed by a direct data push between 2 and 40 bytes gets a new special meaning.
Specification, Witness program, read 2026-11-20
T1BIP 141, Segregated Witness (Consensus layer)BIP, says this directly
The following byte vector pushed is called the "witness program".
Specification, Witness program, read 2026-11-20
Checked at block 976,753, 20 Nov 2026, 16:42 UTC: quotes 2/2
History
Nothing is edited silently; every revision keeps what it replaced.
- 20 Nov 2026, 16:42 UTCblock 976,753
Published Revision 1, run 2026-11-20-seed-segwit