circle-checkcheck_has_key

Check if an address has a registered viewing key

Public, read-only queries against the Directory contract. No authentication required — works with a standard Web3 instance.

Signatures

# check_has_key
def check_has_key(w3: Web3, address: ChecksumAddress) -> bool
async def async_check_has_key(w3: AsyncWeb3, address: ChecksumAddress) -> bool

# get_key_hash
def get_key_hash(w3: Web3, address: ChecksumAddress) -> bytes
async def async_get_key_hash(w3: AsyncWeb3, address: ChecksumAddress) -> bytes

Parameters

Parameter
Type
Description

w3

Web3 / AsyncWeb3

Standard Web3 instance (no Seismic namespace required)

address

ChecksumAddress

Address to query

Returns

  • check_has_keyTrue if the address has a registered viewing key

  • get_key_hash — 32-byte keccak256 hash of the viewing key (zero bytes if no key registered)

Example

Notes

  • Both use plain eth_call — no gas cost, no encryption needed

  • The key hash is used as the 4th topic in SRC20 Transfer and Approval events for filtering

See Also

Last updated