Skip to content

Commit 77fc6ae

Browse files
tochicoolProofOfKeags
authored andcommitted
Add OP_CHECKSIGADD opcode
This is a new opcode as part of the Taproot consensus softfork active since block 709,632.
1 parent efd19c2 commit 77fc6ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Haskoin/Script/Common.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ data ScriptOp
207207
| OP_NOP8
208208
| OP_NOP9
209209
| OP_NOP10
210+
-- BIP 342 (Tapscript)
211+
| OP_CHECKSIGADD
210212
| -- Other
211213
OP_PUBKEYHASH
212214
| OP_PUBKEY
@@ -348,6 +350,8 @@ instance Serial ScriptOp where
348350
| op == 0xb7 = return OP_NOP8
349351
| op == 0xb8 = return OP_NOP9
350352
| op == 0xb9 = return OP_NOP10
353+
-- BIP 342 (Tapscript)
354+
| op == 0xba = return OP_CHECKSIGADD
351355
-- Constants
352356
| op == 0xfd = return OP_PUBKEYHASH
353357
| op == 0xfe = return OP_PUBKEY
@@ -500,6 +504,8 @@ instance Serial ScriptOp where
500504
OP_NOP8 -> putWord8 0xb7
501505
OP_NOP9 -> putWord8 0xb8
502506
OP_NOP10 -> putWord8 0xb9
507+
-- BIP 342 (Tapscript)
508+
OP_CHECKSIGADD -> putWord8 0xba
503509

504510

505511
instance Binary ScriptOp where

0 commit comments

Comments
 (0)