export { E as ExactEvmScheme, 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, h as x402ExactPermit2ProxyABI, x as x402ExactPermit2ProxyAddress, b as x402UptoPermit2ProxyAddress } from './permit2-DHAq6FTe.js';
export { C as ClientEvmSigner, F as FacilitatorEvmSigner, t as toClientEvmSigner, a as toFacilitatorEvmSigner } from './signer-DC81R8wQ.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;

export { type AssetTransferMethod, type ExactEIP3009Payload, type ExactEvmPayloadV1, type ExactEvmPayloadV2, type ExactPermit2Payload, type Permit2Authorization, type Permit2Witness, isEIP3009Payload, isPermit2Payload };
