getRpcClient
Returns an RPC request that can be used to make JSON-RPC requests.
import { createThirdwebClient } from "thirdweb";import { getRpcClient } from "thirdweb/rpc";import { ethereum } from "thirdweb/chains";const client = createThirdwebClient({ clientId: "..." });const rpcRequest = getRpcClient({ client, chain: ethereum });const blockNumber = await rpcRequest({ method: "eth_blockNumber",});
function getRpcClient( options: Readonly<{ config?: { batchTimeoutMs?: number; maxBatchSize?: number; requestTimeoutMs?: number; }; }>,): EIP1193RequestFn<EIP1474Methods>;
The RPC options.
let options: Readonly<{ config?: { batchTimeoutMs?: number; maxBatchSize?: number; requestTimeoutMs?: number; };}>;