Hierarchy

  • Checkout

Constructors

Properties

readOnlyProviders: any
httpClient: any
fiatRampService: FiatRampService
availability: AvailabilityService
passport?: passport.Passport
loadUmdBundle: any
loadEsModules: any

Methods

  • Checks if the given object is a Web3 provider.

    Parameters

    • web3Provider: Web3Provider

      The object to check.

    Returns boolean

    • True if the object is a Web3 provider, false otherwise.
  • Loads the widgets bundle and initiate the widgets factory.

    Parameters

    • init: WidgetsInit

      The initialisation parameters for loading the widgets bundle and applying configuration

    Returns Promise<WidgetsFactory>

  • Connects to a blockchain network using the specified provider.

    Parameters

    Returns Promise<checkout.ConnectResult>

    A promise that resolves to an object containing the provider and network information.

    Throws

    If the provider is not valid or if there is an error connecting to the network.

  • Adds the network for the current wallet provider.

    Parameters

    • params: AddNetworkParams

      The parameters for adding the network.

    Returns Promise<any>

    • A promise that resolves to the result of adding the network.
  • Retrieves the token information given the token address. This function makes RPC calls to ERC20 contracts to fetch the main contract information (e.g. symbol).

    Parameters

    Returns Promise<checkout.TokenInfo>

    • A promise that resolves to the token info request.
  • Retrieves network information using the specified provider.

    Parameters

    Returns Promise<checkout.NetworkInfo>

    A promise that resolves to the network information.

  • Determines the requirements for performing a sell.

    Parameters

    • params: checkout.SellParams

      The parameters for the sell. Only currently actions the first order in the array until we support batch processing. Only currently actions the first fee in the fees array of each order until we support multiple fees.

    Returns Promise<checkout.SellResult>

  • Creates and returns a URL for the fiat ramp widget.

    Parameters

    Returns Promise<string>

    • A promise that resolves to a string url.
  • Fetches Swap widget availability.

    Returns Promise<boolean>

    • A promise that resolves to a boolean.

Generated using TypeDoc