request
Sends a request to the Portal provider.
This function handles various Ethereum JSON-RPC methods and manages the interaction with the underlying blockchain and keychain. It supports both signed and unsigned requests.
Return
A PortalProviderResult containing the response from the provider.
Parameters
The ID of the blockchain network (e.g., "eth", "polygon").
The PortalRequestMethod to be executed (e.g., "eth_accounts", "eth_sendTransaction").
The list of parameters required for the specified method.
Optional PortalConnect object that may be needed for certain interactions, like signing. Defaults to null.
Throws
if the requested method is not supported by the specified chain.
if the request requires an address and none is found in the keychain for the given chain.
if any other error occurs during request processing or signing.