import { type Address, type Hash, type Hex } from "viem"; import type { IDeploymentService } from "../deploymentService/index.js"; import type { PluginPrefetchData } from "../../plugins/types.js"; import type { ProviderService } from "../providerService/index.js"; import { type CowSwapOrderUid, type CowSwapTypedDataRequest } from "./cowSwapHelpers.js"; import type { TransactionPlanTransactionRequest } from "./execute.js"; import type { CowSwapPlanItem, TransactionPlan, TransactionPlanItem } from "./executionServiceTypes.js"; export type CowSwapPermitCancellation = { type: "evcPermitNonce"; chainId: number; owner: Address; evcAddress: Address; addressPrefix: Hex; nonceNamespace: bigint; nonce: bigint; nextNonce: bigint; wrapperAddress: Address; }; export type CowSwapPlanItemExecutionResult = { item: CowSwapPlanItem; orderUid?: CowSwapOrderUid; hashes?: Hash[]; permitCancellation?: CowSwapPermitCancellation; }; export type CowSwapTransactionPlanExecutionStatus = "approval" | "prepareInbox" | "signPermit" | "signOrder" | "submitOrder" | "cancelPermit" | "completed"; export type CowSwapTransactionPlanExecutionProgress = { completed: number; total: number; item?: TransactionPlanItem; status?: CowSwapTransactionPlanExecutionStatus; orderUid?: CowSwapOrderUid; hash?: Hash; }; export type ExecuteCowSwapTransactionPlanArgs = { plan: TransactionPlan; chainId: number; account: Address; sendTransaction: (parameters: TransactionPlanTransactionRequest) => Promise; signTypedData: (parameters: CowSwapTypedDataRequest) => Promise; /** Optional plugin prefetch payload to skip per-plugin network I/O. */ prefetch?: PluginPrefetchData; onProgress?: (progress: CowSwapTransactionPlanExecutionProgress) => void; }; type ExecuteCowSwapTransactionPlanInternalArgs = ExecuteCowSwapTransactionPlanArgs & { deploymentService: IDeploymentService; providerService: ProviderService; }; export type CowSwapTransactionPlanExecutionResult = { plan: TransactionPlan; orderUids: CowSwapOrderUid[]; hashes: Hash[]; results: CowSwapPlanItemExecutionResult[]; }; export declare function executeCowSwapTransactionPlan(args: ExecuteCowSwapTransactionPlanInternalArgs): Promise; export {}; //# sourceMappingURL=cowExecutor.d.ts.map