Skip to main content

Connecting to a Lit Network

After installing the Lit SDK, you can connect an instance of LitNodeClient to a Lit network. This is done by setting the litNetwork property when instantiating an instance of LitNodeClient:

import { LitNodeClient } from "@lit-protocol/lit-node-client";
import { LitNetwork } from "@lit-protocol/constants";

const litNodeClient = new LitNodeClient({
// Change this to the Lit SDK Network Identifier you want to connect to
litNetwork: LitNetwork.DatilDev,
});
await litNodeClient.connect();

Available Lit Networks

danger

With the release of Chronicle Yellowstone and the Datil networks, the Chronicle based Lit networks: habanero, manzano, and cayenne are going to be deprecated.

If you are currently using these networks, please review the Migrating to Datil guide to migrate your application and Lit assets to a Datil network.

Mainnets

NameLit SDK Network IdentifierDoc Page LinkNetwork is Live
DatildatilLink
Habanerohabaneron/a⚠️ Going to be deprecated

Testnets

NameLit SDK Network IdentifierDoc Page LinkNetwork is Live
Datil-testdatil-testLink
Datil-devdatil-devLink
Manzanomanzanon/a⚠️ Going to be deprecated
Cayennecayennen/a⚠️ Going to be deprecated