rubic-sdk
Version:
Simplify dApp creation
42 lines (41 loc) • 2.16 kB
TypeScript
import BigNumber from 'bignumber.js';
import { PriceTokenAmount } from "../../../../../common/tokens";
import { EvmEncodeConfig } from "../../../../../core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/models/evm-encode-config";
import { ContractParams } from "../../../../common/models/contract-params";
import { SwapTransactionOptions } from "../../../../common/models/swap-transaction-options";
import { EvmCrossChainTrade } from "../common/evm-cross-chain-trade/evm-cross-chain-trade";
import { GasData } from "../common/evm-cross-chain-trade/models/gas-data";
import { FeeInfo } from "../common/models/fee-info";
import { RubicStep } from "../common/models/rubicStep";
import { TradeInfo } from "../common/models/trade-info";
import { LayerZeroBridgeSupportedBlockchain } from './models/layerzero-bridge-supported-blockchains';
export declare class LayerZeroBridgeTrade extends EvmCrossChainTrade {
readonly onChainSubtype: {
from: undefined;
to: undefined;
};
readonly type: "layerzero";
readonly isAggregator = false;
readonly bridgeType: "layerzero";
readonly from: PriceTokenAmount<LayerZeroBridgeSupportedBlockchain>;
readonly to: PriceTokenAmount<LayerZeroBridgeSupportedBlockchain>;
readonly toTokenAmountMin: BigNumber;
readonly gasData: GasData | null;
protected get fromContractAddress(): string;
readonly feeInfo: FeeInfo;
readonly onChainTrade: null;
protected get methodName(): string;
constructor(crossChainTrade: {
from: PriceTokenAmount<LayerZeroBridgeSupportedBlockchain>;
to: PriceTokenAmount<LayerZeroBridgeSupportedBlockchain>;
gasData: GasData | null;
}, providerAddress: string, routePath: RubicStep[], useProxy: boolean);
protected swapDirect(options?: SwapTransactionOptions): Promise<string | never>;
getContractParams(options: SwapTransactionOptions): Promise<ContractParams>;
protected getTransactionConfigAndAmount(receiverAddress?: string): Promise<{
config: EvmEncodeConfig;
amount: string;
}>;
getTradeAmountRatio(fromUsd: BigNumber): BigNumber;
getTradeInfo(): TradeInfo;
}