import { UniversalRouterVersion } from './constants'; import { AcrossV4DepositV3Params } from '../entities/actions/across'; /** * CommandTypes * @description Flags that modify a command's execution * @enum {number} */ export declare enum CommandType { V3_SWAP_EXACT_IN = 0, V3_SWAP_EXACT_OUT = 1, PERMIT2_TRANSFER_FROM = 2, PERMIT2_PERMIT_BATCH = 3, SWEEP = 4, TRANSFER = 5, PAY_PORTION = 6, PAY_PORTION_FULL_PRECISION = 7, V2_SWAP_EXACT_IN = 8, V2_SWAP_EXACT_OUT = 9, PERMIT2_PERMIT = 10, WRAP_ETH = 11, UNWRAP_WETH = 12, PERMIT2_TRANSFER_FROM_BATCH = 13, BALANCE_CHECK_ERC20 = 14, V4_SWAP = 16, V3_POSITION_MANAGER_PERMIT = 17, V3_POSITION_MANAGER_CALL = 18, V4_INITIALIZE_POOL = 19, V4_POSITION_MANAGER_CALL = 20, EXECUTE_SUB_PLAN = 33, ACROSS_V4_DEPOSIT_V3 = 64 } export declare enum Subparser { V3PathExactIn = 0, V3PathExactOut = 1 } export declare enum Parser { Abi = 0, V4Actions = 1, V3Actions = 2 } export type ParamType = { readonly name: string; readonly type: string; readonly subparser?: Subparser; }; export type CommandDefinition = { parser: Parser.Abi; params: ParamType[]; } | { parser: Parser.V4Actions; } | { parser: Parser.V3Actions; }; export declare const COMMAND_DEFINITION: { [key in CommandType]: CommandDefinition; }; export declare const V2V3_SWAP_COMMANDS_V2_1_1: { [key: number]: CommandDefinition; }; export declare class RoutePlanner { commands: string; inputs: string[]; constructor(); addSubPlan(subplan: RoutePlanner): RoutePlanner; addCommand(type: CommandType, parameters: any[], allowRevert?: boolean, urVersion?: UniversalRouterVersion): RoutePlanner; /** * Add Across bridge deposit command for cross-chain bridging * @param params AcrossV4DepositV3Params containing bridge parameters * @returns RoutePlanner instance for chaining */ addAcrossBridge(params: AcrossV4DepositV3Params): RoutePlanner; } export type RouterCommand = { type: CommandType; encodedInput: string; }; export declare function createCommand(type: CommandType, parameters: any[], urVersion?: UniversalRouterVersion): RouterCommand;