import { SchemeNetworkFacilitator, PaymentPayload, PaymentRequirements, VerifyResponse, SettleResponse } from '@x402/core/types'; import { a as X402xFacilitatorEvmSigner } from './signer-Clo2kGD1.mjs'; interface ExactX402xEvmFacilitatorConfig { /** * 当 PaymentRequirements.extra.name/version 缺失时,是否链上读取 token eip712 domain * * @default true */ resolveDomainFromChain?: boolean; } /** * x402x EVM facilitator implementation for x402 "exact" scheme. * * - 支持 EIP-3009 transferWithAuthorization * - 支持 EIP-2612 Permit(配合 7702 合约 settleWithPermit) * - 支持 payTo 合约的 settleWithERC3009 / settleWithPermit,并 fallback 到 token 原生方法 */ declare class ExactX402xEvmFacilitator implements SchemeNetworkFacilitator { private readonly signer; readonly scheme: "exact:eip7702"; readonly caipFamily = "eip155:*"; private readonly resolveDomainFromChain; /** * Creates a new ExactX402xEvmFacilitator instance. * * @param signer - The EVM signer for facilitator operations * @param config - Optional configuration for the facilitator */ constructor(signer: X402xFacilitatorEvmSigner, config?: ExactX402xEvmFacilitatorConfig); /** * Returns the extra data for the supported kinds endpoint. * * @param _ - The network * @returns The extra data */ getExtra(_: string): Record | undefined; /** * Returns the signers for the supported kinds endpoint. * * @param _ - The network * @returns The signers */ getSigners(_: string): string[]; /** * Verifies a payment payload against requirements. * * @param payload - The payment payload * @param requirements - The payment requirements * @returns The verification response */ verify(payload: PaymentPayload, requirements: PaymentRequirements): Promise; /** * Settles a payment payload. * * @param payload - The payment payload * @param requirements - The payment requirements * @returns The settle response */ settle(payload: PaymentPayload, requirements: PaymentRequirements): Promise; /** * Extract payer address from payload based on permitType. * * @param p - The scheme payload * @param permitType - The resolved permit type * @returns Payer address or empty string if unknown */ private getPayer; /** * Type guard for Permit payload. * * @param p - The scheme payload * @returns True if payload.authorization matches Permit shape */ private isPermitPayload; /** * Type guard for EIP-3009 payload. * * @param p - The scheme payload * @returns True if payload.authorization matches EIP-3009 shape */ private isEip3009Payload; /** * Verify permit authorization payload. * * @param p - The permit payload * @param requirements - The payment requirements * @returns The verification response */ private verifyPermit; /** * Verifies a EIP-3009 authorization. * * @param p - The EIP-3009 authorization * @param requirements - The payment requirements * @returns The verification response */ private verifyEip3009; /** * Settles a EIP-3009 authorization. * * @param p - The EIP-3009 authorization * @param payload - The payment payload * @param requirements - The payment requirements * @returns The settle response */ private settlePermit; /** * Settles a EIP-2612 Permit authorization. * * @param p - The EIP-2612 Permit authorization * @param payload - The payment payload * @param requirements - The payment requirements * @returns The settle response */ private settleEip3009; /** * Checks if a contract supports an interface. * * @param address - The contract address * @param interfaceId - The interface ID * @returns True if the contract supports the interface, false otherwise */ private safeSupportsInterface; /** * Gets the EIP-712 domain for a token. * * @param requirements - The payment requirements * @param token - The token address * @returns The EIP-712 domain */ private getDomain; } export { ExactX402xEvmFacilitator as E, type ExactX402xEvmFacilitatorConfig as a };