Skip to content

computeNEARViewingKeyHash()

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / computeNEARViewingKeyHash

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

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:19061

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