Provider
The core class for interacting with the Portal API and managing user accounts. Provides blockchain interaction capabilities, handling authentication, event-driven communication, and transaction signing.
This class provides functionalities for:
Making API requests.
Handling events and event listeners.
Managing user accounts and addresses.
Signing requests.
Interacting with the Portal MPC network.
Handling connection events.
Parameters
The API key for authenticating with the Portal API.
The storage adapter for managing sensitive data, such as user addresses.
A map of chain IDs to RPC URLs, used for interacting with different blockchain networks.
(Optional) If true, requests are automatically approved without user interaction. Defaults to false.
(Optional) A set of feature flags to enable or disable specific functionalities. Defaults to null.
(Optional) The API version to use. Defaults to "v6".
(Optional) The base URL of the Portal API. Defaults to "api.portalhq.io".
(Optional) The base URL of the Portal MPC network. Defaults to "mpc.portalhq.io".
(Optional) An instance of PortalRequests for making HTTP requests. Defaults to a new PortalRequests instance.
Constructors
Functions
Retrieves the address associated with a specific blockchain namespace.
Retrieves the address associated with a specific blockchain chain ID.
Retrieves the RPC URL for a given blockchain chain ID.
Removes an event listener for a given event.
Sends a request to the Portal provider.
Updates the blockchain chain ID and emits a chain change event.