> For the complete documentation index, see [llms.txt](https://docs.zama.org/protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zama.org/protocol/sdk/changelog/legacy/v2.md).

# 2.x

Plain-language release notes for the `2.x` line — what changed in each minor version, in plain terms. This complements the auto-generated [`CHANGELOG.md`](https://github.com/zama-ai/sdk/blob/main/CHANGELOG.md) (the full commit-level list). The `2.x` line is superseded by `3.x` — to move an app forward, follow the [migration guide](/protocol/sdk/migration/migrate-v2-to-v3.md).

Notes are written in the API vocabulary of the time (`handles`, `keypairTTL`, `WrappersRegistry`, `ReadonlyToken`, `sdk.publicDecrypt`, …); many of those names changed in `3.x`.

## 2.5.0

*Released 2026-04-17.*

This release rounds out the decryption surface and keeps pace with upgraded on-chain wrapper contracts.

* **Public-decrypt primitive.** `sdk.publicDecrypt()` is now the primitive for decrypting publicly-decryptable values — no permit signature needed.
* **Richer decrypt events.** Decrypt events now expose the decrypted handles and result fields directly.
* **Upgraded unwrap events.** The SDK reads the upgraded unwrap events emitted by the wrapper contracts.
* **Inferred total supply.** Added a total-supply contract builder that infers the right read for a token.
* **Fixes.** Centralized `ZERO_HANDLE` with consistent `isZeroHandle` checks, and aligned the example apps with scoped `isAllowed` checks.

## 2.4.0

*Released 2026-04-13.*

The headline here is a smoother decrypt experience in React, plus some trimming of the token surface.

* **Unified `useUserDecrypt`.** The React hook now uses a reactive cache and auto-decrypts, so decrypted values stay in sync without manual plumbing.
* **Slimmer token API.** Removed bespoke fee and admin features that were tied to a specific integration, keeping the token surface generic.
* **`keypairTTL` cap.** The decrypt key pair TTL is now capped at the FHEVM 365-day maximum.
* **Examples.** The Node ethers and Node viem examples were upgraded to the 2.x API with full ERC-7984 flows.

## 2.3.0

*Released 2026-04-07.*

Delegation and safety checks are the focus.

* **Delegation API alignment.** The delegation API was aligned with the Delegated User Decryption spec.
* **Balance validation.** Transfers, shields, and unshields now validate balances before submitting, so obviously-doomed operations fail early.
* **TTL default.** The `keypairTTL` default was aligned with the session TTL (30 days).
* **Quality.** Improved error handling and code quality, plus new Node + Web end-to-end test infrastructure.

## 2.2.0

*Released 2026-03-30.*

This release introduces on-chain wrapper discovery.

* **Wrappers registry.** Added a `WrappersRegistry` class and matching on-chain registry hooks, so an app can look up the confidential wrapper registered for an ERC-20 (and vice versa) on-chain.
* **Delegation robustness.** Added `DelegationNotPropagatedError` to surface the gateway sync delay after a delegation is set.
* **Hook naming.** Renamed `useAllowTokens` / `useRevokeTokens` back to `useAllow` / `useRevoke`, and improved the query-wrapper types.
* **Examples.** Several example apps were upgraded to the current SDK with full ERC-7984 and delegation flows (wagmi v3, react-ethers, react-viem, and Hoodi).

## 2.1.0

*Released 2026-03-24.*

A small maintenance release — this one is thin on library-facing changes.

* **Fixes.** Excluded the logger from the web-worker init payload, gated queries on an undefined `tokenAddress`, and colocated the Node worker with the Node entry point.
* **Examples.** The Hoodi example gained on-chain ACL delegation flows.

## 2.0.0

*Released 2026-03-20.*

The `2.0.0` major bump adds delegated decryption and firms up key persistence and worker reliability.

{% hint style="danger" %}
**Breaking change: `useUserDecrypt` signature change.** The `useUserDecryptFlow` hook was removed, and `useUserDecrypt` now takes the flow hook's signature. The old low-level `useUserDecrypt` that accepted `UserDecryptParams` is gone.
{% endhint %}

* **Delegated decryption.** Added support for delegated decryption — letting another account decrypt your values.
* **Key persistence.** The FHE public key and params are now persisted with artifact-level revalidation, avoiding redundant refetches.
* **Worker reliability.** Browser-extension environments are auto-detected with a file-based worker fallback, worker creation is lazy (via a blob URL) to avoid SSR crashes, and session expiry is detected on the `isAllowed` query.
* **Smaller bundle.** Bundle size was reduced by inlining slim ABI fragments.
* **Examples.** Added `example-hoodi`, an ERC-7984 demo on the Hoodi testnet.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zama.org/protocol/sdk/changelog/legacy/v2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
