Skip to content

scanForPayments()

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / scanForPayments

scanForPayments(params): Promise<SolanaScanResult[]>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15794

Scan for incoming stealth payments

Queries the Solana blockchain for transactions containing SIP announcements, then checks if any match the recipient’s viewing key.

SolanaScanParams

Scanning parameters

Promise<SolanaScanResult[]>

Array of detected payments

const payments = await scanForPayments({
connection,
viewingPrivateKey: '0x...',
spendingPublicKey: '0x...',
fromSlot: 250000000,
})
for (const payment of payments) {
console.log(`Found ${payment.amount} at ${payment.stealthAddress}`)
}