Exemple #1
0
 def from_ops(cls, ops):
     ops = [Script._convert(op) for op in ops]
     ops = OperationList.from_list(ops)
     obj = lib.bc_create_script_Ops(ops._obj)
     return cls(obj)
Exemple #2
0
 def to_pay_public_key_pattern(data):
     data = DataChunk(data)
     obj = lib.bc_script__to_pay_public_key_pattern(data._obj)
     return list(OperationList(obj))
Exemple #3
0
 def to_pay_script_hash_pattern(hash):
     obj = lib.bc_script__to_pay_script_hash_pattern(hash._obj)
     return list(OperationList(obj))
Exemple #4
0
 def is_sign_script_hash_pattern(ops):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_sign_script_hash_pattern(ops._obj) == 1
Exemple #5
0
 def to_null_data_pattern(data):
     data = DataChunk(data)
     obj = lib.bc_script__to_null_data_pattern(data._obj)
     return list(OperationList(obj))
Exemple #6
0
 def is_pay_multisig_pattern(ops):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_pay_multisig_pattern(ops._obj) == 1
Exemple #7
0
 def is_pay_public_key_pattern(ops):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_pay_public_key_pattern(ops._obj) == 1
Exemple #8
0
 def is_null_data_pattern(ops):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_null_data_pattern(ops._obj) == 1
Exemple #9
0
 def is_coinbase_pattern(ops, height):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_coinbase_pattern(ops._obj, height) == 1
Exemple #10
0
 def is_relaxed_push(ops):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_relaxed_push(ops._obj) == 1
Exemple #11
0
 def is_push_only(ops):
     ops = OperationList.from_list(ops)
     return lib.bc_script__is_push_only(ops._obj) == 1
Exemple #12
0
 def operations(self):
     obj = lib.bc_script__operations(self._obj)
     return list(OperationList(obj))