OpCode
scrypt-ts / OpCode
Class: OpCode
Opcodes used in [Bitcoin Script][https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script](https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script)
Table of contents
Constructors
Properties
- OP_0
- OP_0NOTEQUAL
- OP_1
- OP_10
- OP_11
- OP_12
- OP_13
- OP_14
- OP_15
- OP_16
- OP_1ADD
- OP_1NEGATE
- OP_1SUB
- OP_2
- OP_2DIV
- OP_2DROP
- OP_2DUP
- OP_2MUL
- OP_2OVER
- OP_2ROT
- OP_2SWAP
- OP_3
- OP_3DUP
- OP_4
- OP_5
- OP_6
- OP_7
- OP_8
- OP_9
- OP_ABS
- OP_ADD
- OP_AND
- OP_BIN2NUM
- OP_BOOLAND
- OP_BOOLOR
- OP_CAT
- OP_CHECKMULTISIG
- OP_CHECKMULTISIGVERIFY
- OP_CHECKSIG
- OP_CHECKSIGVERIFY
- OP_CODESEPARATOR
- OP_DEPTH
- OP_DIV
- OP_DROP
- OP_DUP
- OP_ELSE
- OP_ENDIF
- OP_EQUAL
- OP_EQUALVERIFY
- OP_FALSE
- OP_FROMALTSTACK
- OP_GREATERTHAN
- OP_GREATERTHANOREQUAL
- OP_HASH160
- OP_HASH256
- OP_IF
- OP_IFDUP
- OP_INVALIDOPCODE
- OP_INVERT
- OP_LESSTHAN
- OP_LESSTHANOREQUAL
- OP_LSHIFT
- OP_MAX
- OP_MIN
- OP_MOD
- OP_MUL
- OP_NEGATE
- OP_NIP
- OP_NOP
- OP_NOP1
- OP_NOP10
- OP_NOP2
- OP_NOP3
- OP_NOP4
- OP_NOP5
- OP_NOP6
- OP_NOP7
- OP_NOP8
- OP_NOP9
- OP_NOT
- OP_NOTIF
- OP_NUM2BIN
- OP_NUMEQUAL
- OP_NUMEQUALVERIFY
- OP_NUMNOTEQUAL
- OP_OR
- OP_OVER
- OP_PICK
- OP_PUBKEY
- OP_PUBKEYHASH
- OP_PUSHDATA1
- OP_PUSHDATA2
- OP_PUSHDATA4
- OP_RESERVED
- OP_RESERVED1
- OP_RESERVED2
- OP_RETURN
- OP_RIPEMD160
- OP_ROLL
- OP_ROT
- OP_RSHIFT
- OP_SHA1
- OP_SHA256
- OP_SIZE
- OP_SPLIT
- OP_SUB
- OP_SWAP
- OP_TOALTSTACK
- OP_TRUE
- OP_TUCK
- OP_VER
- OP_VERIF
- OP_VERIFY
- OP_VERNOTIF
- OP_WITHIN
- OP_XOR
Constructors
constructor
• new OpCode()
Properties
OP_0
▪ Static
Readonly
OP_0: OpCodeType
An empty array of bytes is pushed onto the stack. (This is not a no-op: an item is added to the stack.)
Name
OP_0
Constant
OpCodeType('00')
Defined in
dist/smart-contract/builtins/functions.d.ts:170
OP_0NOTEQUAL
▪ Static
Readonly
OP_0NOTEQUAL: OpCodeType
Returns 0 if the input is 0. 1 otherwise.
Name
OP_0NOTEQUAL
Constant
OpCodeType('92')
Defined in
dist/smart-contract/builtins/functions.d.ts:648
OP_1
▪ Static
Readonly
OP_1: OpCodeType
The number 1 is pushed onto the stack.
Name
OP_1
Constant
OpCodeType('51')
Defined in
dist/smart-contract/builtins/functions.d.ts:212
OP_10
▪ Static
Readonly
OP_10: OpCodeType
The number 10 is pushed onto the stack.
Name
OP_10
Constant
OpCodeType('5a')
Defined in
dist/smart-contract/builtins/functions.d.ts:272
OP_11
▪ Static
Readonly
OP_11: OpCodeType
The number 11 is pushed onto the stack.
Name
OP_11
Constant
OpCodeType('5b')
Defined in
dist/smart-contract/builtins/functions.d.ts:278
OP_12
▪ Static
Readonly
OP_12: OpCodeType
The number 12 is pushed onto the stack.
Name
OP_12
Constant
OpCodeType('5c')
Defined in
dist/smart-contract/builtins/functions.d.ts:284
OP_13
▪ Static
Readonly
OP_13: OpCodeType
The number 13 is pushed onto the stack.
Name
OP_13
Constant
OpCodeType('5d')
Defined in
dist/smart-contract/builtins/functions.d.ts:290
OP_14
▪ Static
Readonly
OP_14: OpCodeType
The number 14 is pushed onto the stack.
Name
OP_14
Constant
OpCodeType('5e')
Defined in
dist/smart-contract/builtins/functions.d.ts:296
OP_15
▪ Static
Readonly
OP_15: OpCodeType
The number 15 is pushed onto the stack.
Name
OP_15
Constant
OpCodeType('5f')
Defined in
dist/smart-contract/builtins/functions.d.ts:302
OP_16
▪ Static
Readonly
OP_16: OpCodeType
The number 16 is pushed onto the stack.
Name
OP_16
Constant
OpCodeType('60')
Defined in
dist/smart-contract/builtins/functions.d.ts:308
OP_1ADD
▪ Static
Readonly
OP_1ADD: OpCodeType
1 is added to the input.
Name
OP_1ADD
Constant
OpCodeType('8b')
Defined in
dist/smart-contract/builtins/functions.d.ts:606
OP_1NEGATE
▪ Static
Readonly
OP_1NEGATE: OpCodeType
The number -1 is pushed onto the stack.
Name
OP_1NEGATE
Constant
OpCodeType('4f')
Defined in
dist/smart-contract/builtins/functions.d.ts:200
OP_1SUB
▪ Static
Readonly
OP_1SUB: OpCodeType
1 is subtracted from the input.
Name
OP_1SUB
Constant
OpCodeType('8c')
Defined in
dist/smart-contract/builtins/functions.d.ts:612
OP_2
▪ Static
Readonly
OP_2: OpCodeType
The number 2 is pushed onto the stack.
Name
OP_2
Constant
OpCodeType('52')
Defined in
dist/smart-contract/builtins/functions.d.ts:224
OP_2DIV
▪ Static
Readonly
OP_2DIV: OpCodeType
The input is divided by 2. DISABLED now. (This opcode is scheduled to be re-enabled in the Chronicle update)
Name
OP_2DIV
Constant
OpCodeType('8e')
Defined in
dist/smart-contract/builtins/functions.d.ts:624
OP_2DROP
▪ Static
Readonly
OP_2DROP: OpCodeType
Removes the top two stack items.
Name
OP_2DROP
Constant
OpCodeType('6d')
Defined in
dist/smart-contract/builtins/functions.d.ts:426
OP_2DUP
▪ Static
Readonly
OP_2DUP: OpCodeType
Duplicates the top two stack items.
Name
OP_2DUP
Constant
OpCodeType('6e')
Defined in
dist/smart-contract/builtins/functions.d.ts:432
OP_2MUL
▪ Static
Readonly
OP_2MUL: OpCodeType
The input is multiplied by 2. DISABLED now. (This opcode is scheduled to be re-enabled in the Chronicle update)
Name
OP_2MUL
Constant
OpCodeType('8d')
Defined in
dist/smart-contract/builtins/functions.d.ts:618
OP_2OVER
▪ Static
Readonly
OP_2OVER: OpCodeType
Copies the pair of items two spaces back in the stack to the front.
Name
OP_2OVER
Constant
OpCodeType('70')
Defined in
dist/smart-contract/builtins/functions.d.ts:444
OP_2ROT
▪ Static
Readonly
OP_2ROT: OpCodeType
The fifth and sixth items back are moved to the top of the stack.
Name
OP_2ROT
Constant
OpCodeType('71')
Defined in
dist/smart-contract/builtins/functions.d.ts:450
OP_2SWAP
▪ Static
Readonly
OP_2SWAP: OpCodeType
Swaps the top two pairs of items.
Name
OP_2SWAP
Constant
OpCodeType('72')
Defined in
dist/smart-contract/builtins/functions.d.ts:456
OP_3
▪ Static
Readonly
OP_3: OpCodeType
The number 3 is pushed onto the stack.
Name
OP_3
Constant
OpCodeType('53')
Defined in
dist/smart-contract/builtins/functions.d.ts:230
OP_3DUP
▪ Static
Readonly
OP_3DUP: OpCodeType
Duplicates the top three stack items.
Name
OP_3DUP
Constant
OpCodeType('6f')
Defined in
dist/smart-contract/builtins/functions.d.ts:438
OP_4
▪ Static
Readonly
OP_4: OpCodeType
The number 4 is pushed onto the stack.
Name
OP_4
Constant
OpCodeType('54')
Defined in
dist/smart-contract/builtins/functions.d.ts:236
OP_5
▪ Static
Readonly
OP_5: OpCodeType
The number 5 is pushed onto the stack.
Name
OP_5
Constant
OpCodeType('55')
Defined in
dist/smart-contract/builtins/functions.d.ts:242
OP_6
▪ Static
Readonly
OP_6: OpCodeType
The number 6 is pushed onto the stack.
Name
OP_6
Constant
OpCodeType('56')
Defined in
dist/smart-contract/builtins/functions.d.ts:248
OP_7
▪ Static
Readonly
OP_7: OpCodeType
The number 7 is pushed onto the stack.
Name
OP_7
Constant
OpCodeType('57')
Defined in
dist/smart-contract/builtins/functions.d.ts:254
OP_8
▪ Static
Readonly
OP_8: OpCodeType
The number 8 is pushed onto the stack.
Name
OP_8
Constant
OpCodeType('58')
Defined in
dist/smart-contract/builtins/functions.d.ts:260
OP_9
▪ Static
Readonly
OP_9: OpCodeType
The number 9 is pushed onto the stack.
Name
OP_9
Constant
OpCodeType('59')
Defined in
dist/smart-contract/builtins/functions.d.ts:266
OP_ABS
▪ Static
Readonly
OP_ABS: OpCodeType
The input is made positive.
Name
OP_ABS
Constant
OpCodeType('90')
Defined in
dist/smart-contract/builtins/functions.d.ts:636
OP_ADD
▪ Static
Readonly
OP_ADD: OpCodeType
a is added to b.
Name
OP_ADD
Constant
OpCodeType('93')
Defined in
dist/smart-contract/builtins/functions.d.ts:654
OP_AND
▪ Static
Readonly
OP_AND: OpCodeType
Boolean and between each bit in the inputs.
Name
OP_AND
Constant
OpCodeType('84')
Defined in
dist/smart-contract/builtins/functions.d.ts:564
OP_BIN2NUM
▪ Static
Readonly
OP_BIN2NUM: OpCodeType
Converts byte sequence x into a numeric value.
Name
OP_BIN2NUM
Constant
OpCodeType('81')
Defined in
dist/smart-contract/builtins/functions.d.ts:546
OP_BOOLAND
▪ Static
Readonly
OP_BOOLAND: OpCodeType
If both a and b are not 0, the output is 1. Otherwise 0.
Name
OP_BOOLAND
Constant
OpCodeType('9a')
Defined in
dist/smart-contract/builtins/functions.d.ts:696
OP_BOOLOR
▪ Static
Readonly
OP_BOOLOR: OpCodeType
If a or b is not 0, the output is 1. Otherwise 0.
Name
OP_BOOLOR
Constant
OpCodeType('9b')
Defined in
dist/smart-contract/builtins/functions.d.ts:702
OP_CAT
▪ Static
Readonly
OP_CAT: OpCodeType
Concatenates two strings.
Name
OP_CAT
Constant
OpCodeType('7e')
Defined in
dist/smart-contract/builtins/functions.d.ts:528
OP_CHECKMULTISIG
▪ Static
Readonly
OP_CHECKMULTISIG: OpCodeType
Compares the first signature against each public key until it finds an ECDSA match. Starting with the subsequent public key, it compares the second signature against each remaining public key until it finds an ECDSA match. The process is repeated until all signatures have been checked or not enough public keys remain to produce a successful result. All signatures need to match a public key. Because public keys are not checked again if they fail any signature comparison, signatures must be placed in the scriptSig using the same order as their corresponding public keys were placed in the scriptPubKey or redeemScript. If all signatures are valid, 1 is returned, 0 otherwise. Due to a bug, an extra unused value (x) is removed from the stack. Script spenders must account for this by adding a junk value (typically zero) to the stack.
Name
OP_CHECKMULTISIG
Constant
OpCodeType('ae')
Defined in
dist/smart-contract/builtins/functions.d.ts:818
OP_CHECKMULTISIGVERIFY
▪ Static
Readonly
OP_CHECKMULTISIGVERIFY: OpCodeType
Same as OP_CHECKMULTISIG
, but OP_VERIFY
is executed afterward.
Name
OP_CHECKMULTISIGVERIFY
Constant
OpCodeType('af')
Defined in
dist/smart-contract/builtins/functions.d.ts:824
OP_CHECKSIG
▪ Static
Readonly
OP_CHECKSIG: OpCodeType
The entire transaction's outputs, inputs, and script (from the most recently-executed [OP_CODESEPARATOR][https://wiki.bitcoinsv.io/index.php/OP_CODESEPARATOR](https://wiki.bitcoinsv.io/index.php/OP_CODESEPARATOR) to the end) are hashed. The signature used by [OP_CHECKSIG][https://wiki.bitcoinsv.io/index.php/OP_CHECKSIG](https://wiki.bitcoinsv.io/index.php/OP_CHECKSIG) must be a valid signature for this hash and public key. If it is, 1 is returned, 0 otherwise.
Name
OP_CHECKSIG
Constant
OpCodeType('ac')
Defined in
dist/smart-contract/builtins/functions.d.ts:806
OP_CHECKSIGVERIFY
▪ Static
Readonly
OP_CHECKSIGVERIFY: OpCodeType
Same as OP_CHECKSIG
, but OP_VERIFY
is executed afterward.
Name
OP_CHECKSIGVERIFY
Constant
OpCodeType('ad')
Defined in
dist/smart-contract/builtins/functions.d.ts:812
OP_CODESEPARATOR
▪ Static
Readonly
OP_CODESEPARATOR: OpCodeType
All of the signature checking words will only match signatures to the data after the most recently-executed [OP_CODESEPARATOR][https://wiki.bitcoinsv.io/index.php/OP_CODESEPARATOR](https://wiki.bitcoinsv.io/index.php/OP_CODESEPARATOR).
Name
OP_CODESEPARATOR
Constant
OpCodeType('ab')
Defined in
dist/smart-contract/builtins/functions.d.ts:799
OP_DEPTH
▪ Static
Readonly
OP_DEPTH: OpCodeType
Counts the number of stack items onto the stack and places the value on the top
Name
OP_DEPTH
Constant
OpCodeType('74')
Defined in
dist/smart-contract/builtins/functions.d.ts:468
OP_DIV
▪ Static
Readonly
OP_DIV: OpCodeType
a is divided by b.
Name
OP_DIV
Constant
OpCodeType('96')
Defined in
dist/smart-contract/builtins/functions.d.ts:672
OP_DROP
▪ Static
Readonly
OP_DROP: OpCodeType
Removes the top stack item.
Name
OP_DROP
Constant
OpCodeType('75')
Defined in
dist/smart-contract/builtins/functions.d.ts:474
OP_DUP
▪ Static
Readonly
OP_DUP: OpCodeType
Duplicates the top stack item.
Name
OP_DUP
Constant
OpCodeType('76')
Defined in
dist/smart-contract/builtins/functions.d.ts:480
OP_ELSE
▪ Static
Readonly
OP_ELSE: OpCodeType
If the preceding IF or NOTIF check was not valid then statement 2 is executed.
Name
OP_ELSE
Constant
OpCodeType('67')
Example
`[expression] IF
[statement 1]
ELSE
[statement 2]
ENDIF`
Defined in
dist/smart-contract/builtins/functions.d.ts:383
OP_ENDIF
▪ Static
Readonly
OP_ENDIF: OpCodeType
Ends an if/else block. All blocks must end, or the transaction is invalid. An OP_ENDIF without a prior matching OP_IF or OP_NOTIF is also invalid.
Name
OP_ENDIF
Constant
OpCodeType('68')
Example
`[expression] IF
[statement 1]
ELSE
[statement 2]
ENDIF`
Defined in
dist/smart-contract/builtins/functions.d.ts:396
OP_EQUAL
▪ Static
Readonly
OP_EQUAL: OpCodeType
Returns 1 if the inputs are exactly equal, 0 otherwise.
Name
OP_EQUAL
Constant
OpCodeType('87')
Defined in
dist/smart-contract/builtins/functions.d.ts:582
OP_EQUALVERIFY
▪ Static
Readonly
OP_EQUALVERIFY: OpCodeType
Same as OP_EQUAL
, but runs OP_VERIFY
afterward.
Name
OP_EQUALVERIFY
Constant
OpCodeType('88')
Defined in
dist/smart-contract/builtins/functions.d.ts:588
OP_FALSE
▪ Static
Readonly
OP_FALSE: OpCodeType
An empty array of bytes is pushed onto the stack. (This is not a no-op: an item is added to the stack.)
Name
OP_FALSE
Constant
OpCodeType('00')
Defined in
dist/smart-contract/builtins/functions.d.ts:176
OP_FROMALTSTACK
▪ Static
Readonly
OP_FROMALTSTACK: OpCodeType
Puts the input onto the top of the main stack. Removes it from the alt stack.
Name
OP_FROMALTSTACK
Constant
OpCodeType('6c')
Defined in
dist/smart-contract/builtins/functions.d.ts:420
OP_GREATERTHAN
▪ Static
Readonly
OP_GREATERTHAN: OpCodeType
Returns 1 if a is greater than b, 0 otherwise.
Name
OP_GREATERTHAN
Constant
OpCodeType('a0')
Defined in
dist/smart-contract/builtins/functions.d.ts:732
OP_GREATERTHANOREQUAL
▪ Static
Readonly
OP_GREATERTHANOREQUAL: OpCodeType
Returns 1 if a is greater than or equal to b, 0 otherwise.
Name
OP_GREATERTHANOREQUAL
Constant
OpCodeType('a2')
Defined in
dist/smart-contract/builtins/functions.d.ts:744
OP_HASH160
▪ Static
Readonly
OP_HASH160: OpCodeType
The input is hashed twice: first with SHA-256 and then with RIPEMD-160.
Name
OP_HASH160
Constant
OpCodeType('a9')
Defined in
dist/smart-contract/builtins/functions.d.ts:786
OP_HASH256
▪ Static
Readonly
OP_HASH256: OpCodeType
The input is hashed two times with SHA-256.
Name
OP_HASH256
Constant
OpCodeType('aa')
Defined in
dist/smart-contract/builtins/functions.d.ts:792
OP_IF
▪ Static
Readonly
OP_IF: OpCodeType
If the top stack value is TRUE, statement 1 is executed. If the top stack value is FALSE and ELSE is used, statement 2 is executed. If ELSE is NOT used, the script jumps to ENDIF. The top stack value is removed.
Deprecated
Name
OP_IF
Constant
OpCodeType('63')
Example
`[expression] IF
[statement 1]
ENDIF`
OR
`[expression] IF
[statement 1]
ELSE
[statement 2]
ENDIF`
Defined in
dist/smart-contract/builtins/functions.d.ts:340
OP_IFDUP
▪ Static
Readonly
OP_IFDUP: OpCodeType
If the top stack value is not 0, duplicate it.
Name
OP_IFDUP
Constant
OpCodeType('73')
Defined in
dist/smart-contract/builtins/functions.d.ts:462
OP_INVALIDOPCODE
▪ Static
Readonly
OP_INVALIDOPCODE: OpCodeType
Matches any opcode that is not yet assigned. The word is used internally for assisting with transaction matching. They are invalid if used in actual scripts.
Name
OP_PUBKEY
Constant
OpCodeType('ff')
Defined in
dist/smart-contract/builtins/functions.d.ts:902
OP_INVERT
▪ Static
Readonly
OP_INVERT: OpCodeType
Flips all of the bits in the input.
Name
OP_INVERT
Constant
OpCodeType('83')
Defined in
dist/smart-contract/builtins/functions.d.ts:558
OP_LESSTHAN
▪ Static
Readonly
OP_LESSTHAN: OpCodeType
Returns 1 if a is less than b, 0 otherwise.
Name
OP_LESSTHAN
Constant
OpCodeType('9f')
Defined in
dist/smart-contract/builtins/functions.d.ts:726
OP_LESSTHANOREQUAL
▪ Static
Readonly
OP_LESSTHANOREQUAL: OpCodeType
Returns 1 if a is less than or equal to b, 0 otherwise.
Name
OP_LESSTHANOREQUAL
Constant
OpCodeType('a1')
Defined in
dist/smart-contract/builtins/functions.d.ts:738
OP_LSHIFT
▪ Static
Readonly
OP_LSHIFT: OpCodeType
Logical left shift b bits. Sign data is discarded
Name
OP_LSHIFT
Constant
OpCodeType('98')
Defined in
dist/smart-contract/builtins/functions.d.ts:684
OP_MAX
▪ Static
Readonly
OP_MAX: OpCodeType
Returns the larger of a and b.
Name
OP_MAX
Constant
OpCodeType('a4')
Defined in
dist/smart-contract/builtins/functions.d.ts:756
OP_MIN
▪ Static
Readonly
OP_MIN: OpCodeType
Returns the smaller of a and b.
Name
OP_MIN
Constant
OpCodeType('a3')
Defined in
dist/smart-contract/builtins/functions.d.ts:750
OP_MOD
▪ Static
Readonly
OP_MOD: OpCodeType
Returns the remainder after dividing a by b.
Name
OP_MOD
Constant
OpCodeType('97')
Defined in
dist/smart-contract/builtins/functions.d.ts:678
OP_MUL
▪ Static
Readonly
OP_MUL: OpCodeType
a is multiplied by b.
Name
OP_MUL
Constant
OpCodeType('95')
Defined in
dist/smart-contract/builtins/functions.d.ts:666
OP_NEGATE
▪ Static
Readonly
OP_NEGATE: OpCodeType
The sign of the input is flipped.
Name
OP_NEGATE
Constant
OpCodeType('8f')
Defined in
dist/smart-contract/builtins/functions.d.ts:630
OP_NIP
▪ Static
Readonly
OP_NIP: OpCodeType
Removes the second-to-top stack item.
Name
OP_NIP
Constant
OpCodeType('77')
Defined in
dist/smart-contract/builtins/functions.d.ts:486
OP_NOP
▪ Static
Readonly
OP_NOP: OpCodeType
Does nothing.
Name
OP_NOP
Constant
OpCodeType('61')
Defined in
dist/smart-contract/builtins/functions.d.ts:314
OP_NOP1
▪ Static
Readonly
OP_NOP1: OpCodeType
No operation. The word is ignored.
Name
OP_NOP1
Constant
OpCodeType('b0')
Defined in
dist/smart-contract/builtins/functions.d.ts:830
OP_NOP10
▪ Static
Readonly
OP_NOP10: OpCodeType
No operation. The word is ignored.
Name
OP_NOP10
Constant
OpCodeType('b9')
Defined in
dist/smart-contract/builtins/functions.d.ts:884
OP_NOP2
▪ Static
Readonly
OP_NOP2: OpCodeType
No operation. The word is ignored. (previously OP_CHECKLOCKTIMEVERIFY)
Name
OP_NOP2
Constant
OpCodeType('b1')
Defined in
dist/smart-contract/builtins/functions.d.ts:836
OP_NOP3
▪ Static
Readonly
OP_NOP3: OpCodeType
No operation. The word is ignored. (previously OP_CHECKSEQUENCEVERIFY)
Name
OP_NOP3
Constant
OpCodeType('b2')
Defined in
dist/smart-contract/builtins/functions.d.ts:842
OP_NOP4
▪ Static
Readonly
OP_NOP4: OpCodeType
No operation. The word is ignored.
Name
OP_NOP4
Constant
OpCodeType('b3')
Defined in
dist/smart-contract/builtins/functions.d.ts:848
OP_NOP5
▪ Static
Readonly
OP_NOP5: OpCodeType
No operation. The word is ignored.
Name
OP_NOP5
Constant
OpCodeType('b4')
Defined in
dist/smart-contract/builtins/functions.d.ts:854
OP_NOP6
▪ Static
Readonly
OP_NOP6: OpCodeType
No operation. The word is ignored.
Name
OP_NOP6
Constant
OpCodeType('b5')
Defined in
dist/smart-contract/builtins/functions.d.ts:860
OP_NOP7
▪ Static
Readonly
OP_NOP7: OpCodeType
No operation. The word is ignored.
Name
OP_NOP7
Constant
OpCodeType('b6')
Defined in
dist/smart-contract/builtins/functions.d.ts:866
OP_NOP8
▪ Static
Readonly
OP_NOP8: OpCodeType
No operation. The word is ignored.
Name
OP_NOP8
Constant
OpCodeType('b7')
Defined in
dist/smart-contract/builtins/functions.d.ts:872
OP_NOP9
▪ Static
Readonly
OP_NOP9: OpCodeType
No operation. The word is ignored.
Name
OP_NOP9
Constant
OpCodeType('b8')
Defined in
dist/smart-contract/builtins/functions.d.ts:878
OP_NOT
▪ Static
Readonly
OP_NOT: OpCodeType
If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
Name
OP_NOT
Constant
OpCodeType('91')
Defined in
dist/smart-contract/builtins/functions.d.ts:642
OP_NOTIF
▪ Static
Readonly
OP_NOTIF: OpCodeType
If the top stack value is FALSE, statement 1 is executed. If the top stack value is TRUE and ELSE is used, statement 2 is executed. If ELSE is NOT used, the script jumps to ENDIF. The top stack value is removed.
Deprecated
Name
OP_NOTIF
Constant
OpCodeType('64')
Example
`[expression] NOTIF
[statement 1]
ENDIF`
OR
`[expression] NOTIF
[statement 1]
ELSE
[statement 2]
ENDIF`
Defined in
dist/smart-contract/builtins/functions.d.ts:359
OP_NUM2BIN
▪ Static
Readonly
OP_NUM2BIN: OpCodeType
Converts numeric value a into byte sequence of length b.
Name
OP_NUM2BIN
Constant
OpCodeType('80')
Defined in
dist/smart-contract/builtins/functions.d.ts:540
OP_NUMEQUAL
▪ Static
Readonly
OP_NUMEQUAL: OpCodeType
Returns 1 if the numbers are equal, 0 otherwise.
Name
OP_NUMEQUAL
Constant
OpCodeType('9c')
Defined in
dist/smart-contract/builtins/functions.d.ts:708
OP_NUMEQUALVERIFY
▪ Static
Readonly
OP_NUMEQUALVERIFY: OpCodeType
Same as OP_NUMEQUAL
, but runs OP_VERIFY
afterward.
Name
OP_NUMEQUALVERIFY
Constant
OpCodeType('9d')
Defined in
dist/smart-contract/builtins/functions.d.ts:714
OP_NUMNOTEQUAL
▪ Static
Readonly
OP_NUMNOTEQUAL: OpCodeType
Returns 1 if the numbers are not equal, 0 otherwise.
Name
OP_NUMNOTEQUAL
Constant
OpCodeType('9e')
Defined in
dist/smart-contract/builtins/functions.d.ts:720
OP_OR
▪ Static
Readonly
OP_OR: OpCodeType
Boolean or between each bit in the inputs.
Name
OP_OR
Constant
OpCodeType('85')
Defined in
dist/smart-contract/builtins/functions.d.ts:570
OP_OVER
▪ Static
Readonly
OP_OVER: OpCodeType
Copies the second-to-top stack item to the top.
Name
OP_OVER
Constant
OpCodeType('78')
Defined in
dist/smart-contract/builtins/functions.d.ts:492
OP_PICK
▪ Static
Readonly
OP_PICK: OpCodeType
The item n
back in the stack is copied to the top.
Name
OP_PICK
Constant
OpCodeType('79')
Defined in
dist/smart-contract/builtins/functions.d.ts:498
OP_PUBKEY
▪ Static
Readonly
OP_PUBKEY: OpCodeType
Represents a public key compatible with OP_CHECKSIG. The word is used internally for assisting with transaction matching. They are invalid if used in actual scripts.
Name
OP_PUBKEY
Constant
OpCodeType('fe')
Defined in
dist/smart-contract/builtins/functions.d.ts:896
OP_PUBKEYHASH
▪ Static
Readonly
OP_PUBKEYHASH: OpCodeType
Represents a public key hashed with OP_HASH160. The word is used internally for assisting with transaction matching. They are invalid if used in actual scripts.
Name
OP_PUBKEYHASH
Constant
OpCodeType('fd')
Defined in
dist/smart-contract/builtins/functions.d.ts:890
OP_PUSHDATA1
▪ Static
Readonly
OP_PUSHDATA1: OpCodeType
The next byte contains the number of bytes to be pushed onto the stack.
Name
OP_PUSHDATA1
Constant
OpCodeType('4c')
Defined in
dist/smart-contract/builtins/functions.d.ts:182
OP_PUSHDATA2
▪ Static
Readonly
OP_PUSHDATA2: OpCodeType
The next two bytes contain the number of bytes to be pushed onto the stack in little endian order.
Name
OP_PUSHDATA2
Constant
OpCodeType('4d')
Defined in
dist/smart-contract/builtins/functions.d.ts:188
OP_PUSHDATA4
▪ Static
Readonly
OP_PUSHDATA4: OpCodeType
The next four bytes contain the number of bytes to be pushed onto the stack in little endian order.
Name
OP_PUSHDATA4
Constant
OpCodeType('4e')
Defined in
dist/smart-contract/builtins/functions.d.ts:194
OP_RESERVED
▪ Static
Readonly
OP_RESERVED: OpCodeType
Transaction is invalid unless occuring in an unexecuted OP_IF branch
Name
OP_RESERVED
Constant
OpCodeType('50')
Defined in
dist/smart-contract/builtins/functions.d.ts:206
OP_RESERVED1
▪ Static
Readonly
OP_RESERVED1: OpCodeType
Any opcode not assigned is also reserved. Using an unassigned opcode makes the transaction invalid.
Name
OP_RESERVED1
Constant
OpCodeType('89')
Defined in
dist/smart-contract/builtins/functions.d.ts:594
OP_RESERVED2
▪ Static
Readonly
OP_RESERVED2: OpCodeType
Any opcode not assigned is also reserved. Using an unassigned opcode makes the transaction invalid.
Name
OP_RESERVED2
Constant
OpCodeType('8a')
Defined in
dist/smart-contract/builtins/functions.d.ts:600
OP_RETURN
▪ Static
Readonly
OP_RETURN: OpCodeType
OP_RETURN can also be used to create "False Return" outputs with a scriptPubKey consisting of OP_FALSE
OP_RETURN
followed by data. Such outputs are provably unspendable and should be given a value of zero Satoshis. These outputs can be pruned from storage in the UTXO set, reducing its size. Currently the BitcoinSV network supports multiple FALSE RETURN outputs in a given transaction with each one capable of holding up to 100kB of data. After the Genesis upgrade in 2020 miners will be free to mine transactions containing FALSE RETURN outputs of any size.
Name
OP_RETURN
Constant
OpCodeType('6a')
Defined in
dist/smart-contract/builtins/functions.d.ts:408
OP_RIPEMD160
▪ Static
Readonly
OP_RIPEMD160: OpCodeType
The input is hashed using RIPEMD-160.
Name
OP_RIPEMD160
Constant
OpCodeType('a6')
Defined in
dist/smart-contract/builtins/functions.d.ts:768
OP_ROLL
▪ Static
Readonly
OP_ROLL: OpCodeType
The item n
back in the stack is moved to the top.
Name
OP_ROLL
Constant
OpCodeType('7a')
Defined in
dist/smart-contract/builtins/functions.d.ts:504
OP_ROT
▪ Static
Readonly
OP_ROT: OpCodeType
The top three items on the stack are rotated to the left.
Name
OP_ROT
Constant
OpCodeType('7b')
Defined in
dist/smart-contract/builtins/functions.d.ts:510
OP_RSHIFT
▪ Static
Readonly
OP_RSHIFT: OpCodeType
Logical right shift b bits. Sign data is discarded
Name
OP_RSHIFT
Constant
OpCodeType('99')
Defined in
dist/smart-contract/builtins/functions.d.ts:690
OP_SHA1
▪ Static
Readonly
OP_SHA1: OpCodeType
The input is hashed using SHA-1.
Name
OP_SHA1
Constant
OpCodeType('a7')
Defined in
dist/smart-contract/builtins/functions.d.ts:774
OP_SHA256
▪ Static
Readonly
OP_SHA256: OpCodeType
The input is hashed using SHA-256.
Name
OP_SHA256
Constant
OpCodeType('a8')
Defined in
dist/smart-contract/builtins/functions.d.ts:780
OP_SIZE
▪ Static
Readonly
OP_SIZE: OpCodeType
Pushes the string length of the top element of the stack (without popping it).
Name
OP_SIZE
Constant
OpCodeType('82')
Defined in
dist/smart-contract/builtins/functions.d.ts:552
OP_SPLIT
▪ Static
Readonly
OP_SPLIT: OpCodeType
Splits byte sequence x at position n.
Name
OP_SPLIT
Constant
OpCodeType('7f')
Defined in
dist/smart-contract/builtins/functions.d.ts:534
OP_SUB
▪ Static
Readonly
OP_SUB: OpCodeType
b is subtracted from a.
Name
OP_SUB
Constant
OpCodeType('94')
Defined in
dist/smart-contract/builtins/functions.d.ts:660
OP_SWAP
▪ Static
Readonly
OP_SWAP: OpCodeType
The top two items on the stack are swapped.
Name
OP_SWAP
Constant
OpCodeType('7c')
Defined in
dist/smart-contract/builtins/functions.d.ts:516
OP_TOALTSTACK
▪ Static
Readonly
OP_TOALTSTACK: OpCodeType
Puts the input onto the top of the alt stack. Removes it from the main stack.
Name
OP_TOALTSTACK
Constant
OpCodeType('6b')
Defined in
dist/smart-contract/builtins/functions.d.ts:414
OP_TRUE
▪ Static
Readonly
OP_TRUE: OpCodeType
The number 1 is pushed onto the stack.
Name
OP_TRUE
Constant
OpCodeType('51')
Defined in
dist/smart-contract/builtins/functions.d.ts:218
OP_TUCK
▪ Static
Readonly
OP_TUCK: OpCodeType
The item at the top of the stack is copied and inserted before the second-to-top item.
Name
OP_TUCK
Constant
OpCodeType('7d')
Defined in
dist/smart-contract/builtins/functions.d.ts:522
OP_VER
▪ Static
Readonly
OP_VER: OpCodeType
Puts the version of the protocol under which this transaction will be evaluated onto the stack.
Deprecated
DISABLED
Name
OP_VER
Constant
OpCodeType('62')
Defined in
dist/smart-contract/builtins/functions.d.ts:321
OP_VERIF
▪ Static
Readonly
OP_VERIF: OpCodeType
Name
OP_VERIF
Constant
OpCodeType('65')
Deprecated
DISABLED
Defined in
dist/smart-contract/builtins/functions.d.ts:365
OP_VERIFY
▪ Static
Readonly
OP_VERIFY: OpCodeType
Marks transaction as invalid if top stack value is not true. The top stack value is removed.
Name
OP_VERIFY
Constant
OpCodeType('69')
Defined in
dist/smart-contract/builtins/functions.d.ts:402
OP_VERNOTIF
▪ Static
Readonly
OP_VERNOTIF: OpCodeType
Name
OP_VERNOTIF
Constant
OpCodeType('66')
Deprecated
DISABLED
Defined in
dist/smart-contract/builtins/functions.d.ts:371
OP_WITHIN
▪ Static
Readonly
OP_WITHIN: OpCodeType
Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.
Name
OP_WITHIN
Constant
OpCodeType('a5')
Defined in
dist/smart-contract/builtins/functions.d.ts:762
OP_XOR
▪ Static
Readonly
OP_XOR: OpCodeType
Boolean exclusive or between each bit in the inputs.
Name
OP_XOR
Constant
OpCodeType('86')
Defined in
dist/smart-contract/builtins/functions.d.ts:576