Overview
Lit SDK v8 (“Naga”) is a major release over v7 (“Datil”). The public API is more modular, usesviem 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
- Replace v7 packages/imports with v8 packages (see tables below).
- Swap
LitNodeClient/connect()forcreateLitClient(). - Replace
sessionSigsand mostauthSigusage withauthContextfromAuthManager(authSigremains optional only fordecryptoverrides). - Update Lit Actions to read inputs from
jsParams.*(no longer global). - Update PKP signing to
litClient.chain.*.pkpSign. - Replace v7 encryption helpers with
litClient.encrypt/litClient.decrypt. - If you use Wrapped Keys, keep using
pkpSessionSigsbut mint them viaAuthManager. - 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 passedrpcUrl or custom bootstrap URLs into the client config.v8 does this on the network module:
Authentication and sessions
v8 removessessionSigs 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
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 generatedpkpSessionSigs 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 apkpSessionSigs 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
- PKP signing is now grouped by chain (
litClient.chain.ethereum,litClient.chain.bitcoin, orlitClient.chain.raw). - Core APIs always require
authContext; they mint session signatures internally.
Encryption / decryption
v7 (typical)
v8
accessControlConditions, evmContractConditions, or solRpcConditions, but the unified builder (createAccBuilder) plus unifiedAccessControlConditions is the recommended path.
Wrapped Keys migration
Only two changes for most users:- Pass
litClientinstead oflitNodeClient. - Generate
pkpSessionSigsviaAuthManager(section above).
Payments: Capacity Credits → Ledger + PaymentManager
v7 Capacity Credits NFTs andcreateCapacityDelegationAuthSig 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
Use
userMaxPrice to cap spend per request:
Sponsoring users (replaces Capacity Delegation)
If you used pkp-ethers
The ethers PKP wallets were removed. Two common replacements:
- Use viem account integration
- Call
pkpSigndirectly vialitClient.chain.*.pkpSignand assemble transactions yourself.
Other notable removals / moves
lit-auth-clientand 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/authManagerAPIs 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 withPaymentManager.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 viaauthManager.createPkpSessionSigs.
Next steps
- Browse the v8 SDK docs starting at Lit Client Setup.
- For serverless reuse patterns, see Server Sessions.