Skip to content

generateNEARStealthAddress()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / generateNEARStealthAddress

generateNEARStealthAddress(recipientMetaAddress): NEARStealthAddressResult

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

Generate a one-time stealth address for a NEAR recipient

The sender uses this to create a fresh address that only the recipient can detect and spend from.

Recipient’s stealth meta-address

string | StealthMetaAddress

NEARStealthAddressResult

Stealth address, shared secret, and NEAR implicit account ID

// Sender creates stealth address for recipient
const { stealthAddress, implicitAccountId } =
generateNEARStealthAddress(recipientMetaAddress)
// Send NEAR/tokens to implicitAccountId
await nearConnection.sendMoney(implicitAccountId, amount)
// Include announcement in memo for recipient to scan