UNPKG

soulswap-rubik-sdk

Version:
38 lines (37 loc) 1.77 kB
import { CrossChainSupportedBlockchain } from '@features/cross-chain/constants/cross-chain-supported-blockchains'; import { Token } from '@core/blockchain/tokens/token'; import { CrossChainOptions } from '@features/cross-chain/models/cross-chain-options'; import { BLOCKCHAIN_NAME } from '@core/blockchain/models/BLOCKCHAIN_NAME'; import { CrossChainTrade } from '@features/cross-chain/cross-chain-trade/cross-chain-trade'; import { MinMaxAmounts } from '@features/cross-chain/models/min-max-amounts'; export declare class CrossChainManager { private readonly providerAddress; static isSupportedBlockchain(blockchain: BLOCKCHAIN_NAME): blockchain is CrossChainSupportedBlockchain; private readonly contracts; private readonly defaultSlippageTolerance; constructor(providerAddress: string); calculateTrade(fromToken: Token | { address: string; blockchain: BLOCKCHAIN_NAME; }, fromAmount: string | number, toToken: Token | { address: string; blockchain: BLOCKCHAIN_NAME; }, options?: CrossChainOptions): Promise<CrossChainTrade>; private getFullOptions; private calculateTradeFromTokens; private calculateBestTrade; private getBestItContractTrade; private getItCalculatedTrade; private getToTransitTokenAmount; private checkMinMaxAmountsErrors; getMinMaxAmounts(fromToken: Token | { address: string; blockchain: BLOCKCHAIN_NAME; }, slippageTolerance?: number): Promise<MinMaxAmounts>; private getMinMaxAmountsDifficult; private getMinOrMaxAmount; private getMinMaxTransitTokenAmounts; private getTokenAmountForExactTransitTokenAmount; private getTokenAmountForExactTransitTokenAmountByProvider; private getCryptoFeeTokenAndGasData; }