import { IPortalApi } from '@portal-hq/utils' import { type ILifi, Lifi, type LifiOptions } from './Lifi' import { PortalLifiTradingApi } from './Lifi/PortalLifiTradingApi' import { type IZeroX, ZeroX, type ZeroXOptions } from './ZeroX' export interface TradingOptions { lifi?: Pick< LifiOptions, 'signAndSendTransaction' | 'waitForConfirmation' | 'evmRequestFn' > zeroX?: Pick } export class Trading { public readonly lifi: ILifi public readonly zeroX: IZeroX constructor(api: IPortalApi, options?: TradingOptions) { const lifiApi = new PortalLifiTradingApi({ api }) this.lifi = new Lifi({ api: lifiApi, ...options?.lifi, }) this.zeroX = new ZeroX({ api, ...options?.zeroX, }) } } export type { ILifi, LifiOptions, IPortalLifiTradingApi, PortalLifiTradingApiOptions, } from './Lifi' export type { IZeroX, ZeroXOptions } from './ZeroX'