Package org.bitcoinj.script
Class ScriptOpCodes
- java.lang.Object
-
- org.bitcoinj.script.ScriptOpCodes
-
public class ScriptOpCodes extends java.lang.ObjectVarious constants that define the assembly-like scripting language that forms part of the Bitcoin protocol. SeeScriptfor details. Also provides a method to convert them to a string.
-
-
Field Summary
Fields Modifier and Type Field Description static intOP_0static intOP_0NOTEQUALstatic intOP_1static intOP_10static intOP_11static intOP_12static intOP_13static intOP_14static intOP_15static intOP_16static intOP_1ADDstatic intOP_1NEGATEstatic intOP_1SUBstatic intOP_2static intOP_2DIVstatic intOP_2DROPstatic intOP_2DUPstatic intOP_2MULstatic intOP_2OVERstatic intOP_2ROTstatic intOP_2SWAPstatic intOP_3static intOP_3DUPstatic intOP_4static intOP_5static intOP_6static intOP_7static intOP_8static intOP_9static intOP_ABSstatic intOP_ADDstatic intOP_ANDstatic intOP_BOOLANDstatic intOP_BOOLORstatic intOP_CATstatic intOP_CHECKLOCKTIMEVERIFYCheck lock time of the block.static intOP_CHECKMULTISIGstatic intOP_CHECKMULTISIGVERIFYstatic intOP_CHECKSEQUENCEVERIFYstatic intOP_CHECKSIGstatic intOP_CHECKSIGVERIFYstatic intOP_CODESEPARATORstatic intOP_DEPTHstatic intOP_DIVstatic intOP_DROPstatic intOP_DUPstatic intOP_ELSEstatic intOP_ENDIFstatic intOP_EQUALstatic intOP_EQUALVERIFYstatic intOP_FALSEstatic intOP_FROMALTSTACKstatic intOP_GREATERTHANstatic intOP_GREATERTHANOREQUALstatic intOP_HASH160static intOP_HASH256static intOP_IFstatic intOP_IFDUPstatic intOP_INVALIDOPCODEstatic intOP_INVERTstatic intOP_LEFTstatic intOP_LESSTHANstatic intOP_LESSTHANOREQUALstatic intOP_LSHIFTstatic intOP_MAXstatic intOP_MINstatic intOP_MODstatic intOP_MULstatic intOP_NEGATEstatic intOP_NIPstatic intOP_NOPstatic intOP_NOP1static intOP_NOP10static intOP_NOP2Deprecated.static intOP_NOP3Deprecated.static intOP_NOP4static intOP_NOP5static intOP_NOP6static intOP_NOP7static intOP_NOP8static intOP_NOP9static intOP_NOTstatic intOP_NOTIFstatic intOP_NUMEQUALstatic intOP_NUMEQUALVERIFYstatic intOP_NUMNOTEQUALstatic intOP_ORstatic intOP_OVERstatic intOP_PICKstatic intOP_PUSHDATA1static intOP_PUSHDATA2static intOP_PUSHDATA4static intOP_RESERVEDstatic intOP_RESERVED1static intOP_RESERVED2static intOP_RETURNstatic intOP_RIGHTstatic intOP_RIPEMD160static intOP_ROLLstatic intOP_ROTstatic intOP_RSHIFTstatic intOP_SHA1static intOP_SHA256static intOP_SIZEstatic intOP_SUBstatic intOP_SUBSTRstatic intOP_SWAPstatic intOP_TOALTSTACKstatic intOP_TRUEstatic intOP_TUCKstatic intOP_VERstatic intOP_VERIFstatic intOP_VERIFYstatic intOP_VERNOTIFstatic intOP_WITHINstatic intOP_XOR
-
Constructor Summary
Constructors Constructor Description ScriptOpCodes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetOpCode(java.lang.String opCodeName)Converts the given OpCodeName into an intstatic java.lang.StringgetOpCodeName(int opcode)Converts the given OpCode into a string (eg "0", "PUSHDATA", or "NON_OP(10)")static java.lang.StringgetPushDataName(int opcode)Converts the given pushdata OpCode into a string (eg "PUSHDATA2", or "PUSHDATA(23)")
-
-
-
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_CHECKLOCKTIMEVERIFY
public static final int OP_CHECKLOCKTIMEVERIFY
Check lock time of the block. Introduced in BIP 65, replacing OP_NOP2- See Also:
- Constant Field Values
-
OP_CHECKSEQUENCEVERIFY
public static final int OP_CHECKSEQUENCEVERIFY
- See Also:
- Constant Field Values
-
OP_NOP1
public static final int OP_NOP1
- See Also:
- Constant Field Values
-
OP_NOP2
@Deprecated public static final int OP_NOP2
Deprecated.Deprecated by BIP 65- See Also:
- Constant Field Values
-
OP_NOP3
@Deprecated public static final int OP_NOP3
Deprecated.Deprecated by BIP 112- 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
-
-
Method Detail
-
getOpCodeName
public static java.lang.String getOpCodeName(int opcode)
Converts the given OpCode into a string (eg "0", "PUSHDATA", or "NON_OP(10)")
-
getPushDataName
public static java.lang.String getPushDataName(int opcode)
Converts the given pushdata OpCode into a string (eg "PUSHDATA2", or "PUSHDATA(23)")
-
getOpCode
public static int getOpCode(java.lang.String opCodeName)
Converts the given OpCodeName into an int
-
-