Skip to content

Commit da33589

Browse files
chore(js): stable 0.23.0 release notes and V2-default messaging
- Align changelogs on 0.23.0 stable (npm V2 default; no app LIGHT_PROTOCOL_VERSION=V2) - Deprecate featureFlags beta helpers as no-ops; clarify V2_REQUIRED_ERROR - Bump compressed-token, stateless.js, and zk-compression-cli package versions to stable tags Made-with: Cursor
1 parent 2f52adc commit da33589

6 files changed

Lines changed: 147 additions & 8 deletions

File tree

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightprotocol/zk-compression-cli",
3-
"version": "0.28.0-beta.12",
3+
"version": "0.28.0",
44
"description": "ZK Compression: Secure Scaling on Solana",
55
"maintainers": [
66
{

js/compressed-token/CHANGELOG.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,111 @@
1+
## [0.23.0] - 2026-03-24
2+
3+
Stable release. It supersedes the **`0.23.0-beta.x`** line and is intended for production use with **ZK Compression V2**. Upgrade from **`0.22.x`** or any beta version requires addressing the breaking changes listed below.
4+
5+
### Highlights
6+
7+
- **V2 is the default for npm consumers:** **`@lightprotocol/compressed-token@0.23.0`** pairs with **`@lightprotocol/stateless.js@0.23.0`**. You do **not** need **`LIGHT_PROTOCOL_VERSION=V2`** in app code for published packages. Set **`LIGHT_PROTOCOL_VERSION=V1`** only when **building these packages from source** and you need V1 artifacts.
8+
- **Light token surface:** Public names are **LightToken** / **`LIGHT_TOKEN_PROGRAM_ID`** (replacing CToken / **`CTOKEN_PROGRAM_ID`**).
9+
- **Interface transfers & loads:** The new token API is much closer to spl-token now, and uses the same Account types. Changes include: Recipient wallet vs explicit destination account, **owner pubkey + signing authority** split for delegates, batched **`TransactionInstruction[][]`**, and **`loadAta`** / **`createLoadAtaInstructions`** replacing **`decompressInterface`**.
10+
11+
### Breaking changes (since 0.22.0)
12+
13+
**Transfers (actions)**
14+
15+
- **`transferInterface`**: `recipient` is the **recipient wallet** `PublicKey` (not a pre-derived ATA). Signature:
16+
17+
`transferInterface(rpc, payer, source, mint, recipient, owner, authority, amount, programId?, confirmOptions?, options?, decimals?)`
18+
- **`owner`**: source token-account **owner** pubkey (for ATA derivation / source checks).
19+
- **`authority`**: **`Signer`** — use **`owner`** for owner-signed flows (`owner.publicKey` + `owner`), or **`delegate`** for delegated flows (`owner.publicKey` + `delegate`).
20+
21+
- **`transferToAccountInterface`**: explicit **`destination`** token account; same **`owner` / `authority`** split:
22+
23+
`transferToAccountInterface(rpc, payer, source, mint, destination, owner, authority, amount, programId?, confirmOptions?, options?, decimals?)`
24+
25+
- **Multiple transactions:** for large cold-input fan-in, these actions may send **parallel load transactions** followed by a **final transfer** (Solana size / proof limits). Instruction builders expose the same as **`TransactionInstruction[][]`**.
26+
27+
**Transfers (instruction builders)**
28+
29+
- **`createTransferInterfaceInstructions`**: returns **`TransactionInstruction[][]`** (one inner array per transaction). Wallet recipient; embeds idempotent recipient ATA creation in the final batch.
30+
31+
`createTransferInterfaceInstructions(rpc, payer, mint, amount, owner, recipient, decimals, options?, programId?)`
32+
33+
- **`createTransferToAccountInterfaceInstructions`**: same batching shape; **`destination`** is the token account address.
34+
35+
`createTransferToAccountInterfaceInstructions(rpc, payer, mint, amount, owner, destination, decimals, options?, programId?)`
36+
37+
- **`InterfaceOptions`**: **`wrap`** and related options are nested here; **`programId`** is **not** inside `InterfaceOptions` (flat parameter, SPL-style). **`InterfaceOptions.owner` was removed** — use flat **`owner`** args and, for delegated **planning**, **`options.delegatePubkey`**.
38+
39+
- **`decimals`** is required on these v3 builders unless you use a higher-level wrapper that resolves decimals for you.
40+
41+
**Load / decompress**
42+
43+
- **`decompressInterface`** removed. Use **`loadAta`** (action) or **`createLoadAtaInstructions`** (builder). **`createLoadAtaInstructions`** returns **`TransactionInstruction[][]`**, not a flat instruction array.
44+
45+
- **Delegated loads:** flat args still pass the token-account **`owner`** pubkey; when the **`Signer`** is a **delegate**, set **`interfaceOptions.delegatePubkey`** to the delegate’s pubkey (do not stuff the owner into removed **`InterfaceOptions.owner`**).
46+
47+
- **`createLoadAtaInstructionsFromInterface`** is **not** exported from the package root; use **`createLoadAtaInstructions`**.
48+
49+
**Renames (CToken → LightToken)**
50+
51+
- Examples: **`CTOKEN_PROGRAM_ID``LIGHT_TOKEN_PROGRAM_ID`**, **`createAssociatedCTokenAccountInstruction``createAssociatedLightTokenAccountInstruction`**, **`parseCTokenHot` / `parseCTokenCold``parseLightTokenHot` / `parseLightTokenCold`**, **`mintToCToken``mintToLightToken`**, **`createCTokenTransferInstruction``createLightTokenTransferInstruction`**.
52+
53+
**`createLightTokenTransferInstruction`**
54+
55+
- Instruction **data layout** (9-byte) and **account metas** changed: includes **`system_program`** and **`fee_payer`**; **`owner` is writable** (compressible rent top-ups).
56+
57+
**`createDecompressInterfaceInstruction`**
58+
59+
- **`decimals: number`** required after **`splInterfaceInfo`** where applicable for SPL destination decompression.
60+
61+
**Deprecated dispatcher**
62+
63+
- **`createTransferInterfaceInstruction`** (monolithic multi-program helper): deprecated; use **`createLightTokenTransferInstruction`** or SPL **`createTransferCheckedInstruction`** as appropriate.
64+
65+
**Token pool / SPL interface**
66+
67+
- Prefer **`CompressedTokenProgram.createSplInterface`**; **`createTokenPool`** is deprecated.
68+
69+
**Removed exports**
70+
71+
- **`createLoadAccountsParams`**, **`calculateCompressibleLoadComputeUnits`**, and related types — use **`createLoadAtaInstructions`** and **`calculateLoadBatchComputeUnits`**.
72+
73+
**`mintToCompressed`**
74+
75+
- **`maxTopUp`** was inserted **before** optional **`confirmOptions`** — update positional call sites.
76+
77+
**RPC / typing strictness**
78+
79+
- **`getAccountInterface`**, **`getAtaInterface`**, **`getMintInterface`**: unexpected failures and wrong-program owners surface as **errors** instead of being treated like empty/not-found in several cases.
80+
81+
**Synthetic delegate views**
82+
83+
- In **`getAtaInterface` / `getAccountInterface`**, canonical delegate and **`delegatedAmount`** aggregation follow updated rules (hot delegate preferred; cold delegates aligned with hot).
84+
85+
### New APIs (consumer-visible)
86+
87+
- **`approveInterface`**, **`revokeInterface`**; builders **`createApproveInterfaceInstructions`**, **`createRevokeInterfaceInstructions`**; **`createLightTokenApproveInstruction`**, **`createLightTokenRevokeInstruction`**.
88+
- **`createUnwrapInstructions`**, **`selectInputsForAmount`**.
89+
- **`createLightTokenFreezeAccountInstruction`**, **`createLightTokenThawAccountInstruction`**.
90+
- **`MAX_TOP_UP`** and **`maxTopUp`** on compressible instruction builders and selected actions.
91+
- **`sliceLast`**, **`chunkAccountsByTreeVersion`**, **`assertUniqueInputHashes`** for batch orchestration.
92+
- **`assertV2Only`** on load/decompress paths — V1 compressed inputs fail fast with a clear error.
93+
- **`LightTokenProgram`** alias for **`CompressedTokenProgram`**.
94+
- **`getOrCreateAtaInterface`** / create-mint flows: decompressed mint handling integrated where documented so typical flows do not require a separate **`decompressMint`** before ATAs.
95+
96+
### Changed / fixed (summary)
97+
98+
- **`approveInterface` / `revokeInterface`**: optional **`InterfaceOptions`** (incl. **`wrap`**) and trailing **`decimals`**; unified approve/revoke entrypoints match the same options pattern.
99+
100+
- **`@lightprotocol/compressed-token/unified`**: transfer-related entrypoints keep **`wrap: true`**; use the non-unified exports for explicit **`programId`** / no-wrap SPL Token-2022 style flows.
101+
102+
- **`loadAta`**: may send **parallel** load batches; frozen-source handling and SPL interface error propagation improved.
103+
- **`maxTopUp`** default **`MAX_TOP_UP` (65535)** so rent top-ups are not silently blocked.
104+
- **Browser bundles:** minified output keeps **`AccountMeta`** **`isSigner` / `isWritable`** as real **booleans** (Terser; see **`@lightprotocol/stateless.js`** changelog).
105+
- **`delegatedAmount`** parsed from CompressedOnly TLV where applicable.
106+
107+
---
108+
1109
## [0.23.0-beta.11]
2110

3111
### Added

js/compressed-token/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightprotocol/compressed-token",
3-
"version": "0.23.0-beta.12",
3+
"version": "0.23.0",
44
"description": "JS client to interact with the compressed-token program",
55
"sideEffects": false,
66
"main": "dist/cjs/node/index.cjs",

js/stateless.js/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## [0.23.0] - 2026-03-24
4+
5+
Stable release. It supersedes the **`0.23.0-beta.x`** line and pairs with **`@lightprotocol/compressed-token@0.23.0`** for production ZK Compression **V2** workflows.
6+
7+
### Highlights
8+
9+
- **V2 is the default** for **published npm packages** (no app-level env required). When **building this repo from source**, `pnpm build` / `pnpm build-ci` and Rollup-injected **`__BUILD_VERSION__`** target **V2** when **`LIGHT_PROTOCOL_VERSION`** is unset. Set **`LIGHT_PROTOCOL_VERSION=V1`** to produce V1 bundles and tests.
10+
- **Runtime:** when not using a pre-built bundle, **`featureFlags`** defaults to **V2** if the env var is unset (see `src/constants.ts`).
11+
- **Stricter compressed account fetch:** **`getAccountInfoInterface`** surfaces **RPC errors** when no definitive account result is available, instead of returning **`null`** on some failure paths.
12+
13+
### Breaking / migration (since 0.22.0 stable)
14+
15+
- **Build default (new in 0.23 betas, stable here):** consumers who relied on implicit **V1** builds must set **`LIGHT_PROTOCOL_VERSION=V1`** for installs/scripts, or they will get **V2** artifacts.
16+
- **Compression RPC method names:** in **V2** mode, **`Rpc`** uses V2-suffixed JSON-RPC methods for many calls (e.g. **`getCompressedAccountV2`**) via **`versionedEndpoint`**. Your **Photon / compression** endpoint must support the V2 surface.
17+
- **`getAccountInfoInterface`:** treat **thrown / rejected RPC errors** as first-class; do not assume “null means missing account” on all failures.
18+
19+
### Added / changed
20+
21+
- **Minified browser builds:** Terser no longer uses **`booleans_as_integers`**, so **`AccountMeta`** flags stay boolean-compatible with **`@solana/web3.js`**.
22+
- **`PackedAccounts`:** **`addPreAccountsMeta`** / **`insertOrGetConfig`** normalize signer and writable flags so **`0`/`1`** from callers are handled consistently.
23+
24+
### Deprecated (compatibility)
25+
26+
- **`featureFlags.isBeta`**, **`enableBeta`**, **`disableBeta`**: deprecated no-ops; versioning is driven by **V2 default** / **`LIGHT_PROTOCOL_VERSION`** (source builds) and **`assertV2Enabled`** in **`@lightprotocol/compressed-token`**.
27+
28+
### If you are on 0.22.x
29+
30+
You already applied the **0.22.0** breaking change (**`transfer`** no longer takes **`stateTreeInfo`**). **0.23.0** adds the **V2-default build**, runtime **V2 default**, stricter **`getAccountInfoInterface`**, and the minification fixes above.
31+
32+
---
33+
334
## [0.23.0-beta.11]
435

536
### Fixed

js/stateless.js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightprotocol/stateless.js",
3-
"version": "0.23.0-beta.12",
3+
"version": "0.23.0",
44
"description": "JavaScript API for Light & ZK Compression",
55
"sideEffects": false,
66
"main": "dist/cjs/node/index.cjs",

js/stateless.js/src/constants.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ export const featureFlags = {
2828
isV2: () =>
2929
featureFlags.version.replace(/['"]/g, '').toUpperCase() === 'V2',
3030
/**
31-
* @deprecated Interface methods are production-ready; beta gating is ignored.
31+
* @deprecated Legacy compatibility; always false. Published packages default to V2.
3232
*/
33-
isBeta: (): boolean => true,
33+
isBeta: (): boolean => false,
3434
/**
35-
* @deprecated Interface methods are production-ready; beta gating is ignored.
35+
* @deprecated No-op. Retained for backward compatibility.
3636
*/
3737
enableBeta: (): void => {},
3838
/**
39-
* @deprecated Interface methods are production-ready; beta gating is ignored.
39+
* @deprecated No-op. Retained for backward compatibility.
4040
*/
4141
disableBeta: (): void => {},
4242
};
@@ -45,7 +45,7 @@ export const featureFlags = {
4545
* Error message for V2-only interface methods.
4646
*/
4747
export const V2_REQUIRED_ERROR =
48-
'Interface methods require V2. Set LIGHT_PROTOCOL_VERSION=V2.';
48+
'Interface methods require V2. Use @lightprotocol/stateless.js and @lightprotocol/compressed-token ^0.23.0 (V2 default), or set LIGHT_PROTOCOL_VERSION=V2 when building from source.';
4949

5050
/**
5151
* Assert that V2 interface methods are enabled.

0 commit comments

Comments
 (0)