示例#1
0
 def multisig_script(cls, public_keys, m):
     n = len(public_keys)
     assert n <= 15
     assert m <= n
     op_m = format(opcodes.OP_1 + m - 1, 'x')
     op_n = format(opcodes.OP_1 + n - 1, 'x')
     keylist = [op_push(len(k) / 2) + k for k in public_keys]
     return op_m + ''.join(keylist) + op_n + 'ae'
示例#2
0
def push_script(x):
    return op_push(len(x) / 2) + x