Retrieves the RPC URL for the specified chain. If a custom RPC URL is defined in the options, it will be used. Otherwise, a thirdweb RPC URL will be constructed using the chain ID and client ID.
import { getRpcUrlForChain } from "thirdweb/chains";const rpcUrl = getRpcUrlForChain({ chain: 1, client });console.log(rpcUrl); // "https://1.rpc.thirdweb.com/...
function getRpcUrlForChain(options: GetRpcUrlForChainOptions): string;
The options object containing the chain and client information.
let options: GetRpcUrlForChainOptions;
let returnType: string;
The RPC URL for the specified chain.