import type { FetchLike, Tool } from '@modelcontextprotocol/client'; import { type SignerWallet, type PaymentRequiredAccept, type SchemePreference } from './signer.js'; export interface X402PaymentCache { signature: string | null; } export interface X402FetchMiddlewareOptions { wallet: SignerWallet; getToolByName?: (name: string) => Tool | undefined; paymentCache: X402PaymentCache; schemePreference?: SchemePreference; } export declare function createX402FetchMiddleware(baseFetch: FetchLike, options: X402FetchMiddlewareOptions): FetchLike; export declare function extractAcceptFromPaymentRequired(data: unknown, schemePreference?: SchemePreference): { accept: PaymentRequiredAccept; resource?: { url?: string; description?: string; mimeType?: string; }; } | undefined; export declare function extractPaymentRequiredFromResult(result: unknown): Record | undefined; //# sourceMappingURL=fetch-middleware.d.ts.map