interface Wallet {
    payInvoice(args: {
        invoice: string;
    }): Promise<{
        preimage: string;
    }>;
}

interface X402Requirements {
    scheme: string;
    network: string;
    extra: {
        invoice: string;
        paymentMethod?: string;
        [key: string]: unknown;
    };
    [key: string]: unknown;
}

/**
 * Probe a PAYMENT-REQUIRED header for a lightning-payable offer without
 * throwing. Returns the matching requirements, or null if the header has no
 * lightning entry (e.g. USDC-only endpoints) or is malformed. Used by the
 * top-level fetch402 dispatcher to decide whether to attempt payment or hand
 * the 402 back to the caller.
 */
declare const findX402LightningRequirements: (x402Header: string) => X402Requirements | null;
declare const fetchWithX402: (url: string, fetchArgs: RequestInit, options: {
    wallet: Wallet;
}) => Promise<Response>;

export { fetchWithX402, findX402LightningRequirements };
