• Resolves viem clients based on a network identifier or Node URL.

    Parameters

    • options: ResolveViemClientsOptions

      Configuration options

      • account: EvmAccount

        Optional account to use for the wallet client

      • networkOrNodeUrl: string

        The network identifier (e.g., "base", "base-sepolia") or Node URL

    Returns Promise<ResolvedViemClients>

    Promise resolving to an object containing the chain, publicClient, and walletClient

    // Using network identifier
    const clients = await resolveViemClients({
    networkOrNodeUrl: "base",
    account: myAccount
    });

    // Using Node URL
    const clients = await resolveViemClients({
    networkOrNodeUrl: "https://mainnet.base.org",
    account: myAccount
    });