> ## Documentation Index
> Fetch the complete documentation index at: https://litprotocol-feat-rusk-sdk.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Lit Client Setup

> Configure the Lit Protocol client for the Lit JS SDK

<Tip>
  See the [Lit Client Reference API](/sdk/sdk-reference/lit-client/functions/createLitClient) for more details on how to create a Lit Client.
</Tip>

## Overview

The Lit Client is the core interface for interacting with the Lit Protocol network.

<Steps>
  <Step title="Install the SDK">
    Run the following command to install the SDK and the required <code>viem</code> peer dependency:

    <CodeGroup>
      ```bash npm theme={null}
      npm i @lit-protocol/lit-client @lit-protocol/networks viem
      ```

      ```bash yarn theme={null}
      yarn add @lit-protocol/lit-client @lit-protocol/networks viem
      ```

      ```bash pnpm theme={null}
      pnpm add @lit-protocol/lit-client @lit-protocol/networks viem
      ```

      ```bash bun theme={null}
      bun add @lit-protocol/lit-client @lit-protocol/networks viem
      ```
    </CodeGroup>

    <Note>
      <code>viem</code> is not bundled with the SDK. Ensure your application supplies a compatible version.
    </Note>
  </Step>

  <Step title="Network Configuration & Client Creation">
    Choose the appropriate network based on your development stage and requirements, then create your Lit Client instance.

    <CodeGroup>
      ```typescript Naga Dev theme={null}
      import { nagaDev } from "@lit-protocol/networks";
      import { createLitClient } from "@lit-protocol/lit-client";

      const litClient = await createLitClient({
        network: nagaDev,
      });
      ```

      ```typescript Naga Test theme={null}
      import { nagaTest } from "@lit-protocol/networks";
      import { createLitClient } from "@lit-protocol/lit-client";

      const litClient = await createLitClient({
        network: nagaTest,
      });
      ```

      ```typescript Naga Mainnet theme={null}
      // ❗️ Currently in development. Coming soon...
      import { naga } from "@lit-protocol/networks";
      import { createLitClient } from "@lit-protocol/lit-client";

      const litClient = await createLitClient({
        network: naga,
      });
      ```
    </CodeGroup>

    <Note>
      For smaller bundles you can import only the network you need via the tree-shakeable
      subpaths, for example:

      ```ts theme={null}
      import { naga } from "@lit-protocol/networks/naga";
      // or import { nagaTest } from "@lit-protocol/networks/naga-test";
      ```

      This avoids pulling every network module into your application.
    </Note>
  </Step>
</Steps>

## Network Comparison

| Network          | Type          | Key Persistence  | Payment Required | Use Case               | Status        |
| ---------------- | ------------- | ---------------- | ---------------- | ---------------------- | ------------- |
| **Naga Dev**     | Centralised   | ❌ Temporary      | ❌ Free           | Development & Testing  | ✅ Available   |
| **Naga Test**    | Decentralised | ⚠️ No guarantees | ✅ Required       | Pre-production Testing | ✅ Available   |
| **Naga Mainnet** | Decentralised | ✅ Persistent     | ✅ Required       | Live Applications      | ❌ Coming Soon |
