UNPKG

@lifi/sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

13 lines 421 B
import { config } from '../config.js'; export const getRpcUrl = async (chainId) => { const rpcUrls = await getRpcUrls(chainId); return rpcUrls[0]; }; export const getRpcUrls = async (chainId) => { const rpcUrls = (await config.getRPCUrls())[chainId]; if (!rpcUrls?.length) { throw new Error(`RPC URL not found for chainId: ${chainId}`); } return rpcUrls; }; //# sourceMappingURL=rpc.js.map