Skip to content

computeNEARViewingKeyHash()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / computeNEARViewingKeyHash

computeNEARViewingKeyHash(viewingPublicKey): `0x${string}`

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18725

Compute the viewing key hash from a public key

The hash is used for announcement matching on-chain. Recipients publish their viewing key hash, and senders include it in transaction announcements.

`0x${string}`

The viewing public key (32 bytes, hex)

`0x${string}`

The hash for announcement matching

const hash = computeNEARViewingKeyHash(viewingKey.publicKey)
// Use hash in transaction announcements