import { Client } from '@chainify/client'; import { EvmChainProvider, EvmTypes } from '@chainify/evm'; import { Transaction } from '@chainify/types'; import { ChainId } from '@liquality/cryptoassets'; import BN from 'bignumber.js'; import { ActionContext } from '../../store'; import { Network, SwapHistoryItem } from '../../store/types'; import { SwapProvider } from '../SwapProvider'; import { BaseSwapProviderConfig, EstimateFeeRequest, EstimateFeeResponse, NextSwapActionRequest, QuoteRequest, SwapRequest, SwapStatus } from '../types'; export interface OneinchSwapHistoryItem extends SwapHistoryItem { approveTxHash: string; swapTxHash: string; approveTx: Transaction; swapTx: Transaction; slippagePercentage: number; } export interface OneinchSwapProviderConfig extends BaseSwapProviderConfig { agent: string; routerAddress: string; referrerAddress: { [key in ChainId]?: string; }; referrerFee: number; } declare class OneinchSwapProvider extends SwapProvider { config: OneinchSwapProviderConfig; private _httpClient; constructor(config: OneinchSwapProviderConfig); getSupportedPairs(): Promise; getClient(network: Network, walletId: string, asset: string, accountId: string): Client, import("@chainify/client").Swap>, import("@chainify/client").Nft>; getQuote({ network, from, to, amount }: QuoteRequest): Promise<{ fromAmount: string; toAmount: string; } | null>; approveTokens({ network, walletId, quote }: SwapRequest): Promise<{ status: string; approveTx: Transaction; approveTxHash: string; }>; sendSwap({ network, walletId, quote }: SwapRequest): Promise<{ status: string; swapTx: Transaction; swapTxHash: string; }>; newSwap({ network, walletId, quote }: SwapRequest): Promise<{ status: string; approveTx: Transaction; approveTxHash: string; id: string; fee: number; slippage: number; } | { status: string; swapTx: Transaction; swapTxHash: string; id: string; fee: number; slippage: number; }>; estimateFees({ network, txType, quote, feePrices, feePricesL1, }: EstimateFeeRequest): Promise; getMin(_quoteRequest: QuoteRequest): Promise; private _getQuote; private _buildApproval; private _buildSwap; waitForApproveConfirmations({ swap, network, walletId }: NextSwapActionRequest): Promise<{ endTime: number; status: string; } | undefined>; waitForSwapConfirmations({ swap, network, walletId }: NextSwapActionRequest): Promise<{ endTime: number; status: string; } | undefined>; performNextSwapAction(store: ActionContext, { network, walletId, swap }: NextSwapActionRequest): Promise | undefined>; protected _getStatuses(): Record; protected _txTypes(): { SWAP: string; }; protected _fromTxType(): string | null; protected _toTxType(): string | null; protected _timelineDiagramSteps(): string[]; protected _totalSteps(): number; } export { OneinchSwapProvider };