Optional
config: CheckoutModuleConfigurationThe configuration object for the CheckoutModule.
Readonly
configReadonly
fiatReadonly
availabilityOptional
Readonly
passportStatic
isChecks if the given object is a WrappedBrowserProvider.
The object to check.
Loads the widgets bundle and initiates the widgets factory.
The initialisation parameters for loading the widgets bundle and applying configuration
A promise that resolves to the widgets factory instance that can be used to create and manage widgets
Creates a provider using the given parameters.
The parameters for creating the provider.
A promise that resolves to the created provider.
Returns a list of EIP-6963 injected providers and their metadata.
A readonly array of injected providers and their metadata.
Finds an injected provider by its RDNS.
The parameters for finding the injected provider.
Subscribes to changes in the injected providers.
The listener to be called when the injected providers change.
Checks if a wallet is connected to the specified provider.
The parameters for checking the wallet connection.
Fetches the risk assessment for the given addresses.
The addresses to assess.
Helper method that checks if given risk assessment results contain sanctioned addresses.
Risk assessment to analyse.
Optional
address: stringIf defined, only sanctions for the given address will be checked.
Connects to a blockchain network using the specified provider.
The parameters for connecting to the network.
A promise that resolves to an object containing the provider and network information.
Switches the network for the current wallet provider.
The parameters for switching 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).
The parameters for retrieving the token information.
Retrieves the balance of a wallet address.
The parameters for retrieving the balance.
Retrieves the balances of all tokens for a given wallet address on a specific chain.
The parameters for retrieving the balances.
Retrieves the supported networks based on the provided parameters.
The parameters for retrieving the network allow list.
Retrieves the supported tokens based on the provided parameters.
The parameters for retrieving the token allow list.
Retrieves the default supported wallets based on the provided parameters.
The parameters for retrieving the wallet allow list.
Sends a transaction using the specified provider and transaction parameters.
The parameters for sending the transaction.
A promise that resolves to the result of the transaction.
Wraps a WrappedBrowserProvider call to validate the provider and handle errors.
The provider to connect to the network.
The block executing the provider call.
Returns the result of the provided block param.
Retrieves network information using the specified provider.
The parameters for retrieving network information.
A promise that resolves to the network information.
Determines the requirements for performing a sell.
The parameters for the sell.
A promise that resolves to the sell transaction requirements 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.
Cancels a sell.
The parameters for the cancel.
A promise that resolves to the cancel transaction result
Determines the transaction requirements to complete a purchase. This includes checking token approvals, native currency balance, and calculating the optimal route for completing the transaction.
The parameters for smart checkout.
A promise that resolves to the transaction requirements including:
Estimates the gas required for a swap or bridge transaction.
The parameters for the gas estimation.
Creates and returns a URL for the fiat ramp widget.
The parameters for creating the url.
Fetches fiat ramp fee estimations.
Constructs a new instance of the CheckoutModule class.