This module is the main interface for interacting with the Lit Protocol network. It provides a robust client implementation that handles network communication, authentication, and node interactions in both browser and Node.js environments.
npm install @lit-protocol/lit-node-clientThis module is the main interface for interacting with the Lit Protocol network. It provides a robust client implementation that handles network communication, authentication, and node interactions in both browser and Node.js environments.
``bash`
yarn add @lit-protocol/lit-node-client
`typescript
import { LitNodeClient } from '@lit-protocol/lit-node-client';
// Initialize the client
const client = new LitNodeClient({
litNetwork: 'datil',
});
// Connect to the network
await client.connect();
`
- Seamless authentication with Lit nodes
- Default authentication callback using checkAndSignAuthMessage`
- Cross-platform support (browser and Node.js)
- Network connection management
- Secure node communication
- Automatic request handling and retries