rubic-sdk
Version:
Simplify dApp creation
48 lines (47 loc) • 2.48 kB
TypeScript
import BigNumber from 'bignumber.js';
import { PriceTokenAmount } from "../../../../../../common/tokens";
import { TonBlockchainName } from "../../../../../../core/blockchain/models/blockchain-name";
import { TonEncodedConfig } from "../../../../../../core/blockchain/web3-private-service/web3-private/ton-web3-private/models/ton-types";
import { ContractParams } from "../../../../../common/models/contract-params";
import { SwapTransactionOptions } from "../../../../../common/models/swap-transaction-options";
import { GasData } from "../../common/evm-cross-chain-trade/models/gas-data";
import { FeeInfo } from "../../common/models/fee-info";
import { GetContractParamsOptions } from "../../common/models/get-contract-params-options";
import { OnChainSubtype } from "../../common/models/on-chain-subtype";
import { RubicStep } from "../../common/models/rubicStep";
import { TradeInfo } from "../../common/models/trade-info";
import { TonCrossChainTrade } from "../../common/ton-cross-chain-trade/ton-cross-chain-trade";
import { SymbiosisTonCrossChainTradeConstructor } from "../models/symbiosis-cross-chain-trade-constructor";
/**
* Calculated Symbiosis cross-chain trade.
*/
export declare class SymbiosisCcrTonTrade extends TonCrossChainTrade {
private readonly swappingParams;
readonly type: "symbiosis";
readonly isAggregator = false;
readonly onChainSubtype: OnChainSubtype;
readonly bridgeType: "symbiosis";
readonly from: PriceTokenAmount<TonBlockchainName>;
readonly to: PriceTokenAmount;
readonly toTokenAmountMin: BigNumber;
/** @internal */
readonly transitAmount: BigNumber;
readonly feeInfo: FeeInfo;
/**
* Overall price impact, fetched from symbiosis api.
*/
readonly priceImpact: number | null;
readonly gasData: GasData | null;
private readonly slippage;
protected get fromContractAddress(): string;
protected get methodName(): string;
constructor(crossChainTrade: SymbiosisTonCrossChainTradeConstructor, providerAddress: string, routePath: RubicStep[], useProxy: boolean);
protected getContractParams(_options: GetContractParamsOptions): Promise<ContractParams>;
getTradeAmountRatio(fromUsd: BigNumber): BigNumber;
getTradeInfo(): TradeInfo;
protected getTransactionConfigAndAmount(receiverAddress?: string): Promise<{
config: TonEncodedConfig;
amount: string;
}>;
swap(options?: SwapTransactionOptions): Promise<string | never>;
}