npm @tinkerlandai/indiana-sdk@0.0.1 exports createFunnelOrchestrationClient. Use the App/environment backend Secret Key with sessions:create and funnels:run. Declare the event name and data fields in a Funnel wait node and publish. Hosts must verify business events and run ownership. Browsers cannot send receipts, and custom receipts cannot assert payment success.
Receipts may arrive before the wait node. Retry the same eventId and data; changed data conflicts. Each Run/wait node accepts one receipt; timeout or termination rejects new receipts. Conditions and tasks reference consumed results as nodeId.field. Unexecuted or unconsumed results remain absent.
import { createFunnelOrchestrationClient } from "@tinkerlandai/indiana-sdk/server"; const orchestration = createFunnelOrchestrationClient({ baseUrl: process.env.GROOVE_BASE_URL!, apiKey: process.env.GROOVE_SECRET_KEY!, scope: { projectId: process.env.GROOVE_PROJECT_ID!, environment: "sandbox" },});// Save eventId and this complete input with your verified business event.const receipt = await orchestration.signal({ runId: verifiedRunId, nodeId: "offer_receipt", eventName: "offer_used", eventId: retainedEventId, data: { used: true },});const { results } = await orchestration.readResults(verifiedRunId);// accepted acknowledges receipt; results appear only after node consumption.