com.google.bitcoin.script
Class ScriptOpCodes

java.lang.Object
  extended by com.google.bitcoin.script.ScriptOpCodes

public class ScriptOpCodes
extends Object

Various constants that define the assembly-like scripting language that forms part of the Bitcoin protocol. See Script for details. Also provides a method to convert them to a string.


Field Summary
static int OP_0
           
static int OP_0NOTEQUAL
           
static int OP_1
           
static int OP_10
           
static int OP_11
           
static int OP_12
           
static int OP_13
           
static int OP_14
           
static int OP_15
           
static int OP_16
           
static int OP_1ADD
           
static int OP_1NEGATE
           
static int OP_1SUB
           
static int OP_2
           
static int OP_2DIV
           
static int OP_2DROP
           
static int OP_2DUP
           
static int OP_2MUL
           
static int OP_2OVER
           
static int OP_2ROT
           
static int OP_2SWAP
           
static int OP_3
           
static int OP_3DUP
           
static int OP_4
           
static int OP_5
           
static int OP_6
           
static int OP_7
           
static int OP_8
           
static int OP_9
           
static int OP_ABS
           
static int OP_ADD
           
static int OP_AND
           
static int OP_BOOLAND
           
static int OP_BOOLOR
           
static int OP_CAT
           
static int OP_CHECKMULTISIG
           
static int OP_CHECKMULTISIGVERIFY
           
static int OP_CHECKSIG
           
static int OP_CHECKSIGVERIFY
           
static int OP_CODESEPARATOR
           
static int OP_DEPTH
           
static int OP_DIV
           
static int OP_DROP
           
static int OP_DUP
           
static int OP_ELSE
           
static int OP_ENDIF
           
static int OP_EQUAL
           
static int OP_EQUALVERIFY
           
static int OP_FALSE
           
static int OP_FROMALTSTACK
           
static int OP_GREATERTHAN
           
static int OP_GREATERTHANOREQUAL
           
static int OP_HASH160
           
static int OP_HASH256
           
static int OP_IF
           
static int OP_IFDUP
           
static int OP_INVALIDOPCODE
           
static int OP_INVERT
           
static int OP_LEFT
           
static int OP_LESSTHAN
           
static int OP_LESSTHANOREQUAL
           
static int OP_LSHIFT
           
static int OP_MAX
           
static int OP_MIN
           
static int OP_MOD
           
static int OP_MUL
           
static int OP_NEGATE
           
static int OP_NIP
           
static int OP_NOP
           
static int OP_NOP1
           
static int OP_NOP10
           
static int OP_NOP2
           
static int OP_NOP3
           
static int OP_NOP4
           
static int OP_NOP5
           
static int OP_NOP6
           
static int OP_NOP7
           
static int OP_NOP8
           
static int OP_NOP9
           
static int OP_NOT
           
static int OP_NOTIF
           
static int OP_NUMEQUAL
           
static int OP_NUMEQUALVERIFY
           
static int OP_NUMNOTEQUAL
           
static int OP_OR
           
static int OP_OVER
           
static int OP_PICK
           
static int OP_PUSHDATA1
           
static int OP_PUSHDATA2
           
static int OP_PUSHDATA4
           
static int OP_RESERVED
           
static int OP_RESERVED1
           
static int OP_RESERVED2
           
static int OP_RETURN
           
static int OP_RIGHT
           
static int OP_RIPEMD160
           
static int OP_ROLL
           
static int OP_ROT
           
static int OP_RSHIFT
           
static int OP_SHA1
           
static int OP_SHA256
           
static int OP_SIZE
           
static int OP_SUB
           
static int OP_SUBSTR
           
static int OP_SWAP
           
static int OP_TOALTSTACK
           
static int OP_TRUE
           
static int OP_TUCK
           
static int OP_VER
           
static int OP_VERIF
           
static int OP_VERIFY
           
static int OP_VERNOTIF
           
static int OP_WITHIN
           
static int OP_XOR
           
 
Constructor Summary
ScriptOpCodes()
           
 
Method Summary
static int getOpCode(String opCodeName)
          Converts the given OpCodeName into an int
static String getOpCodeName(byte opCode)
          Converts the given OpCode into a string (eg "0", "PUSHDATA", or "NON_OP(10)")
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_0

public static final int OP_0
See Also:
Constant Field Values

OP_FALSE

public static final int OP_FALSE
See Also:
Constant Field Values

OP_PUSHDATA1

public static final int OP_PUSHDATA1
See Also:
Constant Field Values

OP_PUSHDATA2

public static final int OP_PUSHDATA2
See Also:
Constant Field Values

OP_PUSHDATA4

public static final int OP_PUSHDATA4
See Also:
Constant Field Values

OP_1NEGATE

public static final int OP_1NEGATE
See Also:
Constant Field Values

OP_RESERVED

