JSPM

@lit-protocol/lit-node-client-nodejs

2.1.91
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4903
  • Score
    100M100P100Q137688F
  • License MIT

Package Exports

  • @lit-protocol/lit-node-client-nodejs
  • @lit-protocol/lit-node-client-nodejs/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lit-protocol/lit-node-client-nodejs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Getting Started

This LitNodeClientNodeJs is created solely to run on Node.js.

The usual checkAndSignAuthMessage is not included in this package, so you need to add it manually to the constructor if you decide to use it on a browser, or with any custom auth callback.

import * as LitJsSdkNodeJs from "@lit-protocol/lit-node-client-nodejs";
import { checkAndSignAuthMessage } from "@lit-protocol/auth-browser";

const client = new LitJsSdkNodeJs.LitNodeClientNodeJs({
  litNetwork: "serrano",
  defaultAuthCallback: checkAndSignAuthMessage,
});

await client.connect();

const authSig = await checkAndSignAuthMessage({
    chain: "ethereum",
});