import { EIP1559Fee } from '@chainify/types'; import { Chain, Hop, HopBridge, TToken } from '@hop-protocol/sdk'; import { IAsset } from '@liquality/cryptoassets'; import BN from 'bignumber.js'; import { ethers, Wallet } from 'ethers'; import { ActionContext } from '../../store'; import { Network, SwapHistoryItem } from '../../store/types'; import { SwapProvider } from '../SwapProvider'; import { BaseSwapProviderConfig, EstimateFeeRequest, EstimateFeeResponse, NextSwapActionRequest, QuoteRequest, SwapQuote, SwapRequest, SwapStatus } from '../types'; export interface HopSwapProviderConfig extends BaseSwapProviderConfig { graphqlBaseURL: string; } export interface HopSwapQuote extends SwapQuote { hopChainFrom: Chain; } export declare enum HopTxTypes { SWAP = "SWAP" } export interface HopSwapHistoryItem extends SwapHistoryItem { hopAsset: TToken; hopChainFrom: Chain; hopChainTo: Chain; approveTxHash: string; fromFundHash: string; } declare class HopSwapProvider extends SwapProvider { config: HopSwapProviderConfig; graphqlURLs: { [key: string]: string; }; constructor(config: HopSwapProviderConfig); getSupportedPairs(): Promise; gasLimit(networkName: string): { [key: string]: number; }; getChain(chainName: string): Chain; _getHop(network: Network, signer?: undefined): Hop; _getAllTokens(hop: Hop): any; _getClient(network: Network, walletId: string, from: string, fromAccountId: string): import("@chainify/client").Client, import("@chainify/client").Wallet, import("@chainify/client").Swap>, import("@chainify/client").Nft>; _getSigner(network: Network, walletId: string, from: string, fromAccountId: string, provider: ethers.providers.Provider): Promise; _getBridgeWithSigner(hopAsset: TToken, hopChainFrom: Chain, network: Network, walletId: string, from: string, fromAccountId: string): Promise; _findAsset(asset: IAsset, chain: string, tokens: Record, tokenName: string): string | undefined; _getSendInfo(assetFrom: IAsset, assetTo: IAsset, hop: Hop): { bridgeAsset: string; chainFrom: Chain; chainTo: Chain; } | null; getQuote({ network, from, to, amount }: QuoteRequest): Promise<{ fromAmount: string; toAmount: string; hopAsset: string; hopChainFrom: Chain; hopChainTo: Chain; receiveFee: string; } | null>; _formatFee(fee: EIP1559Fee | number, networkName: string, type: string): { gasPrice: string; gasLimit: number; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; } | { maxFeePerGas: string; maxPriorityFeePerGas: string; gasLimit: number; gasPrice?: undefined; }; _approveToken(bridge: HopBridge, chainFrom: Chain, fromAmount: string, signer: Wallet, fee: number): Promise<{ status: string; approveTx: ethers.providers.TransactionResponse; approveTxHash: string; }>; sendSwap({ network, walletId, quote }: SwapRequest): Promise<{ status: string; fromFundTx: ethers.providers.TransactionResponse; fromFundHash: string; }>; newSwap({ network, walletId, quote }: SwapRequest): Promise<{ status: string; approveTx: ethers.providers.TransactionResponse; approveTxHash: string; id: string; fee: number; slippage: number; hopAsset: TToken; hopChainFrom: Chain; hopChainTo: Chain; } | { endTime: number; status: string; id: string; fee: number; slippage: number; hopAsset: TToken; hopChainFrom: Chain; hopChainTo: Chain; }>; estimateFees({ asset, txType, quote, network, feePrices, feePricesL1, }: EstimateFeeRequest): Promise; getMin(_quoteRequest: QuoteRequest): Promise; waitForApproveConfirmations({ swap, network, walletId }: NextSwapActionRequest): Promise<{ endTime: number; status: string; } | undefined>; waitForSendSwapConfirmations({ swap, network, walletId }: NextSwapActionRequest): Promise<{ endTime: number; status: string; } | undefined>; waitForRecieveSwapConfirmations({ swap, network, walletId }: NextSwapActionRequest): Promise<{ receiveTxHash: string; receiveTx: import("@chainify/types").Transaction; endTime: number; status: string; } | undefined>; performNextSwapAction(store: ActionContext, { network, walletId, swap }: NextSwapActionRequest): Promise | undefined>; protected _getStatuses(): Record; protected _txTypes(): Record; protected _fromTxType(): string | null; protected _toTxType(): string | null; protected _totalSteps(): number; protected _timelineDiagramSteps(): string[]; } export { HopSwapProvider };