public static final int OP_RESERVED
See Also:
Constant Field Values

OP_1

public static final int OP_1
See Also:
Constant Field Values

OP_TRUE

public static final int OP_TRUE
See Also:
Constant Field Values

OP_2

public static final int OP_2
See Also:
Constant Field Values

OP_3

public static final int OP_3
See Also:
Constant Field Values

OP_4

public static final int OP_4
See Also:
Constant Field Values

OP_5

public static final int OP_5
See Also:
Constant Field Values

OP_6

public static final int OP_6
See Also:
Constant Field Values

OP_7

public static final int OP_7
See Also:
Constant Field Values

OP_8

public static final int OP_8
See Also:
Constant Field Values

OP_9

public static final int OP_9
See Also:
Constant Field Values

OP_10

public static final int OP_10
See Also:
Constant Field Values

OP_11

public static final int OP_11
See Also:
Constant Field Values

OP_12

public static final int OP_12
See Also:
Constant Field Values

OP_13

public static final int OP_13
See Also:
Constant Field Values

OP_14

public static final int OP_14
See Also:
Constant Field Values

OP_15

public static final int OP_15
See Also:
Constant Field Values

OP_16

public static final int OP_16
See Also:
Constant Field Values

OP_NOP

public static final int OP_NOP
See Also:
Constant Field Values

OP_VER

public static final int OP_VER
See Also:
Constant Field Values

OP_IF

public static final int OP_IF
See Also:
Constant Field Values

OP_NOTIF

public static final int OP_NOTIF
See Also:
Constant Field Values

OP_VERIF

public static final int OP_VERIF
See Also:
Constant Field Values

OP_VERNOTIF

public static final int OP_VERNOTIF
See Also:
Constant Field Values

OP_ELSE

public static final int OP_ELSE
See Also:
Constant Field Values

OP_ENDIF

public static final int OP_ENDIF
See Also:
Constant Field Values

OP_VERIFY

public static final int OP_VERIFY
See Also:
Constant Field Values

OP_RETURN

public static final int OP_RETURN
See Also:
Constant Field Values

OP_TOALTSTACK

public static final int OP_TOALTSTACK
See Also:
Constant Field Values

OP_FROMALTSTACK

public static final int OP_FROMALTSTACK
See Also:
Constant Field Values

OP_2DROP

public static final int OP_2DROP
See Also:
Constant Field Values

OP_2DUP

public static final int OP_2DUP
See Also:
Constant Field Values

OP_3DUP

public static final int OP_3DUP
See Also:
Constant Field Values

OP_2OVER

public static final int OP_2OVER
See Also:
Constant Field Values

OP_2ROT

public static final int OP_2ROT
See Also:
Constant Field Values

OP_2SWAP

public static final int OP_2SWAP
See Also:
Constant Field Values

OP_IFDUP

public static final int OP_IFDUP
See Also:
Constant Field Values

OP_DEPTH

public static final int OP_DEPTH
See Also:
Constant Field Values

OP_DROP

public static final int OP_DROP
See Also:
Constant Field Values

OP_DUP

public static final int OP_DUP
See Also:
Constant Field Values

OP_NIP

public static final int OP_NIP
See Also:
Constant Field Values

OP_OVER

public static final int OP_OVER
See Also:
Constant Field Values

OP_PICK

public static final int OP_PICK
See Also:
Constant Field Values

OP_ROLL

public static final int OP_ROLL
See Also:
Constant Field Values

OP_ROT

public static final int OP_ROT
See Also:
Constant Field Values

OP_SWAP

public static final int OP_SWAP
See Also:
Constant Field Values

OP_TUCK

public static final int OP_TUCK
See Also:
Constant Field Values

OP_CAT

public static final int OP_CAT
See Also:
Constant Field Values

OP_SUBSTR

public static final int OP_SUBSTR
See Also:
Constant Field Values

OP_LEFT

public static final int OP_LEFT
See Also:
Constant Field Values

OP_RIGHT

public static final int OP_RIGHT
See Also:
Constant Field Values

OP_SIZE

public static final int OP_SIZE
See Also:
Constant Field Values

OP_INVERT

public static final int OP_INVERT
See Also:
Constant Field Values

OP_AND

public static final int OP_AND
See Also:
Constant Field Values

OP_OR

public static final int OP_OR
See Also:
Constant Field Values

OP_XOR

public static final int OP_XOR
See Also:
Constant Field Values

OP_EQUAL

public static final int OP_EQUAL
See Also:
Constant Field Values

OP_EQUALVERIFY

public static final int OP_EQUALVERIFY
See Also:
Constant Field Values

OP_RESERVED1

public static final int OP_RESERVED1
See Also:
Constant Field Values

OP_RESERVED2

public static final int OP_RESERVED2
See Also:
Constant Field Values

OP_1ADD

