Skip to main content

Overview

Lit SDK v8 (“Naga”) is a major release over v7 (“Datil”). The public API is more modular, uses viem for chain interactions, introduces the AuthManager/authContext model, and replaces Capacity Credits with Ledger‑based payments. This guide is written for teams upgrading existing v7 integrations. It focuses on breaking changes and exact replacements.

Upgrade checklist

  1. Replace v7 packages/imports with v8 packages (see tables below).
  2. Swap LitNodeClient/connect() for createLitClient().
  3. Replace sessionSigs and most authSig usage with authContext from AuthManager (authSig remains optional only for decrypt overrides).
  4. Update Lit Actions to read inputs from jsParams.* (no longer global).
  5. Update PKP signing to litClient.chain.*.pkpSign.
  6. Replace v7 encryption helpers with litClient.encrypt / litClient.decrypt.
  7. If you use Wrapped Keys, keep using pkpSessionSigs but mint them via AuthManager.
  8. On paid networks, migrate Capacity Credits flows to the new PaymentManager.

Quick reference: v7 → v8 mapping

Use this section as a searchable symbol map. Find the v7 name you used and jump to the v8 equivalent.

Packages and modules

Client + network setup

Networks

Authentication and session material

Core APIs

Lit Actions runtime

PKP management & permissions

Wrapped Keys

Payments

Package and import changes

Core client + networks

Install:
viem is a peer dependency in v8; your app must install it.

Authentication

Install:

PKP wallets / chain libs

Contracts

Networks and client setup

v7

v8

If you previously used litNodeClient.getLatestBlockhash() (for SIWE nonces), you can access it via const { latestBlockhash } = await litClient.getContext();.

Network name mapping

Custom RPC / bootstrap overrides

v7 typically passed rpcUrl or custom bootstrap URLs into the client config.
v8 does this on the network module:

Authentication and sessions

v8 removes sessionSigs from core APIs and no longer requires authSig (except as an optional override on decrypt). Instead, you create an authContext once and pass it to any method that needs authorization.

EOA session (replaces getSessionSigs)

v7

v8

You no longer build SIWE messages or fetch nonces manually; the AuthManager handles that through its authenticators.
v7 helpers like checkAndSignAuthMessage / signAndSaveAuthMessage are no longer needed. AuthManager persists session materials automatically using the storage plugin you configure.

PKP session (core APIs)

v7

You typically generated pkpSessionSigs and passed them into executeJs / pkpSign.

v8

Create a PKP auth context and pass it to core APIs:

PKP session signatures (wrapped-keys only)

Wrapped-keys APIs still expect a pkpSessionSigs bundle for v7 compatibility.
Generate them in v8 like this:

Core API method changes

executeJs

v7

v8

Lit Actions runtime: jsParams is now nested

This is the biggest Lit Actions breaking change. In v7, keys in jsParams were injected as globals.
In v8, all custom inputs live under the global jsParams object.
Also prefer Lit.Actions.* over LitActions.* in new actions.

pkpSign

v7

v8

Notes:
  • PKP signing is now grouped by chain (litClient.chain.ethereum, litClient.chain.bitcoin, or litClient.chain.raw).
  • Core APIs always require authContext; they mint session signatures internally.

Encryption / decryption

v7 (typical)

v8

v8 still accepts accessControlConditions, evmContractConditions, or solRpcConditions, but the unified builder (createAccBuilder) plus unifiedAccessControlConditions is the recommended path.

Wrapped Keys migration

Only two changes for most users:
  1. Pass litClient instead of litNodeClient.
  2. Generate pkpSessionSigs via AuthManager (section above).

Payments: Capacity Credits → Ledger + PaymentManager

v7 Capacity Credits NFTs and createCapacityDelegationAuthSig flows are deprecated in v8. In v8:
  • Paid networks (naga-test, naga) charge per request.
  • Users (or your app) fund a Ledger balance.
  • Apps can sponsor users by delegating payments.

Minimal self‑funded setup

Then call core APIs as usual.
Use userMaxPrice to cap spend per request:

Sponsoring users (replaces Capacity Delegation)

See Payment Manager Setup for full details.

If you used pkp-ethers

The ethers PKP wallets were removed. Two common replacements:
  1. Use viem account integration
  1. Call pkpSign directly via litClient.chain.*.pkpSign and assemble transactions yourself.

Other notable removals / moves

  • lit-auth-client and its auth providers are replaced by @lit-protocol/auth + optional @lit-protocol/auth-services.
  • Node‑only vs browser‑only split packages are consolidated; v8 is isomorphic by default.
  • Low‑level helpers from v7 still exist in subpackages where applicable, but most apps can migrate to the higher‑level litClient/authManager APIs shown here.

Troubleshooting after upgrade

magicNumber is not defined” inside Lit Actions

Update Lit Action code to read jsParams.magicNumber (see runtime section).

“Missing peer dependency viem

Install viem and ensure your bundler doesn’t dedupe it away.

“Insufficient ledger balance / payment required”

Deposit funds with PaymentManager.deposit or delegate a payer (paid networks only).

Wrapped keys failing with “missing pkpSessionSigs”

Core APIs no longer need session sigs, but wrapped‑keys still do. Generate them via authManager.createPkpSessionSigs.

Next steps