processWebhookTransaction()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / processWebhookTransaction
Function: processWebhookTransaction()
Section titled “Function: processWebhookTransaction()”processWebhookTransaction(
transaction,viewingPrivateKey,spendingPublicKey):Promise<SolanaScanResult|null>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:16251
Process a single webhook transaction and check if it’s a payment for us
Lower-level function for custom webhook handling.
Parameters
Section titled “Parameters”transaction
Section titled “transaction”Raw Helius webhook transaction
viewingPrivateKey
Section titled “viewingPrivateKey”`0x${string}`
Recipient’s viewing private key
spendingPublicKey
Section titled “spendingPublicKey”`0x${string}`
Recipient’s spending public key
Returns
Section titled “Returns”Promise<SolanaScanResult | null>
Payment result if found, null otherwise
Example
Section titled “Example”const payment = await processWebhookTransaction( webhookPayload, viewingPrivateKey, spendingPublicKey)
if (payment) { console.log('Found payment:', payment.amount, payment.mint)}