Beispiel #1
0
 def hash(self, sighash_type=None):
     if sighash_type is None:
         obj = lib.bc_transaction__hash(self._obj)
     else:
         obj = lib.bc_transaction__hash_Sighash(self._obj,
                                                sighash_type.value)
     return HashDigest(obj)
Beispiel #2
0
def extract_ephemeral_key_Hash(script):
    out_unsigned_ephemeral_key = HashDigest()
    if lib.bc_extract_ephemeral_key_Hash(out_unsigned_ephemeral_key._obj,
                                         script._obj) != 1:
        return None
    return out_unsigned_ephemeral_key
Beispiel #3
0
 def generate_signature_hash(tx, input_index, script_code, sighash_type):
     obj = lib.bc_script__generate_signature_hash(tx._obj, input_index,
                                                  script_code._obj,
                                                  sighash_type.value)
     return HashDigest(obj)
Beispiel #4
0
 def hash(self):
     obj = lib.bc_point__hash(self._obj)
     return HashDigest(obj)
Beispiel #5
0
 def hash(self):
     obj = lib.bc_header__hash(self._obj)
     return HashDigest(obj)
Beispiel #6
0
 def merkle(self):
     obj = lib.bc_header__merkle(self._obj)
     return HashDigest(obj)
Beispiel #7
0
 def previous_block_hash(self):
     obj = lib.bc_header__previous_block_hash(self._obj)
     return HashDigest(obj)