Expand description
Enables wildcard imports to bring into scope all opcodes and nothing else.
The all
module is provided so one can use a wildcard import use bitcoin::opcodes::all::*
to
get all the OP_FOO
opcodes without getting other types defined in opcodes
(e.g. Opcode
, Class
).
This module is guaranteed to never contain anything except opcode constants and all opcode constants are guaranteed to begin with OP_.
Constants§
- Map 0 to 0 and everything else to 1, in place.
- Increment the top stack element in place.
- Decrement the top stack element in place.
- Fail the script unconditionally, does not even need to be executed.
- Drops the top two stack items.
- Duplicates the top two stack items as AB -> ABAB.
- Fail the script unconditionally, does not even need to be executed.
- Copies the two stack items of items two spaces back to the front, as xxAB -> ABxxAB.
- Moves the two stack items four spaces back to the front, as xxxxAB -> ABxxxx.
- Swaps the top two pairs, as ABCD -> CDAB.
- Duplicates the two three stack items as ABC -> ABCABC.
- Absolute value the top stack item in place.
- Pop two stack items and push their sum.
- Fail the script unconditionally, does not even need to be executed.
- Pop the top two stack items and push 1 if both are nonzero, else push 0.
- Pop the top two stack items and push 1 if either is nonzero, else push 0.
- Fail the script unconditionally, does not even need to be executed.
- Pop N, N pubkeys, M, M signatures, a dummy (due to bug in reference code), and verify that all M signatures are valid. Push 1 for ‘all valid’, 0 otherwise.
- Like the above but return success/failure.
- https://en.bitcoin.it/wiki/OP_CHECKSIG pushing 1/0 for success/failure.
- OP_CHECKSIGADD post tapscript.
- https://en.bitcoin.it/wiki/OP_CHECKSIG returning success/failure.
- Ignore this and everything preceding when deciding what to sign when signature-checking.
- Push the current number of stack items onto the stack.
- Fail the script unconditionally, does not even need to be executed.
- Drops the top stack item.
- Duplicates the top stack item.
- Execute statements if those after the previous OP_IF were not, and vice-versa. If there is no previous OP_IF, this acts as a RETURN.
- Pop and execute the next statements if a zero element was popped.
- Pushes 1 if the inputs are exactly equal, 0 otherwise.
- Returns success if the inputs are exactly equal, failure otherwise.
- Pop one element from the alt stack onto the main stack.
- Pop the top two items; push 1 if the second is greater than the top, 0 otherwise.
- Pop the top two items; push 1 if the second is >= the top, 0 otherwise.
- Pop the top stack item and push its RIPEMD(SHA256) hash.
- Pop the top stack item and push its SHA256(SHA256) hash.
- Pop and execute the next statements if a nonzero element was popped.
- Duplicate the top stack element unless it is zero.
- Synonym for OP_RETURN.
- Fail the script unconditionally, does not even need to be executed.
- Fail the script unconditionally, does not even need to be executed.
- Pop the top two items; push 1 if the second is less than the top, 0 otherwise.
- Pop the top two items; push 1 if the second is <= the top, 0 otherwise.
- Fail the script unconditionally, does not even need to be executed.
- Pop the top two items; push the larger.
- Pop the top two items; push the smaller.
- Fail the script unconditionally, does not even need to be executed.
- Fail the script unconditionally, does not even need to be executed.
- Multiply the top stack item by -1 in place.
- Drops the second-to-top stack item.
- Does nothing.
- Does nothing.
- Does nothing.
- Does nothing.
- Does nothing.
- Does nothing.
- Does nothing.
- Does nothing.
- Does nothing.
- Map 0 to 1 and everything else to 0, in place.
- Pop and execute the next statements if a zero element was popped.
- Pop the top two stack items and push 1 if both are numerically equal, else push 0.
- Pop the top two stack items and return success if both are numerically equal, else return failure.
- Pop the top two stack items and push 0 if both are numerically equal, else push 1.
- Fail the script unconditionally, does not even need to be executed.
- Copies the second-to-top stack item, as xA -> AxA.
- Pop the top stack element as N. Copy the Nth stack element to the top.
- Push an empty array onto the stack.
- Push the next byte as an array onto the stack.
- Push the next 2 bytes as an array onto the stack.
- Push the next 3 bytes as an array onto the stack.
- Push the next 4 bytes as an array onto the stack.
- Push the next 5 bytes as an array onto the stack.
- Push the next 6 bytes as an array onto the stack.
- Push the next 7 bytes as an array onto the stack.
- Push the next 8 bytes as an array onto the stack.
- Push the next 9 bytes as an array onto the stack.
- Push the next 10 bytes as an array onto the stack.
- Push the next 11 bytes as an array onto the stack.
- Push the next 12 bytes as an array onto the stack.
- Push the next 13 bytes as an array onto the stack.
- Push the next 14 bytes as an array onto the stack.
- Push the next 15 bytes as an array onto the stack.
- Push the next 16 bytes as an array onto the stack.
- Push the next 17 bytes as an array onto the stack.
- Push the next 18 bytes as an array onto the stack.
- Push the next 19 bytes as an array onto the stack.
- Push the next 20 bytes as an array onto the stack.
- Push the next 21 bytes as an array onto the stack.
- Push the next 22 bytes as an array onto the stack.
- Push the next 23 bytes as an array onto the stack.
- Push the next 24 bytes as an array onto the stack.
- Push the next 25 bytes as an array onto the stack.
- Push the next 26 bytes as an array onto the stack.
- Push the next 27 bytes as an array onto the stack.
- Push the next 28 bytes as an array onto the stack.
- Push the next 29 bytes as an array onto the stack.
- Push the next 30 bytes as an array onto the stack.
- Push the next 31 bytes as an array onto the stack.
- Push the next 32 bytes as an array onto the stack.
- Push the next 33 bytes as an array onto the stack.
- Push the next 34 bytes as an array onto the stack.
- Push the next 35 bytes as an array onto the stack.
- Push the next 36 bytes as an array onto the stack.
- Push the next 37 bytes as an array onto the stack.
- Push the next 38 bytes as an array onto the stack.
- Push the next 39 bytes as an array onto the stack.
- Push the next 40 bytes as an array onto the stack.
- Push the next 41 bytes as an array onto the stack.
- Push the next 42 bytes as an array onto the stack.
- Push the next 43 bytes as an array onto the stack.
- Push the next 44 bytes as an array onto the stack.
- Push the next 45 bytes as an array onto the stack.
- Push the next 46 bytes as an array onto the stack.
- Push the next 47 bytes as an array onto the stack.
- Push the next 48 bytes as an array onto the stack.
- Push the next 49 bytes as an array onto the stack.
- Push the next 50 bytes as an array onto the stack.
- Push the next 51 bytes as an array onto the stack.
- Push the next 52 bytes as an array onto the stack.
- Push the next 53 bytes as an array onto the stack.
- Push the next 54 bytes as an array onto the stack.
- Push the next 55 bytes as an array onto the stack.
- Push the next 56 bytes as an array onto the stack.
- Push the next 57 bytes as an array onto the stack.
- Push the next 58 bytes as an array onto the stack.
- Push the next 59 bytes as an array onto the stack.
- Push the next 60 bytes as an array onto the stack.
- Push the next 61 bytes as an array onto the stack.
- Push the next 62 bytes as an array onto the stack.
- Push the next 63 bytes as an array onto the stack.
- Push the next 64 bytes as an array onto the stack.
- Push the next 65 bytes as an array onto the stack.
- Push the next 66 bytes as an array onto the stack.
- Push the next 67 bytes as an array onto the stack.
- Push the next 68 bytes as an array onto the stack.
- Push the next 69 bytes as an array onto the stack.
- Push the next 70 bytes as an array onto the stack.
- Push the next 71 bytes as an array onto the stack.
- Push the next 72 bytes as an array onto the stack.
- Push the next 73 bytes as an array onto the stack.
- Push the next 74 bytes as an array onto the stack.
- Push the next 75 bytes as an array onto the stack.
- Read the next byte as N; push the next N bytes as an array onto the stack.
- Read the next 2 bytes as N; push the next N bytes as an array onto the stack.
- Read the next 4 bytes as N; push the next N bytes as an array onto the stack.
- Push the array
0x01
onto the stack. - Push the array
0x02
onto the stack. - Push the array
0x03
onto the stack. - Push the array
0x04
onto the stack. - Push the array
0x05
onto the stack. - Push the array
0x06
onto the stack. - Push the array
0x07
onto the stack. - Push the array
0x08
onto the stack. - Push the array
0x09
onto the stack. - Push the array
0x0a
onto the stack. - Push the array
0x0b
onto the stack. - Push the array
0x0c
onto the stack. - Push the array
0x0d
onto the stack. - Push the array
0x0e
onto the stack. - Push the array
0x0f
onto the stack. - Push the array
0x10
onto the stack. - Push the array
0x81
onto the stack. - Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Fail the script immediately. (Must be executed.).
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Synonym for OP_RETURN.
- Fail the script unconditionally, does not even need to be executed.
- Pop the top stack item and push its RIPEMD160 hash.
- Pop the top stack element as N. Move the Nth stack element to the top.
- Rotate the top three stack items, as [top next1 next2] -> [next2 top next1].
- Fail the script unconditionally, does not even need to be executed.
- Pop the top stack item and push its SHA1 hash.
- Pop the top stack item and push its SHA256 hash.
- Pushes the length of the top stack item onto the stack.
- Pop two stack items and push the second minus the top.
- Fail the script unconditionally, does not even need to be executed.
- Swap the top two stack items.
- Pop one element from the main stack onto the alt stack.
- Copy the top stack item to before the second item, as [top next] -> [top next top].
- Synonym for OP_RETURN.
- Fail the script unconditionally, does not even need to be executed.
- If the top value is zero or the stack is empty, fail; otherwise, pop the stack.
- Fail the script unconditionally, does not even need to be executed.
- Pop the top three items; if the top is >= the second and < the third, push 1, otherwise push 0.
- Fail the script unconditionally, does not even need to be executed.