sendInteraction
sendInteraction(
client,params):Promise<void>
Defined in: actions/sendInteraction.ts:43
Send an interaction to the backend via the listener RPC. Fire-and-forget: errors are caught and logged, not thrown.
Parameters
Section titled “Parameters”client
Section titled “client”The Frak client instance
params
Section titled “params”The interaction parameters
Returns
Section titled “Returns”Promise<void>
Description
Section titled “Description”Sends a user interaction event through the wallet iframe RPC. Supports three interaction types: arrival tracking, sharing events, and custom interactions.
Examples
Section titled “Examples”Track a user arrival with referral attribution:
await sendInteraction(client, { type: "arrival", referrerWallet: "0x1234...abcd", landingUrl: window.location.href, utmSource: "twitter", utmMedium: "social", utmCampaign: "launch-2026",});Track a sharing event:
await sendInteraction(client, { type: "sharing" });Send a custom interaction:
await sendInteraction(client, { type: "custom", customType: "newsletter_signup", data: { email: "user@example.com" },});