Skip to content

Instantly share code, notes, and snippets.

@conduition
conduition / winternitz.ts
Last active July 8, 2025 07:03
WInternitz One-time Signatures on Bitcoin using OP_CAT
// input witness stack:
// <h1> <b1>
// ...
// <h64> <b64>
// <ec_signature>
OP_DUP OP_TOALTSTACK // copy EC signature to alt stack
<G> OP_CHECKSIGVERIFY // verify EC signature matches TX