sendPrivateSPLTransfer()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / sendPrivateSPLTransfer
Function: sendPrivateSPLTransfer()
Section titled “Function: sendPrivateSPLTransfer()”sendPrivateSPLTransfer(
params):Promise<SolanaPrivateTransferResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15644
Send SPL tokens privately to a stealth address
This function:
- Generates a one-time stealth address from recipient’s meta-address
- Creates/gets Associated Token Account for the stealth address
- Transfers tokens to the stealth address
- Adds memo with ephemeral key for recipient scanning
Parameters
Section titled “Parameters”params
Section titled “params”Transfer parameters
Returns
Section titled “Returns”Promise<SolanaPrivateTransferResult>
Transfer result with stealth address and explorer URL
Example
Section titled “Example”import { sendPrivateSPLTransfer } from '@sip-protocol/sdk'
const result = await sendPrivateSPLTransfer({ connection, sender: wallet.publicKey, senderTokenAccount: senderATA, recipientMetaAddress: { chain: 'solana', spendingKey: '0x...', viewingKey: '0x...', }, mint: new PublicKey('EPjFWdd5...'), // USDC amount: 5_000_000n, // 5 USDC (6 decimals) signTransaction: wallet.signTransaction,})
console.log('Sent to:', result.stealthAddress)console.log('View on Solscan:', result.explorerUrl)