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)
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))
def to_pay_script_hash_pattern(hash): obj = lib.bc_script__to_pay_script_hash_pattern(hash._obj) return list(OperationList(obj))
def is_sign_script_hash_pattern(ops): ops = OperationList.from_list(ops) return lib.bc_script__is_sign_script_hash_pattern(ops._obj) == 1
def to_null_data_pattern(data): data = DataChunk(data) obj = lib.bc_script__to_null_data_pattern(data._obj) return list(OperationList(obj))
def is_pay_multisig_pattern(ops): ops = OperationList.from_list(ops) return lib.bc_script__is_pay_multisig_pattern(ops._obj) == 1
def is_pay_public_key_pattern(ops): ops = OperationList.from_list(ops) return lib.bc_script__is_pay_public_key_pattern(ops._obj) == 1
def is_null_data_pattern(ops): ops = OperationList.from_list(ops) return lib.bc_script__is_null_data_pattern(ops._obj) == 1
def is_coinbase_pattern(ops, height): ops = OperationList.from_list(ops) return lib.bc_script__is_coinbase_pattern(ops._obj, height) == 1
def is_relaxed_push(ops): ops = OperationList.from_list(ops) return lib.bc_script__is_relaxed_push(ops._obj) == 1
def is_push_only(ops): ops = OperationList.from_list(ops) return lib.bc_script__is_push_only(ops._obj) == 1
def operations(self): obj = lib.bc_script__operations(self._obj) return list(OperationList(obj))