Class ExchangeService

Hierarchy

Index

Methods

buildCrossChainBridgeTransaction

destroy

  • destroy(): void

findCrossChainBridgeRoutes

getAdvanceRoutes

  • getAdvanceRoutes(fromTokenAddress: string, toTokenAddress: string, fromChainId: number, toChainId: number, fromAmount: BigNumber, toAddress?: string, allowSwitchChain?: boolean, fromAddress?: string, showZeroUsd?: boolean, serviceProvider?: string): Promise<AdvanceRoutes>
  • Parameters

    • fromTokenAddress: string
    • toTokenAddress: string
    • fromChainId: number
    • toChainId: number
    • fromAmount: BigNumber
    • Optional toAddress: string
    • Optional allowSwitchChain: boolean
    • Optional fromAddress: string
    • Optional showZeroUsd: boolean
    • Optional serviceProvider: string

    Returns Promise<AdvanceRoutes>

getAdvanceRoutesLiFi

  • getAdvanceRoutesLiFi(fromTokenAddress: string, toTokenAddress: string, fromChainId: number, toChainId: number, fromAmount: BigNumber, toAddress?: string, allowSwitchChain?: boolean, fromAddress?: string, showZeroUsd?: boolean): Promise<AdvanceRoutesLiFi>
  • Parameters

    • fromTokenAddress: string
    • toTokenAddress: string
    • fromChainId: number
    • toChainId: number
    • fromAmount: BigNumber
    • Optional toAddress: string
    • Optional allowSwitchChain: boolean
    • Optional fromAddress: string
    • Optional showZeroUsd: boolean

    Returns Promise<AdvanceRoutesLiFi>

getCrossChainBridgeSupportedChains

getCrossChainBridgeTokenList

getCrossChainBridgeTransaction

  • getCrossChainBridgeTransaction<T, P>(payload: P): Promise<T>
  • Type parameters

    • T

    • P

    Parameters

    • payload: P

    Returns Promise<T>

getCrossChainQuotes

  • getCrossChainQuotes(fromTokenAddress: string, toTokenAddress: string, fromChainId: number, toChainId: number, fromAmount: BigNumber, serviceProvider?: CrossChainServiceProvider, lifiBridges?: LiFiBridge[], toAddress?: string, fromAddress?: string, showZeroUsd?: boolean): Promise<BridgingQuotes>
  • Parameters

    • fromTokenAddress: string
    • toTokenAddress: string
    • fromChainId: number
    • toChainId: number
    • fromAmount: BigNumber
    • Optional serviceProvider: CrossChainServiceProvider
    • Optional lifiBridges: LiFiBridge[]
    • Optional toAddress: string
    • Optional fromAddress: string
    • Optional showZeroUsd: boolean

    Returns Promise<BridgingQuotes>

getExchangeOffers

  • getExchangeOffers(fromTokenAddress: string, toTokenAddress: string, fromAmount: BigNumber, fromChainId: number, toAddress?: string, fromAddress?: string, showZeroUsd?: boolean): Promise<ExchangeOffer[]>
  • Parameters

    • fromTokenAddress: string
    • toTokenAddress: string
    • fromAmount: BigNumber
    • fromChainId: number
    • Optional toAddress: string
    • Optional fromAddress: string
    • Optional showZeroUsd: boolean

    Returns Promise<ExchangeOffer[]>

getExchangeRoutersAddress

getExchangeSupportedAssets

  • getExchangeSupportedAssets(page?: number, limit?: number, ChainId: number): Promise<PaginatedTokens>
  • Parameters

    • Default value page: number = null
    • Default value limit: number = null
    • ChainId: number

    Returns Promise<PaginatedTokens>

getLiFiStatus

  • getLiFiStatus(fromChainId: number, toChainId: number, txnHash: string, bridge?: string): Promise<LiFiStatus>
  • Parameters

    • fromChainId: number
    • toChainId: number
    • txnHash: string
    • Optional bridge: string

    Returns Promise<LiFiStatus>

getStepTransaction

init