/** * @fileoverview chainweb_read_table - read a single Pact table row via /local. * * Thin wrapper over the `/local` preflight machinery that executes * `(read . "")` * with a tight zod validator on the table and key arguments (no string * escaping shenanigans — the key must be a safe literal). * * Returns `{ row, keyFound, gasUsed, chainId }` with the row auto-unwrapped * through {@link unwrapPactValue}. A missing key surfaces as * `keyFound: false, row: null` — callers do NOT need to pattern-match * "row not found" error strings. */ import { z } from 'zod'; import type { ChainwebClient } from '../client/fetch.js'; import type { PactValue } from '../client/unwrap.js'; export declare const ReadTableInputShape: { chainId: z.ZodString; module: z.ZodString; table: z.ZodString; key: z.ZodString; }; export declare const ReadTableInputSchema: z.ZodObject<{ chainId: z.ZodString; module: z.ZodString; table: z.ZodString; key: z.ZodString; }, z.core.$strip>; export interface ReadTableResult { row: PactValue; keyFound: boolean; gasUsed: number; chainId: string; /** True iff the row JSON exceeded the 1MB safety cap and was truncated. */ truncated: boolean; } export interface ReadTableToolConfig { client: ChainwebClient; defaultSender?: string; gasPrice?: number; } export declare function createReadTableTool(config: ReadTableToolConfig): (args: unknown) => Promise<{ content: ReadTableResult[]; }>; //# sourceMappingURL=read-table.d.ts.map