BOLT #3 to_local witness script (no lease).
(to_self_delay, revocationpubkey, local_delayedpubkey)
| 122 | |
| 123 | |
| 124 | def wscript_to_local(to_self_delay, revocationpubkey, local_delayedpubkey): |
| 125 | """BOLT #3 to_local witness script (no lease).""" |
| 126 | OP_IF, OP_ELSE, OP_ENDIF = 0x63, 0x67, 0x68 |
| 127 | OP_DROP, OP_CHECKSEQUENCEVERIFY, OP_CHECKSIG = 0x75, 0xb2, 0xac |
| 128 | return (bytes([OP_IF]) |
| 129 | + _push_bytes(revocationpubkey) |
| 130 | + bytes([OP_ELSE]) |
| 131 | + _add_number(to_self_delay) |
| 132 | + bytes([OP_CHECKSEQUENCEVERIFY, OP_DROP]) |
| 133 | + _push_bytes(local_delayedpubkey) |
| 134 | + bytes([OP_ENDIF, OP_CHECKSIG])) |
| 135 | |
| 136 | |
| 137 | def p2wsh(wscript): |
no test coverage detected