Class DataModule

Hierarchy

  • DataModule

Index

Constructors

constructor

  • Parameters

    • Default value apiKey: string = ""

    Returns DataModule

Properties

Readonly apiKey$

apiKey$: ObjectSubject<string, number | unique symbol | "length" | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "valueOf" | "codePointAt" | "includes" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "big" | "blink" | "bold" | "fixed" | "fontcolor" | "fontsize" | "italics" | "link" | "small" | "strike" | "sub" | "sup" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "at"> = new ObjectSubject<string>('')

Accessors

currentApi

  • get currentApi(): string
  • Returns string

Methods

fetchExchangeRates

  • fetchExchangeRates(tokens: string[], chainId: number): Promise<RateData>
  • Parameters

    • tokens: string[]
    • chainId: number

    Returns Promise<RateData>

getAccountBalances

  • getAccountBalances(account: string, tokens: string[], chainId: number, provider?: string): Promise<AccountBalances>
  • Parameters

    • account: string
    • tokens: string[]
    • chainId: number
    • Optional provider: string

    Returns Promise<AccountBalances>

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>

getExchangeOffers

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

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

    Returns Promise<ExchangeOffer[]>

getExchangeSupportedAssets

  • getExchangeSupportedAssets(page?: number, limit?: number, chainId: number, account: string): Promise<PaginatedTokens>
  • Parameters

    • Default value page: number = null
    • Default value limit: number = null
    • chainId: number
    • account: string

    Returns Promise<PaginatedTokens>

getNftList

  • getNftList(account: string, chainId: number): Promise<NftList>
  • Parameters

    • account: string
    • chainId: number

    Returns Promise<NftList>

getQuotes

  • getQuotes(fromAddress: string, toAddress: string, fromChainId: number, toChainId: number, fromToken: string, fromAmount: BigNumber, slippage: number, provider?: BridgingProvider): Promise<Quote[]>
  • Parameters

    • fromAddress: string
    • toAddress: string
    • fromChainId: number
    • toChainId: number
    • fromToken: string
    • fromAmount: BigNumber
    • slippage: number
    • Optional provider: BridgingProvider

    Returns Promise<Quote[]>

getStepTransaction

  • getStepTransaction(selectedRoute: Route, account: string): Promise<StepTransactions>
  • Parameters

    • selectedRoute: Route
    • account: string

    Returns Promise<StepTransactions>

getSupportedAssets

  • getSupportedAssets(chainId?: number, provider?: BridgingProvider): Promise<Token[]>
  • Parameters

    Returns Promise<Token[]>

getTokenListTokens

  • getTokenListTokens(chainId: number, name?: string): Promise<TokenListToken[]>
  • Parameters

    • chainId: number
    • Default value name: string = null

    Returns Promise<TokenListToken[]>

getTokenLists

  • getTokenLists(chainId: number): Promise<TokenList[]>
  • Parameters

    • chainId: number

    Returns Promise<TokenList[]>

getTransaction

  • getTransaction(hash: string, chainId: number): Promise<Transaction>
  • Parameters

    • hash: string
    • chainId: number

    Returns Promise<Transaction>

getTransactionStatus

getTransactions

  • getTransactions(account: string, chainId: number, page?: number, limit?: number): Promise<Transactions>
  • Parameters

    • account: string
    • chainId: number
    • Optional page: number
    • Optional limit: number

    Returns Promise<Transactions>

switchCurrentApi

  • switchCurrentApi(currentApi: string): string
  • Parameters

    • currentApi: string

    Returns string