export { E as ExactEvmScheme } from './scheme-CXDF0D2A.js';
export { C as ClientEvmSigner, F as FacilitatorEvmSigner, t as toClientEvmSigner, a as toFacilitatorEvmSigner } from './signer-D912R4mq.js';
export { a as PERMIT2_ADDRESS, P as Permit2AllowanceParams, d as authorizationTypes, c as createPermit2ApprovalTx, f as eip3009ABI, e as erc20AllowanceAbi, g as getPermit2AllowanceReadParams, p as permit2WitnessTypes, u as uptoPermit2WitnessTypes, h as x402ExactPermit2ProxyABI, x as x402ExactPermit2ProxyAddress, i as x402UptoPermit2ProxyABI, b as x402UptoPermit2ProxyAddress } from './permit2-CyZxwngN.js';
export { UptoEvmScheme } from './upto/client/index.js';
import '@x402/core/types';

/**
 * Asset transfer methods for the exact EVM scheme.
 * - eip3009: Uses transferWithAuthorization (USDC, etc.) - recommended for compatible tokens
 * - permit2: Uses Permit2 + x402Permit2Proxy - universal fallback for any ERC-20
 */
type AssetTransferMethod = "eip3009" | "permit2";
/**
 * EIP-3009 payload for tokens with native transferWithAuthorization support.
 */
type ExactEIP3009Payload = {
    signature?: `0x${string}`;
    authorization: {
        from: `0x${string}`;
        to: `0x${string}`;
        value: string;
        validAfter: string;
        validBefore: string;
        nonce: `0x${string}`;
    };
};
/**
 * Permit2 witness data structure.
 * Matches the Witness struct in x402Permit2Proxy contract.
 * Note: Upper time bound is enforced by Permit2's `deadline` field, not a witness field.
 */
type Permit2Witness = {
    to: `0x${string}`;
    validAfter: string;
};
/**
 * Permit2 authorization parameters.
 * Used to reconstruct the signed message for verification.
 */
type Permit2Authorization = {
    permitted: {
        token: `0x${string}`;
        amount: string;
    };
    spender: `0x${string}`;
    nonce: string;
    deadline: string;
    witness: Permit2Witness;
};
/**
 * Permit2 payload for tokens using the Permit2 + x402Permit2Proxy flow.
 */
type ExactPermit2Payload = {
    signature: `0x${string}`;
    permit2Authorization: Permit2Authorization & {
        from: `0x${string}`;
    };
};
type ExactEvmPayloadV1 = ExactEIP3009Payload;
type ExactEvmPayloadV2 = ExactEIP3009Payload | ExactPermit2Payload;
/**
 * Type guard to check if a payload is a Permit2 payload.
 * Permit2 payloads have a `permit2Authorization` field.
 *
 * @param payload - The payload to check.
 * @returns True if the payload is a Permit2 payload, false otherwise.
 */
declare function isPermit2Payload(payload: ExactEvmPayloadV2): payload is ExactPermit2Payload;
/**
 * Type guard to check if a payload is an EIP-3009 payload.
 * EIP-3009 payloads have an `authorization` field.
 *
 * @param payload - The payload to check.
 * @returns True if the payload is an EIP-3009 payload, false otherwise.
 */
declare function isEIP3009Payload(payload: ExactEvmPayloadV2): payload is ExactEIP3009Payload;
/**
 * Upto Permit2 witness — includes `facilitator` field absent from exact witness.
 * Only the address matching `witness.facilitator` can call settle() on-chain.
 */
type UptoPermit2Witness = {
    to: `0x${string}`;
    facilitator: `0x${string}`;
    validAfter: string;
};
type UptoPermit2Authorization = {
    permitted: {
        token: `0x${string}`;
        amount: string;
    };
    spender: `0x${string}`;
    nonce: string;
    deadline: string;
    witness: UptoPermit2Witness;
};
type UptoPermit2Payload = {
    signature: `0x${string}`;
    permit2Authorization: UptoPermit2Authorization & {
        from: `0x${string}`;
    };
};
/**
 * Type guard to check if a payload is an upto Permit2 payload.
 * Validates structural presence of all required fields: signature, permit2Authorization
 * (with from, permitted, spender, nonce, deadline), and a witness containing facilitator.
 *
 * @param payload - The payload to check
 * @returns True if the payload is an upto Permit2 payload, false otherwise
 */
declare function isUptoPermit2Payload(payload: Record<string, unknown>): payload is UptoPermit2Payload;

export { type AssetTransferMethod, type ExactEIP3009Payload, type ExactEvmPayloadV1, type ExactEvmPayloadV2, type ExactPermit2Payload, type Permit2Authorization, type Permit2Witness, type UptoPermit2Authorization, type UptoPermit2Payload, type UptoPermit2Witness, isEIP3009Payload, isPermit2Payload, isUptoPermit2Payload };
