UNPKG

@multiversx/sdk-dapp-swap

Version:

A library to hold the main logic for swapping between tokens on the MultiversX blockchain

53 lines 1.38 kB
import { IPlainTransactionObject } from 'lib'; import { PairType } from './pairs.types'; import { UserEsdtType } from './tokens.types'; export interface SwapRouteType { amountIn: string; tokenInID: string; tokenInPriceUSD: string; tokenInExchangeRateDenom: string; amountOut: string; tokenOutID: string; tokenOutPriceUSD: string; tokenOutExchangeRateDenom: string; fees: string[]; swapType: number; tokenRoute: string[]; pricesImpact: string[]; maxPriceDeviationPercent: number; tokensPriceDeviationPercent: number | null; intermediaryAmounts: string[]; pairs: PairType[]; transactions?: IPlainTransactionObject[]; } export declare enum SwapActionTypesEnum { wrap = "wrap", unwrap = "unwrap", swap = "swap" } export interface SwapFeeDetailsType { totalFee?: number; burn?: number; lpHolders?: number; } export interface TokenType { node: UserEsdtType; cursor: string; } export interface FilteredTokensType { edges?: TokenType[]; pageData?: EsdtPageDataType; pageInfo?: EsdtPageInfoType; } export interface EsdtPageInfoType { startCursor?: string; endCursor?: string; hasPreviousPage: boolean; hasNextPage: boolean; } export interface EsdtPageDataType { count: number; limit: number; offset: number; } //# sourceMappingURL=swap.types.d.ts.map