import { ChainId } from "../constants"; import { Theme } from "../theme"; import { ReactNode } from 'react'; import { TokenInfo } from "../constants"; export interface WidgetProps { provider?: any; tokenList?: TokenInfo[]; theme?: Theme; defaultTokenIn?: DefaultToken; defaultTokenOut?: DefaultToken; defaultSlippage?: string; integration: Integration; apiKey: string; onTxSubmit?: (txHash: string, data: any) => void; title?: string | ReactNode; onSourceTokenChange?: (token: TokenInfo) => void; onDestinationTokenChange?: (token: TokenInfo) => void; onError?: (e: any) => void; } export interface ConfigProps extends WidgetProps { defaultChainId?: number; useMarswapTokenList?: boolean; } export type DefaultToken = { [key: number]: string; }; export interface Integration { id: string; feeReceiver?: string; feeAmount?: string; } export type SwapType = 'SELL' | 'BUY'; export interface SwapState { sellTokenAddress?: string; buyTokenAddress?: string; inputAmount?: string; outputAmount?: string; type: SwapType; loading: boolean; isConfirming: boolean; } export interface AggregatorQuote { from?: string; to?: string; sellTokenAddress: string; buyTokenAddress: string; value: string; chainId: ChainId; price: string; minimumPrice: string; buyAmount: string; sellAmount: string; sources: AggregatorQuoteLiquiditySource[]; gasPrice: string; gas: string; estimatedGas: string; sellTokenToEthRate: string; buyTokenToEthRate: string; orderRoutes: AggregatorRoute[]; protocolFee: string; minimumProtocolFee: string; allowanceTarget?: string; orders?: AggregatorQuoteOrder[]; data?: string; priceDiffList?: AggregatorPriceDiff[]; estimatedPriceImpact: string | null; marswapFeeInEth?: string; } export interface AggregatorRoute { proportion: string; paths: string[][]; sourceName: string; isMultihop: boolean; } export interface AggregatorPriceDiff { diff: string; buyAmount: string; sellAmount: string; source: string; } export interface AggregatorQuoteOrder { type: number; makerToken: string; source: string; takerToken: string; takerAmount: string; sourcePathId: string; fillData: { router: string; tokenAddressPath?: string[]; stable?: boolean; }; fill: { input: string; output: string; adjustedOutput: string; gas: string; }; } export interface AggregatorQuoteLiquiditySource { name: string; proportion: string; intermediateToken?: string; hops?: string[]; } export interface AggregatorQuoteParams { sellToken: string; buyToken: string; sellAmount?: string; buyAmount?: string; slippagePercentage?: number; gasPrice?: string; buyTokenPercentageFee?: number; feeRecipient?: string; takerAddress?: string; skipValidation?: boolean; includedSources?: string; excludedSources?: string; alwaysUnmaskPancake?: boolean; buyTokenOrSellTokenHasFees?: boolean; chainId?: ChainId; } //# sourceMappingURL=types.d.ts.map