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()
def identifier(self): """ Return the key's identifier as 20 bytes. """ return hash160(self.pubkey_bytes)
def public_key_to_address(cls, public_key): return cls.hash160_to_address(hash160(public_key))
def public_key_to_address(self, public_key): return self.hash160_to_address(hash160(public_key))