import type { ExecutorEncodingContext } from '../../executor/encoding-types'; import type { DexExchangeParam, DexParamInput, DirectParamInput, DirectParamResult, NeedWrapNativeInput, WethDepositWithdrawInput, WethDepositWithdrawResult } from './types'; export type MaybePromise = T | Promise; export type DexEncoderPort = { needWrapNative(input: NeedWrapNativeInput): MaybePromise; getDexParam(input: DexParamInput): MaybePromise; }; export type DirectDexEncoderPort = { getDirectParam(input: DirectParamInput): MaybePromise; }; export type DexEncoderLookup = { network: number; dexKey: string; }; export type DirectDexEncoderLookup = DexEncoderLookup & { contractMethod: DirectParamInput['contractMethod']; }; export type DexEncoderRegistryPort = { getDexEncoder(lookup: DexEncoderLookup): MaybePromise; getDirectDexEncoder(lookup: DirectDexEncoderLookup): MaybePromise; }; export type WethCallDataProviderPort = { getDepositWithdrawCallData(input: WethDepositWithdrawInput): MaybePromise; }; export type CreateWethCallDataProviderPort = (context: ExecutorEncodingContext) => WethCallDataProviderPort; export type CreateWethCallDataProvider = CreateWethCallDataProviderPort;