/** * x402.ts — x402_pay tool. * * Fetches a URL, automatically handling 402 Payment Required responses * by paying with the Agent Wallet and retrying the request. * * v1.1.0: Auto-session detection. If an active x402 V2 session covers the * requested URL, session headers are injected and no new payment is made. * Pass skip_session_check=true to skip x402 V2 session reuse and take the * payment path. Identical paid retries still replay from the spend-intent * cache; use a new idempotencyKey for a second settlement. */ import { z } from 'zod'; export declare const X402PaySchema: z.ZodObject<{ url: z.ZodPipe; method: z.ZodDefault>>; headers: z.ZodOptional>; body: z.ZodOptional; max_payment_eth: z.ZodOptional; timeout_ms: z.ZodDefault>; skip_session_check: z.ZodDefault>; idempotencyKey: z.ZodOptional; }, z.core.$strip>; export type X402PayInput = z.infer; export declare const x402PayTool: { name: string; description: string; inputSchema: { type: "object"; properties: { url: { type: string; description: string; }; method: { type: string; enum: string[]; description: string; default: string; }; headers: { type: string; additionalProperties: { type: string; }; description: string; }; body: { type: string; description: string; }; max_payment_eth: { type: string; description: string; }; timeout_ms: { type: string; description: string; default: number; }; skip_session_check: { type: string; description: string; default: boolean; }; idempotencyKey: { description: string; type: "string"; minLength: number; maxLength: number; pattern: string; }; }; required: string[]; }; }; export declare function handleX402Pay(input: X402PayInput): Promise<{ content: Array<{ type: 'text'; text: string; }>; isError?: boolean; }>; //# sourceMappingURL=x402.d.ts.map