/** * @fileoverview chainweb_poll - poll /poll endpoint for tx results. * * Uses /poll (NOT /listen) because nginx on devnet enforces a hard 60s * upstream timeout, and /listen holds the connection open (504 bug in user * memory). /poll is an idempotent "give me anything you have right now" * request we call repeatedly until the result appears or timeout. */ import { z } from 'zod'; import type { ChainwebClient } from '../client/fetch.js'; import { type PactValue } from '../client/unwrap.js'; export declare const PollInputShape: { chainId: z.ZodString; requestKeys: z.ZodArray; timeoutMs: z.ZodOptional; intervalMs: z.ZodOptional; }; export declare const PollInputSchema: z.ZodObject<{ chainId: z.ZodString; requestKeys: z.ZodArray; timeoutMs: z.ZodOptional; intervalMs: z.ZodOptional; }, z.core.$strip>; export interface PollResultEntry { requestKey: string; status: 'success' | 'failure' | 'pending'; result: PactValue; gasUsed: number; blockHeight: number; blockHash: string; } export interface PollResult { results: PollResultEntry[]; /** True iff all requestKeys yielded a terminal status within timeout. */ complete: boolean; } export interface PollToolConfig { client: ChainwebClient; /** Override sleep — used by tests to drive polling without real delays. */ sleep?: (ms: number) => Promise; } export declare function createPollTool(config: PollToolConfig): (args: unknown) => Promise<{ content: PollResult[]; }>; //# sourceMappingURL=poll.d.ts.map