Skip to main content
See the Lit Client Reference API for more details on how to create a Lit Client.

Overview

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

Install the SDK

Run the following command to install the SDK and the required viem peer dependency:
npm i @lit-protocol/lit-client @lit-protocol/networks viem
viem is not bundled with the SDK. Ensure your application supplies a compatible version.
2

Network Configuration & Client Creation

Choose the appropriate network based on your development stage and requirements, then create your Lit Client instance.
import { nagaDev } from "@lit-protocol/networks";
import { createLitClient } from "@lit-protocol/lit-client";

const litClient = await createLitClient({
  network: nagaDev,
});
For smaller bundles you can import only the network you need via the tree-shakeable subpaths, for example:
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.

Network Comparison

NetworkTypeKey PersistencePayment RequiredUse CaseStatus
Naga DevCentralised❌ Temporary❌ FreeDevelopment & Testing✅ Available
Naga TestDecentralised⚠️ No guarantees✅ RequiredPre-production Testing✅ Available
Naga MainnetDecentralised✅ Persistent✅ RequiredLive Applications❌ Coming Soon