Resolves viem clients based on a network identifier or Node URL.
Configuration options
Optional account to use for the wallet client
The network identifier (e.g., "base", "base-sepolia") or Node URL
Promise resolving to an object containing the chain, publicClient, and walletClient
// Using network identifierconst clients = await resolveViemClients({ networkOrNodeUrl: "base", account: myAccount});// Using Node URLconst clients = await resolveViemClients({ networkOrNodeUrl: "https://mainnet.base.org", account: myAccount}); Copy
// Using network identifierconst clients = await resolveViemClients({ networkOrNodeUrl: "base", account: myAccount});// Using Node URLconst clients = await resolveViemClients({ networkOrNodeUrl: "https://mainnet.base.org", account: myAccount});
Resolves viem clients based on a network identifier or Node URL.