import type { NetworkClientId, Provider } from '@metamask/network-controller'; import type { Hex } from '@metamask/utils'; import type { TransactionControllerMessenger } from '../TransactionController.js'; type ProviderRequestParams = Parameters[0]['params']; /** * Get a provider for the specified chain or network client. * Resolves chainId to networkClientId if needed, then gets the provider. * * @param request - The request object. * @param request.messenger - The TransactionController messenger. * @param request.chainId - The chain ID to resolve to a network client. * @param request.networkClientId - The network client ID to use directly. * @returns The Provider instance. */ export declare function getProvider({ messenger, chainId, networkClientId, }: { messenger: TransactionControllerMessenger; chainId?: Hex; networkClientId?: NetworkClientId; }): Provider; /** * Send an RPC request to the network for the specified chain or network client. * * @param request - The request object. * @param request.messenger - The TransactionController messenger. * @param request.chainId - The chain ID to resolve to a network client. * @param request.networkClientId - The network client ID to use directly. * @param request.method - The JSON-RPC method name. * @param request.params - Optional parameters for the RPC call. * @returns The RPC response. */ export declare function rpcRequest({ messenger, chainId, networkClientId, method, params, }: { messenger: TransactionControllerMessenger; chainId?: Hex; networkClientId?: NetworkClientId; method: string; params?: ProviderRequestParams; }): Promise; /** * Get the network client ID for the specified chain or network client. * * @param request - The request object. * @param request.messenger - The TransactionController messenger. * @param request.chainId - The chain ID to resolve to a network client. * @param request.networkClientId - The network client ID to use directly. * @returns The network client ID. */ export declare function getNetworkClientId({ messenger, chainId, networkClientId, }: { messenger: TransactionControllerMessenger; chainId?: Hex; networkClientId?: NetworkClientId; }): NetworkClientId; /** * Get the chain ID for the specified network client. * * @param request - The request object. * @param request.messenger - The TransactionController messenger. * @param request.networkClientId - The network client ID. * @returns The chain ID. */ export declare function getChainId({ messenger, networkClientId, }: { messenger: TransactionControllerMessenger; networkClientId: NetworkClientId; }): Hex; export {}; //# sourceMappingURL=provider.d.ts.map