public static final int OP_1ADD
See Also:
Constant Field Values

OP_1SUB

public static final int OP_1SUB
See Also:
Constant Field Values

OP_2MUL

public static final int OP_2MUL
See Also:
Constant Field Values

OP_2DIV

public static final int OP_2DIV
See Also:
Constant Field Values

OP_NEGATE

public static final int OP_NEGATE
See Also:
Constant Field Values

OP_ABS

public static final int OP_ABS
See Also:
Constant Field Values

OP_NOT

public static final int OP_NOT
See Also:
Constant Field Values

OP_0NOTEQUAL

public static final int OP_0NOTEQUAL
See Also:
Constant Field Values

OP_ADD

public static final int OP_ADD
See Also:
Constant Field Values

OP_SUB

public static final int OP_SUB
See Also:
Constant Field Values

OP_MUL

public static final int OP_MUL
See Also:
Constant Field Values

OP_DIV

public static final int OP_DIV
See Also:
Constant Field Values

OP_MOD

public static final int OP_MOD
See Also:
Constant Field Values

OP_LSHIFT

public static final int OP_LSHIFT
See Also:
Constant Field Values

OP_RSHIFT

public static final int OP_RSHIFT
See Also:
Constant Field Values

OP_BOOLAND

public static final int OP_BOOLAND
See Also:
Constant Field Values

OP_BOOLOR

public static final int OP_BOOLOR
See Also:
Constant Field Values

OP_NUMEQUAL

public static final int OP_NUMEQUAL
See Also:
Constant Field Values

OP_NUMEQUALVERIFY

public static final int OP_NUMEQUALVERIFY
See Also:
Constant Field Values

OP_NUMNOTEQUAL

public static final int OP_NUMNOTEQUAL
See Also:
Constant Field Values

OP_LESSTHAN

public static final int OP_LESSTHAN
See Also:
Constant Field Values

OP_GREATERTHAN

public static final int OP_GREATERTHAN
See Also:
Constant Field Values

OP_LESSTHANOREQUAL

public static final int OP_LESSTHANOREQUAL
See Also:
Constant Field Values

OP_GREATERTHANOREQUAL

public static final int OP_GREATERTHANOREQUAL
See Also:
Constant Field Values

OP_MIN

public static final int OP_MIN
See Also:
Constant Field Values

OP_MAX

public static final int OP_MAX
See Also:
Constant Field Values

OP_WITHIN

public static final int OP_WITHIN
See Also:
Constant Field Values

OP_RIPEMD160

public static final int OP_RIPEMD160
See Also:
Constant Field Values

OP_SHA1

public static final int OP_SHA1
See Also:
Constant Field Values

OP_SHA256

public static final int OP_SHA256
See Also:
Constant Field Values

OP_HASH160

public static final int OP_HASH160
See Also:
Constant Field Values

OP_HASH256

public static final int OP_HASH256
See Also:
Constant Field Values

OP_CODESEPARATOR

public static final int OP_CODESEPARATOR
See Also:
Constant Field Values

OP_CHECKSIG

public static final int OP_CHECKSIG
See Also:
Constant Field Values

OP_CHECKSIGVERIFY

public static final int OP_CHECKSIGVERIFY
See Also:
Constant Field Values

OP_CHECKMULTISIG

public static final int OP_CHECKMULTISIG
See Also:
Constant Field Values

OP_CHECKMULTISIGVERIFY

public static final int OP_CHECKMULTISIGVERIFY
See Also:
Constant Field Values

OP_NOP1

public static final int OP_NOP1
See Also:
Constant Field Values

OP_NOP2

public static final int OP_NOP2
See Also:
Constant Field Values

OP_NOP3

public static final int OP_NOP3
See Also:
Constant Field Values

OP_NOP4

public static final int OP_NOP4
See Also:
Constant Field Values

OP_NOP5

public static final int OP_NOP5
See Also:
Constant Field Values

OP_NOP6

public static final int OP_NOP6
See Also:
Constant Field Values

OP_NOP7

public static final int OP_NOP7
See Also:
Constant Field Values

OP_NOP8

public static final int OP_NOP8
See Also:
Constant Field Values

OP_NOP9

public static final int OP_NOP9
See Also:
Constant Field Values

OP_NOP10

public static final int OP_NOP10
See Also:
Constant Field Values

OP_INVALIDOPCODE

public static final int OP_INVALIDOPCODE
See Also:
Constant Field Values
Constructor Detail

ScriptOpCodes

public ScriptOpCodes()
Method Detail

getOpCodeName

public static String getOpCodeName(byte opCode)
Converts the given OpCode into a string (eg "0", "PUSHDATA", or "NON_OP(10)")


getOpCode

public static int getOpCode(String opCodeName)
Converts the given OpCodeName into an int



Copyright © 2014. All rights reserved.