checkNEARStealthAddress()
SIP Protocol API Reference v0.15.1
SIP Protocol API Reference / checkNEARStealthAddress
Function: checkNEARStealthAddress()
Section titled “Function: checkNEARStealthAddress()”checkNEARStealthAddress(
stealthAddress,viewingPrivateKey,spendingPublicKey):boolean
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:18535
Check if a NEAR stealth address was intended for this recipient
Canonical EIP-5564 view-only check: requires only the recipient’s viewing private key plus their spending PUBLIC key (no spending private key needed).
Parameters
Section titled “Parameters”stealthAddress
Section titled “stealthAddress”The stealth address to check
viewingPrivateKey
Section titled “viewingPrivateKey”`0x${string}`
Recipient’s viewing private key
spendingPublicKey
Section titled “spendingPublicKey”`0x${string}`
Recipient’s spending public key (meta-address spendingKey)
Returns
Section titled “Returns”boolean
True if the address belongs to this recipient
Example
Section titled “Example”// Check if a detected address is for usconst isForMe = checkNEARStealthAddress( announcement.stealthAddress, myViewingPrivateKey, mySpendingPublicKey)
if (isForMe) { // Derive private key and claim funds}