Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore NameStore NameStore NameStore NameStore NameStore Lambda arguments args NameParam defaults NameLoad Assign NameStore NameStore NameStore NameStore NameStore Lambda arguments args NameParam defaults NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad keyword NameLoad If CompareLt NameLoad Num body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If SubscriptLoad NameLoad Index Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index BinOpSub UnaryOpUSub NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpSub UnaryOpUSub NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Slice NameLoad BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Slice NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Slice UnaryOpUSub NameLoad orelse Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp BinOpBitXor NameLoad Num comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore BinOpMult Str NameLoad Assign NameStore SubscriptLoad BinOpAdd NameLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad BinOpAdd NameLoad NameLoad Slice NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list Return NameLoad decorator_list Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpBitAnd NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpBitOr NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpBitXor NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad CompareEq NameLoad NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad Str Return Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpFloorDiv NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpMod NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpLShift NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpRShift NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BoolOpAnd NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BoolOpOr NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareEq NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareEq NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareNotEq NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareLt NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareGt NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareLtE NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults CompareGtE NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore ListComp Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore Call NameLoad Num Assign NameStore CompareLtELt NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list Assign NameStore Call NameLoad Lambda arguments args NameParam defaults BinOpAdd NameLoad Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults BinOpSub NameLoad Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults BinOpLShift NameLoad Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults BinOpRShift NameLoad Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults UnaryOpUSub NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign AttributeStore NameLoad attr CompareGt Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad If CompareEq NameLoad Str body Import alias Expr Call AttributeLoad NameLoad attr
N/A N/A 
Implement instructions of the Bitcoin VM.


The MIT License (MIT)

