import { Route, RouteOptions, Step, Token } from '@lifi/types'; import BigNumber from 'bignumber.js'; import { Signer } from 'ethers'; import { ChainId } from '.'; import { StatusManager } from '../execution/StatusManager'; import { StepExecutor } from '../execution/StepExecutor'; export interface TokenWithAmounts extends Token { amount?: BigNumber; amountRendered?: string; } export declare type ParsedReceipt = { fromAmount?: string; toAmount: string; gasUsed: string; gasPrice: string; gasFee: string; toTokenAddress?: string; }; interface ExecutionParams { signer: Signer; step: Step; statusManager: StatusManager; settings: InternalExecutionSettings; } export interface ExecuteSwapParams extends ExecutionParams { step: Step; } export interface ExecuteCrossParams extends ExecutionParams { step: Step; } export declare type CallbackFunction = (updatedRoute: Route) => void; export declare type Config = { apiUrl: string; rpcs: Record; multicallAddresses: Record; defaultExecutionSettings: InternalExecutionSettings; defaultRouteOptions: RouteOptions; }; export declare type ConfigUpdate = { apiUrl?: string; rpcs?: Record; multicallAddresses?: Record; defaultExecutionSettings?: ExecutionSettings; defaultRouteOptions?: RouteOptions; }; export declare type SwitchChainHook = (requiredChainId: number) => Promise; export interface AcceptSlippageUpdateHookParams { toToken: Token; oldToAmount: string; newToAmount: string; oldSlippage: number; newSlippage: number; } export declare type AcceptSlippageUpdateHook = (params: AcceptSlippageUpdateHookParams) => Promise; export interface ExecutionData { route: Route; executors: StepExecutor[]; settings: InternalExecutionSettings; } export interface ExecutionSettings { updateCallback?: CallbackFunction; switchChainHook?: SwitchChainHook; acceptSlippageUpdateHook?: AcceptSlippageUpdateHook; infiniteApproval?: boolean; } export interface InternalExecutionSettings extends ExecutionSettings { updateCallback: CallbackFunction; switchChainHook: SwitchChainHook; acceptSlippageUpdateHook: AcceptSlippageUpdateHook; infiniteApproval: boolean; } export declare type EnforcedObjectProperties = T & { [P in keyof T]-?: T[P]; }; export interface ActiveRouteDictionary { [k: string]: ExecutionData; } export declare type RevokeTokenData = { token: Token; approvalAddress: string; }; export interface HaltingSettings { allowUpdates?: boolean; } export {};