import { Client } from '@chainify/client'; import { EvmChainProvider, EvmTypes } from '@chainify/evm'; import { Transaction } from '@chainify/types'; import BN from 'bignumber.js'; import * as ethers from 'ethers'; import { ActionContext } from '../../store'; import { Asset, Network, SwapHistoryItem } from '../../store/types'; import { SwapProvider } from '../SwapProvider'; import { BaseSwapProviderConfig, EstimateFeeRequest, EstimateFeeResponse, NextSwapActionRequest, QuoteRequest, SwapRequest, SwapStatus } from '../types'; export interface SovrynSwapProviderConfig extends BaseSwapProviderConfig { routerAddress: string; routerAddressRBTC: string; rpcURL: string; } export interface SovrynSwapHistoryItem extends SwapHistoryItem { approveTxHash: string; swapTxHash: string; approveTx: Transaction; swapTx: Transaction; } declare class SovrynSwapProvider extends SwapProvider { config: SovrynSwapProviderConfig; _apiCache: { [key: number]: ethers.ethers.providers.StaticJsonRpcProvider; }; constructor(config: SovrynSwapProviderConfig); 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; path: any; } | null>; newSwap({ network, walletId, quote }: SwapRequest): Promise<{ status: string; approveTx?: undefined; approveTxHash?: undefined; id: string; fee: number; slippage: number; } | { status: string; approveTx: Transaction; approveTxHash: string; id: string; fee: number; slippage: number; } | { status: string; swapTx: Transaction; swapTxHash: string; id: string; fee: number; slippage: number; }>; requiresApproval({ network, walletId, quote }: SwapRequest): Promise; buildApprovalTx({ network, walletId, quote }: SwapRequest): Promise<{ from: string; to: string; value: BN; data: string; fee: number; }>; approveTokens({ network, walletId, quote }: SwapRequest): Promise<{ status: string; approveTx?: undefined; approveTxHash?: undefined; } | { status: string; approveTx: Transaction; approveTxHash: string; }>; buildSwapTx({ network, walletId, quote }: SwapRequest): Promise<{ from: string; to: string; value: BN; data: string; fee: number; }>; sendSwap({ network, walletId, quote }: SwapRequest): Promise<{ status: string; swapTx: Transaction; swapTxHash: string; }>; estimateFees({ network, walletId, asset, txType, quote, feePrices, }: EstimateFeeRequest): Promise; getMin(_quoteRequest: QuoteRequest): Promise; 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>; _getApi(network: Network, asset: Asset): ethers.ethers.providers.StaticJsonRpcProvider; _calculateSlippage(amount: string): string; protected _getStatuses(): Record; protected _txTypes(): { SWAP: string; }; protected _fromTxType(): string | null; protected _toTxType(): string | null; protected _timelineDiagramSteps(): string[]; protected _totalSteps(): number; } export { SovrynSwapProvider };