Copyright (c) 2013 by Richard Kiss

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 N/A binascii N/A hashlib N/A inspect N/A ScriptError opcodes OPCODE_TO_INT tools bool_from_script_bytes bool_to_script_bytes int_to_script_bytes int_from_script_bytes encoding hash160 double_sha256 ripemd160 serialize h2b N/A VCH_TRUE N/A VCH_FALSE N/A do_OP_NOP do_OP_NOP1 do_OP_NOP2 do_OP_NOP3 do_OP_NOP4 do_OP_NOP5 N/A N/A N/A s N/A None N/A do_OP_NOP6 do_OP_NOP7 do_OP_NOP8 do_OP_NOP9 do_OP_NOP10 N/A N/A N/A s N/A None nonnegative_int_from_script_bytes N/A N/A b require_minimal N/A N/A N/A v N/A int_from_script_bytes b require_minimal require_minimal N/A N/A v 0 N/A N/A N/A ScriptError unexpectedly got negative value N/A v N/A do_OP_0 N/A N/A stack N/A N/A N/A N/A N/A stack append N/A do_OP_RESERVED N/A N/A stack N/A N/A N/A N/A ScriptError OP_RESERVED encountered N/A do_OP_VER N/A N/A stack N/A N/A N/A N/A ScriptError OP_VER encountered N/A do_OP_RESERVED1 N/A N/A stack N/A N/A N/A N/A ScriptError OP_RESERVED1 encountered N/A do_OP_RESERVED2 N/A N/A stack N/A N/A N/A N/A ScriptError OP_RESERVED2 encountered N/A do_OP_VERIFY N/A N/A stack N/A N/A N/A N/A do_OP_RETURN N/A N/A stack N/A N/A N/A N/A ScriptError OP_RETURN encountered N/A do_OP_2DROP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3]
    >>> do_OP_2DROP(s)
    >>> print(s)
    [1]
     N/A N/A N/A stack pop N/A N/A N/A stack pop N/A do_OP_2DUP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2]
    >>> do_OP_2DUP(s)
    >>> print(s)
    [1, 2, 1, 2]
     N/A N/A N/A stack append N/A stack N/A -2 N/A N/A N/A stack append N/A stack N/A -2 N/A do_OP_3DUP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3]
    >>> do_OP_3DUP(s)
    >>> print(s)
    [1, 2, 3, 1, 2, 3]
     N/A N/A N/A stack append N/A stack N/A -3 N/A N/A N/A stack append N/A stack N/A -3 N/A N/A N/A stack append N/A stack N/A -3 N/A do_OP_2OVER N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3, 4]
    >>> do_OP_2OVER(s)
    >>> print(s)
    [1, 2, 3, 4, 1, 2]
     N/A N/A N/A stack append N/A stack N/A -4 N/A N/A N/A stack append N/A stack N/A -4 N/A do_OP_2ROT N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3, 4, 5, 6]
    >>> do_OP_2ROT(s)
    >>> print(s)
    [3, 4, 5, 6, 1, 2]
     N/A N/A N/A stack append N/A N/A stack pop -6 N/A N/A N/A stack append N/A N/A stack pop -6 N/A do_OP_2SWAP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3, 4]
    >>> do_OP_2SWAP(s)
    >>> print(s)
    [3, 4, 1, 2]
     N/A N/A N/A stack append N/A N/A stack pop -4 N/A N/A N/A stack append N/A N/A stack pop -4 N/A do_OP_IFDUP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2]
    >>> do_OP_IFDUP(s)
    >>> print(s)
    [1, 2, 2]
    >>> s = [1, 2, 0]
    >>> do_OP_IFDUP(s)
    >>> print(s)
    [1, 2, 0]
     N/A N/A stack N/A -1 N/A N/A N/A N/A stack append N/A stack N/A -1 N/A do_OP_DEPTH N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 1, 2, 1, 2]
    >>> do_OP_DEPTH(s)
    >>> print(s)
    [1, 2, 1, 2, 1, 2, 6]
     N/A N/A N/A stack append N/A int_to_script_bytes N/A len stack N/A do_OP_DROP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2]
    >>> do_OP_DROP(s)
    >>> print(s)
    [1]
     N/A N/A N/A stack pop N/A do_OP_DUP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2]
    >>> do_OP_DUP(s)
    >>> print(s)
    [1, 2, 2]
     N/A N/A N/A stack append N/A stack N/A -1 N/A do_OP_NIP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2]
    >>> do_OP_NIP(s)
    >>> print(s)
    [2]
     N/A v N/A N/A stack pop N/A N/A N/A stack pop N/A N/A N/A stack append v N/A do_OP_OVER N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2]
    >>> do_OP_OVER(s)
    >>> print(s)
    [1, 2, 1]
     N/A N/A N/A stack append N/A stack N/A -2 N/A do_OP_PICK N/A N/A stack require_minimal N/A N/A N/A 
    >>> s = ['a', 'b', 'c', 'd', b'']
    >>> do_OP_PICK(s)
    >>> print(s)
    ['a', 'b', 'c', 'd', 'b']
     N/A v N/A nonnegative_int_from_script_bytes N/A N/A stack pop require_minimal require_minimal N/A N/A N/A stack append N/A stack N/A N/A N/A v 1 N/A do_OP_ROLL N/A N/A stack require_minimal N/A N/A N/A 
    >>> s = ['a', 'b', 'c', 'd', b'']
    >>> do_OP_ROLL(s)
    >>> print(s)
    ['a', 'c', 'd', 'b']
     N/A v N/A nonnegative_int_from_script_bytes N/A N/A stack pop require_minimal require_minimal N/A N/A N/A stack append N/A N/A stack pop N/A N/A v 1 N/A do_OP_ROT N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3]
    >>> do_OP_ROT(s)
    >>> print(s)
    [2, 3, 1]
     N/A N/A N/A stack append N/A N/A stack pop -3 N/A do_OP_SWAP N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3]
    >>> do_OP_SWAP(s)
    >>> print(s)
    [1, 3, 2]
     N/A N/A N/A stack append N/A N/A stack pop -2 N/A do_OP_TUCK N/A N/A stack N/A N/A N/A 
    >>> s = [1, 2, 3]
    >>> do_OP_TUCK(s)
    >>> print(s)
    [1, 3, 2, 3]
     N/A v1 N/A N/A stack pop N/A v2 N/A N/A stack pop N/A N/A N/A stack append v1 N/A N/A N/A stack append v2 N/A N/A N/A stack append v1 N/A do_OP_CAT N/A N/A stack N/A N/A N/A 
    >>> s = ["foo", "bar"]
    >>> do_OP_CAT(s)
    >>> print(s)
    ['foobar']
     N/A v1 N/A N/A stack pop N/A v2 N/A N/A stack pop N/A N/A N/A stack append N/A v2 v1 N/A do_OP_SUBSTR N/A N/A stack N/A N/A N/A 
    >>> s = ['abcdef', b'', b'']
    >>> do_OP_SUBSTR(s)
    >>> print(s)
    ['de']
     N/A pos N/A nonnegative_int_from_script_bytes N/A N/A stack pop N/A length N/A nonnegative_int_from_script_bytes N/A N/A stack pop N/A N/A N/A stack append N/A N/A N/A stack pop N/A length N/A length pos N/A do_OP_LEFT N/A N/A stack N/A N/A N/A 
    >>> s = [b'abcdef', b'\3']
    >>> do_OP_LEFT(s)
    >>> print(len(s)==1 and s[0]==b'abc')
    True
    >>> s = [b'abcdef', b'\0']
    >>> do_OP_LEFT(s)
    >>> print(len(s) ==1 and s[0]==b'')
    True
     N/A pos N/A nonnegative_int_from_script_bytes N/A N/A stack pop N/A N/A N/A stack append N/A N/A N/A stack pop N/A pos N/A do_OP_RIGHT N/A N/A stack N/A N/A N/A 
    >>> s = [b'abcdef', b'\3']
    >>> do_OP_RIGHT(s)
    >>> print(s==[b'def'])
    True
    >>> s = [b'abcdef', b'\0']
    >>> do_OP_RIGHT(s)
    >>> print(s==[b''])
    True
     N/A pos N/A nonnegative_int_from_script_bytes N/A N/A stack pop N/A N/A pos 0 N/A N/A N/A N/A stack append N/A N/A N/A stack pop N/A N/A pos N/A N/A N/A N/A stack pop N/A N/A N/A stack append N/A do_OP_SIZE N/A N/A stack N/A N/A N/A 
    >>> s = [b'abcdef']
    >>> do_OP_SIZE(s)
    >>> print(s == [b'abcdef', b''])
    True
    >>> s = [b'abcdef'*1000]
    >>> do_OP_SIZE(s)
    >>> print(binascii.hexlify(s[-1]) == b'1770')
    True
     N/A N/A N/A stack append N/A int_to_script_bytes N/A len N/A stack N/A -1 N/A do_OP_INVERT N/A N/A stack N/A N/A N/A 
    >>> s = [h2b('5dcf39822aebc166')]
    >>> do_OP_INVERT(s)
    >>> print(binascii.hexlify(s[0]) == b'a230c67dd5143e99')
    True
     N/A v N/A N/A stack pop N/A N/A N/A stack append N/A bytes_from_ints N/A N/A s 255 N/A s N/A bytes_to_ints v N/A make_same_size N/A N/A v1 v2 N/A N/A N/A larger N/A max N/A len v1 N/A len v2 N/A nulls N/A larger N/A v1 N/A N/A v1 nulls N/A larger N/A v2 N/A N/A v2 nulls N/A larger N/A N/A v1 v2 N/A make_bitwise_bin_op N/A N/A binop N/A N/A N/A 
    >>> s = [h2b('5dcf39832aebc166'), h2b('ff00f086') ]
    >>> do_OP_AND(s)
    >>> print(binascii.hexlify(s[0]) == b'5d00308200000000')
    True
    >>> s = [h2b('5dcf39832aebc166'), h2b('ff00f086') ]
    >>> do_OP_OR(s)
    >>> print(binascii.hexlify(s[0]) == b'ffcff9872aebc166')
    True
    >>> s = [h2b('5dcf39832aebc166'), h2b('ff00f086') ]
    >>> do_OP_XOR(s)
    >>> print(binascii.hexlify(s[0]) == b'a2cfc9052aebc166')
    True
    >>> s = []
     f N/A N/A stack N/A N/A N/A v1 N/A N/A stack pop N/A v2 N/A N/A stack pop N/A N/A v1 v2 N/A make_same_size v1 v2 N/A N/A N/A stack append N/A bytes_from_ints N/A N/A binop c1 c2 N/A N/A c1 c2 N/A zip N/A bytes_to_ints v1 N/A bytes_to_ints v2 N/A N/A f N/A N/A do_OP_AND N/A make_bitwise_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_OR N/A make_bitwise_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_XOR N/A make_bitwise_bin_op N/A N/A N/A x y N/A N/A x y do_OP_EQUAL N/A N/A stack N/A N/A N/A 
    >>> s = [b'string1', b'string1']
    >>> do_OP_EQUAL(s)
    >>> print(s == [VCH_TRUE])
    True
    >>> s = [b'string1', b'string2']
    >>> do_OP_EQUAL(s)
    >>> print(s == [VCH_FALSE])
    True
     N/A N/A v1 v2 N/A N/A N/A stack pop N/A i N/A range 2 N/A N/A N/A stack append N/A bool_to_script_bytes N/A v1 v2 N/A N/A do_OP_EQUALVERIFY do_OP_EQUAL pop_check_bounds N/A N/A stack require_minimal N/A N/A N/A v N/A N/A stack pop N/A N/A N/A len v 4 N/A N/A N/A ScriptError overflow in binop N/A N/A int_from_script_bytes v require_minimal require_minimal N/A make_bin_op N/A N/A binop N/A N/A f N/A N/A stack require_minimal N/A N/A N/A N/A v1 v2 N/A N/A pop_check_bounds stack require_minimal N/A i N/A range 2 N/A N/A N/A stack append N/A int_to_script_bytes N/A binop v2 v1 N/A N/A f N/A make_bool_bin_op N/A N/A binop N/A N/A f N/A N/A stack require_minimal N/A N/A N/A N/A v1 v2 N/A N/A pop_check_bounds stack require_minimal N/A i N/A range 2 N/A N/A N/A stack append N/A bool_to_script_bytes N/A binop v2 v1 N/A N/A f N/A N/A do_OP_ADD N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_SUB N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_MUL N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_DIV N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_MOD N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_LSHIFT N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_RSHIFT N/A make_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_BOOLAND N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_BOOLOR N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_NUMEQUAL N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_NUMEQUALVERIFY N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_NUMNOTEQUAL N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_LESSTHAN N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_GREATERTHAN N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_LESSTHANOREQUAL N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_GREATERTHANOREQUAL N/A make_bool_bin_op N/A N/A N/A x y N/A N/A x y N/A do_OP_MIN N/A make_bin_op min N/A do_OP_MAX N/A make_bin_op max do_OP_WITHIN N/A N/A stack require_minimal N/A N/A N/A 
    >>> s = [b'c', b'b', b'a']
    >>> do_OP_WITHIN(s)
    >>> print(s == [VCH_TRUE])
    True
    >>> s = [b'b', b'c', b'a']
    >>> do_OP_WITHIN(s)
    >>> print(s == [VCH_FALSE])
    True
     N/A N/A v3 v2 v1 N/A N/A int_from_script_bytes N/A N/A stack pop require_minimal require_minimal N/A i N/A range 3 N/A ok N/A v2 v1 v3 N/A N/A N/A stack append N/A bool_to_script_bytes ok N/A do_OP_RIPEMD160 N/A N/A stack N/A N/A N/A 
    >>> s = [b'foo']
    >>> do_OP_RIPEMD160(s)
    >>> print(s == [bytearray([66, 207, 162, 17, 1, 142, 164, 146, 253, 238, 69, 172, 99, 123, 121, 114, 160, 173, 104, 115])])
    True
     N/A N/A N/A stack append N/A N/A N/A ripemd160 N/A N/A stack pop digest N/A do_OP_SHA1 N/A N/A stack N/A N/A N/A 
    >>> s = [b'foo']
    >>> do_OP_SHA1(s)
    >>> print(s == [bytearray([11, 238, 199, 181, 234, 63, 15, 219, 201, 93, 13, 212, 127, 60, 91, 194, 117, 218, 138, 51])])
    True
     N/A N/A N/A stack append N/A N/A N/A N/A hashlib sha1 N/A N/A stack pop digest N/A do_OP_SHA256 N/A N/A stack N/A N/A N/A 
    >>> s = [b'foo']
    >>> do_OP_SHA256(s)
    >>> print(s == [bytearray([44, 38, 180, 107, 104, 255, 198, 143, 249, 155, 69, 60, 29, 48, 65, 52, 19, 66, 45, 112, 100, 131, 191, 160, 249, 138, 94, 136, 98, 102, 231, 174])])
    True
     N/A N/A N/A stack append N/A N/A N/A N/A hashlib sha256 N/A N/A stack pop digest N/A do_OP_HASH160 N/A N/A stack N/A N/A N/A 
    >>> s = [b'foo']
    >>> do_OP_HASH160(s)
    >>> print(s == [bytearray([225, 207, 124, 129, 3, 71, 107, 109, 127, 233, 228, 151, 154, 161, 14, 124, 83, 31, 207, 66])])
    True
     N/A N/A N/A stack append N/A hash160 N/A N/A stack pop N/A do_OP_HASH256 N/A N/A stack N/A N/A N/A 
    >>> s = [b'foo']
    >>> do_OP_HASH256(s)
    >>> print(s == [bytearray([199, 173, 232, 143, 199, 162, 20, 152, 166, 165, 229, 195, 133, 225, 246, 139, 237, 130, 43, 114, 170, 99, 196, 169, 164, 138, 2, 194, 70, 110, 226, 158])])
    True
     N/A N/A N/A stack append N/A double_sha256 N/A N/A stack pop N/A make_unary_num_op N/A N/A unary_f N/A N/A f N/A N/A stack require_minimal N/A N/A N/A N/A N/A stack append N/A int_to_script_bytes N/A unary_f N/A pop_check_bounds stack require_minimal N/A N/A f N/A N/A do_OP_1ADD N/A make_unary_num_op N/A N/A N/A x N/A N/A x 1 N/A do_OP_1SUB N/A make_unary_num_op N/A N/A N/A x N/A N/A x 1 N/A do_OP_2MUL N/A make_unary_num_op N/A N/A N/A x N/A N/A x 1 N/A do_OP_2DIV N/A make_unary_num_op N/A N/A N/A x N/A N/A x 1 N/A do_OP_NEGATE N/A make_unary_num_op N/A N/A N/A x N/A N/A x N/A do_OP_ABS N/A make_unary_num_op N/A N/A N/A x N/A N/A abs x do_OP_NOT N/A N/A stack require_minimal N/A N/A N/A N/A N/A stack append N/A bool_to_script_bytes N/A N/A pop_check_bounds stack require_minimal N/A do_OP_0NOTEQUAL N/A N/A stack require_minimal N/A N/A N/A N/A N/A stack append N/A int_to_script_bytes N/A bool_from_script_bytes N/A N/A stack pop require_minimal require_minimal N/A build_ops_lookup N/A N/A N/A N/A N/A d N/A N/A the_globals N/A globals N/A N/A opcode_name opcode_int N/A N/A OPCODE_TO_INT items N/A N/A do_f_name N/A do_%s opcode_name N/A N/A do_f_name the_globals N/A N/A f N/A the_globals N/A do_f_name N/A N/A f require_minimal N/A N/A len N/A N/A N/A inspect getargspec f args 1 N/A N/A d N/A opcode_int f N/A d N/A N/A MICROCODE_LOOKUP N/A build_ops_lookup N/A N/A __name__ __main__ N/A N/A doctest N/A N/A N/A doctest testmod