Example #1
0
 def claim_id(self) -> str:
     if self.script.is_claim_name:
         claim_id = hash160(self.tx_ref.hash + struct.pack('>I', self.position))
     elif self.script.is_update_claim or self.script.is_support_claim:
         claim_id = self.script.values['claim_id']
     else:
         raise ValueError('No claim_id associated.')
     return hexlify(claim_id[::-1]).decode()
Example #2
0
 def identifier(self):
     """ Return the key's identifier as 20 bytes. """
     return hash160(self.pubkey_bytes)
Example #3
0
 def public_key_to_address(cls, public_key):
     return cls.hash160_to_address(hash160(public_key))
Example #4
0
 def public_key_to_address(self, public_key):
     return self.hash160_to_address(hash160(public_key))