Skip to content

scanForPayments()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / 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.

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}`)
}