import { JsonRpcProvider } from '@ethersproject/providers'; import { Actions, Connector } from '@web3-react/types'; /** * @function * @description Parses the hexadecimal string representation of chainId into its numeric value. * @param {string} chainId - The hexadecimal string representation of chainId. * @returns {number} The numeric value of chainId. */ export declare function parseChainId(chainId: string): number; /** * @class * @description A JSON-RPC connector class that extends the Connector class and provides a custom provider for the connection. * @extends {Connector} */ export default class JsonRpcConnector extends Connector { /** * The custom provider for the JSON-RPC connection. * @type {JsonRpcProvider} */ customProvider: JsonRpcProvider; /** * Creates an instance of JsonRpcConnector. * @param {{ * actions: Actions; * provider: JsonRpcProvider; * onError?: (error: Error) => void; * }} { * - actions - The Actions object that contains the update and reset state methods. * - provider - The JsonRpcProvider object for the connection. * - onError - [Optional] The error handler method for the connection. * * } */ constructor({ actions, provider, onError, }: { actions: Actions; provider: JsonRpcProvider; onError?: (error: Error) => void; }); /** * @async * @function * @description Activates the JSON-RPC connection and retrieves the chain ID and accounts information. * @returns {Promise} Resolves when the activation is successful and updates the state with the retrieved information. * @throws {Error} If the activation is unsuccessful. */ activate(): Promise; }