generateNEARStealthAddress()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / generateNEARStealthAddress
Function: generateNEARStealthAddress()
Section titled “Function: 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.
Parameters
Section titled “Parameters”recipientMetaAddress
Section titled “recipientMetaAddress”Recipient’s stealth meta-address
string | StealthMetaAddress
Returns
Section titled “Returns”Stealth address, shared secret, and NEAR implicit account ID
Example
Section titled “Example”// Sender creates stealth address for recipientconst { stealthAddress, implicitAccountId } = generateNEARStealthAddress(recipientMetaAddress)
// Send NEAR/tokens to implicitAccountIdawait nearConnection.sendMoney(implicitAccountId, amount)
// Include announcement in memo for recipient to scan