scanForPayments()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / scanForPayments
Function: scanForPayments()
Section titled “Function: scanForPayments()”scanForPayments(
params):Promise<SolanaScanResult[]>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15692
Scan for incoming stealth payments
Queries the Solana blockchain for transactions containing SIP announcements, then checks if any match the recipient’s viewing key.
Parameters
Section titled “Parameters”params
Section titled “params”Scanning parameters
Returns
Section titled “Returns”Promise<SolanaScanResult[]>
Array of detected payments
Example
Section titled “Example”const payments = await scanForPayments({ connection, viewingPrivateKey: '0x...', spendingPublicKey: '0x...', fromSlot: 250000000,})
for (const payment of payments) { console.log(`Found ${payment.amount} at ${payment.stealthAddress}`)}