Skip to content

SDK - Migrate Lit Protocol from Datil to Naga network before 2/25 shutdown #1702

@MantisClone

Description

@MantisClone

Problem

Lit Protocol is shutting down the Datil (v0) network on 2/25/2026. The Request Network SDK's @requestnetwork/lit-protocol-cipher package (Lit SDK v7.0.5) uses Datil for encryption/decryption.

Note: The Lit Protocol encryption feature is not currently used in production — it is an available SDK feature, but we believe no one is actively using it. The old Request Invoicing app (now sunset) used encrypted requests on Datil, but users were warned it was a demo and it was always expected testnet keys would disappear. The primary risk is not user-facing breakage, but rather ensuring the Datil sunset does not break the SDK build or release process.

Affected components:

  • packages/lit-protocol-cipherLitProtocolCipherProvider (Lit SDK v7 packages: @lit-protocol/auth-helpers, @lit-protocol/constants, @lit-protocol/contracts, @lit-protocol/encryption, @lit-protocol/lit-node-client, @lit-protocol/lit-node-client-nodejs, @lit-protocol/types)
  • packages/request-node — Lit network config (LIT_NETWORK.Datil), RPC endpoint (yellowstone-rpc.litprotocol.com), capacity delegation auth signatures (special DatilDev handling in getLitCapacityDelegationAuthSig.ts)
  • packages/typesAuthSig type import from @lit-protocol/types
  • packages/integration-test — Lit Protocol integration tests (currently using datil-dev)
  • Root package.jsonstart:request-node script sets LIT_PROTOCOL_NETWORK=datil-dev

After 2/25, all three Datil networks (datil-dev, datil-test, datil mainnet) will be unreachable. The Lit Protocol encryption SDK feature will stop working, and CI tests will silently skip (due to the skip logic added in #1703 / PR #1698). The skip logic prevents CI from breaking, but means we lose Lit Protocol test coverage silently.

Proposed Solution

Migrate from Datil to Naga network. Naga requires Lit SDK v8 — this is a major breaking upgrade from the current v7.0.5. See the official v7→v8 migration guide.

Package changes

  • Install: @lit-protocol/lit-client, @lit-protocol/networks, @lit-protocol/auth, viem
  • Remove: @lit-protocol/lit-node-client, @lit-protocol/lit-node-client-nodejs (v8 is isomorphic), @lit-protocol/encryption (moved to client), @lit-protocol/auth-helpers, @lit-protocol/contracts-sdk
  • Rename: @lit-protocol/contracts-sdk@lit-protocol/contracts

Code changes required per component

packages/lit-protocol-cipher/src/lit-protocol-cipher-provider.ts (338 lines — core rewrite):

  • Client init: new LitNodeClient().connect()createLitClient({ network: nagaDev })
  • Encryption: encryptString({accessControlConditions, dataToEncrypt}, litNodeClient)litClient.encrypt({dataToEncrypt, unifiedAccessControlConditions})
  • Decryption: decryptToString({accessControlConditions, ciphertext, dataToEncryptHash, sessionSigs}, litNodeClient)litClient.decrypt({data, unifiedAccessControlConditions, authContext})
  • Session sigs: getSessionSigs() callback pattern → AuthManager + authContext model
  • @lit-protocol/encryption import removed — use litClient.encrypt/litClient.decrypt directly

packages/request-node/src/config.ts:

  • Network constants: LIT_NETWORK.DatilDevnagaDev, LIT_NETWORK.Datilnaga (imported from @lit-protocol/networks)
  • RPC: yellowstone-rpc.litprotocol.com → Naga RPC (or use network.withOverrides({ rpcUrl }))

packages/request-node/src/request/getLitCapacityDelegationAuthSig.ts (80 lines — full rewrite):

  • Capacity Credits NFT model → PaymentManager + ledger model
  • createCapacityDelegationAuthSig()paymentManager.delegatePaymentsBatch()
  • LitContracts SDK for rate limit NFTs → no longer needed

packages/types/src/data-access-types.ts:

  • AuthSig type import may change with v8's authContext model

packages/integration-test/test/lit-protocol.test.ts:

  • Update client init, encryption/decryption calls, session sig patterns
  • Network: 'datil-dev'nagaDev

Root package.json:

  • start:request-node script: LIT_PROTOCOL_NETWORK=datil-dev → update to Naga equivalent

Testing

  • Test on nagaDev (free, no ledger charges) before nagaTest/naga
  • Verify encryption/decryption round-trip
  • Verify SDK build and release process is not affected

Considerations

  • SDK v8 is a required breaking upgrade. Rodrigo suggested "just try to make it work with the new Naga network so it won't break our CI" — but Naga requires SDK v8 with new package names, a redesigned API, and a completely new payment model. The v7→v8 migration guide confirms: "existing v7 integrations must upgrade to access v8 networks." An earlier SDK v8 blog post (Sept 2025) said migration was "optional" for Datil Mainnet Beta apps, but this was superseded by the Jan 2026 sunset announcement which sets a hard 2/25 shutdown for all Datil networks.
  • Gap period is acceptable. After 2/25, the encryption feature won't work and CI tests will silently skip. Since the feature is not actively used in production, this gap is acceptable until migration is complete.
  • No backward compatibility concern for existing encrypted data. The old Request Invoicing app (now sunset) used encrypted requests on a Lit testnet. Users were adequately warned it was a demo app, and it was always expected that testnet encryption keys would eventually disappear. No community announcements were needed beyond the app sunset itself.
  • Existing Datil PKPs will not carry over to Naga via the standard path — but Lit Protocol's recovery process should handle this for mainnet keys.
  • The skip logic from PR chore: increase resource class to xlarge for CircleCI jobs #1698 means CI won't alert us when Datil goes down — we'll only notice if someone tries to use the encryption feature or if it affects the build/release pipeline.
  • Lit Protocol's sunset announcement and SDK v8 announcement should be referenced during implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions