Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/zk-compression-cli",
"version": "0.28.0-beta.8",
"version": "0.28.0-beta.10",
"description": "ZK Compression: Secure Scaling on Solana",
"maintainers": [
{
Expand Down
6 changes: 1 addition & 5 deletions js/compressed-token/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [Unreleased]
## [0.23.0-beta.10]

### Breaking Changes

Expand All @@ -15,10 +15,6 @@
- `getMintInterface` (decompressed light-mint branch) now validates the on-chain mint owner and throws `TokenInvalidAccountOwnerError` on mismatch; it also forwards the provided `commitment` to on-chain `getAccountInfo`.
- **Migration impact:** callers that previously interpreted these paths as empty/not-found must now handle thrown errors explicitly (retry/backoff or surfacing RPC health).

## [0.23.0-beta.10]

### Breaking Changes

- **`decompressInterface` removed.** Use `loadAta` (action) or `createLoadAtaInstructions` (instruction builder) instead. `decompressInterface` did not support >8 compressed inputs and has been fully removed.
- **Action (send transaction):** Replace `decompressInterface(rpc, payer, owner, mint, amount?, destinationAta?, destinationOwner?, splInterfaceInfo?, confirmOptions?)` with `loadAta(rpc, ata, owner, mint, payer?, confirmOptions?, interfaceOptions?, wrap?)`. Derive the target ATA with `getAssociatedTokenAddressInterface(mint, owner)` for light-token, or pass the SPL/T22 ATA to decompress to that program. `loadAta` loads all cold balance into the given ATA (no partial amount); it supports >8 inputs via batched transactions and creates the ATA if needed.
- **Instruction-level:** Use `createLoadAtaInstructions(rpc, ata, owner, mint, payer?, interfaceOptions?, wrap?)` to get `TransactionInstruction[][]` and send batches yourself. The single-instruction primitive is no longer exported; use the batched API only.
Expand Down
6 changes: 3 additions & 3 deletions js/compressed-token/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/compressed-token",
"version": "0.23.0-beta.8",
"version": "0.23.0-beta.10",
"description": "JS client to interact with the compressed-token program",
"sideEffects": false,
"main": "dist/cjs/node/index.cjs",
Expand Down Expand Up @@ -147,13 +147,13 @@
"test:e2e:lighttoken:all": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-compressed-mint.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-associated-light-token.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-light-token.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-compressed.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-workflow.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/update-mint.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/update-metadata.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/compressible-load.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/wrap.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-mint-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-account-interface.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-mint-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-ata-interface.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-or-create-ata-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/transfer-interface.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/unwrap.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/decompress2.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/freeze-thaw-light-token.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/payment-flows.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/v1-v2-migration.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-freeze.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_VERSION=V2 LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/multi-cold-inputs-batching.test.ts -t \"instruction-level|hash uniqueness|ensureRecipientAta\" --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_VERSION=V2 LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/multi-cold-inputs-batching.test.ts -t \"parallel multi-tx\" --bail=1",
"test:e2e:all": "pnpm test:e2e:legacy:all && pnpm test:e2e:lighttoken:all",
"pull-idl": "../../scripts/push-compressed-token-idl.sh",
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
"build:bundle": "rimraf dist && rollup -c",
"build:v1": "LIGHT_PROTOCOL_VERSION=V1 pnpm build:stateless:v1 && LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle",
"build:v2": "LIGHT_PROTOCOL_VERSION=V2 pnpm build:stateless:v2 && LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle",
"build:stateless:v1": "cd ../stateless.js && pnpm build:v1",
"build:stateless:v2": "cd ../stateless.js && pnpm build:v2",
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
"format": "prettier --write .",
"lint": "eslint ."
},
Expand Down
2 changes: 1 addition & 1 deletion js/compressed-token/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const rolls = (fmt, env) => ({
preventAssignment: true,
values: {
__BUILD_VERSION__: JSON.stringify(
process.env.LIGHT_PROTOCOL_VERSION || 'V1',
process.env.LIGHT_PROTOCOL_VERSION || 'V2',
),
},
}),
Expand Down
4 changes: 2 additions & 2 deletions js/compressed-token/src/utils/version-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { featureFlags, VERSION } from '@lightprotocol/stateless.js';
* Validates that the built version of stateless.js matches the expected version.
* Throws an error if there's a mismatch.
*
* @param expectedVersion - The version expected (defaults to LIGHT_PROTOCOL_VERSION env var or V1)
* @param expectedVersion - The version expected (defaults to LIGHT_PROTOCOL_VERSION env var or V2)
* @throws Error if the versions don't match
*/
export function validateVersionConsistency(expectedVersion?: string): void {
const expected =
expectedVersion || process.env.LIGHT_PROTOCOL_VERSION || VERSION.V1;
expectedVersion || process.env.LIGHT_PROTOCOL_VERSION || VERSION.V2;
const actual = featureFlags.version.replace(/['"]/g, '');

if (actual !== expected) {
Expand Down
2 changes: 1 addition & 1 deletion js/compressed-token/tests/setup/version-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function setup() {

try {
validateVersionConsistency();
const expectedVersion = process.env.LIGHT_PROTOCOL_VERSION || 'V1';
const expectedVersion = process.env.LIGHT_PROTOCOL_VERSION || 'V2';
console.log(`✅ Version check passed: Using ${expectedVersion}`);
} catch (error) {
console.error('❌ Version check failed:');
Expand Down
12 changes: 6 additions & 6 deletions js/compressed-token/tests/unit/version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { featureFlags, VERSION } from '@lightprotocol/stateless.js';
describe('Versioning', () => {
beforeAll(() => {
const expectedVersion =
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V1;
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V2;
const actualVersion = featureFlags.version.replace(/['"]/g, '');

if (actualVersion !== expectedVersion) {
Expand Down Expand Up @@ -36,7 +36,7 @@ describe('Versioning', () => {

it('should respect LIGHT_PROTOCOL_VERSION environment variable', () => {
const expectedVersion =
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V1;
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V2;
const actualVersion = featureFlags.version.replace(/['"]/g, '');
expect(actualVersion).toBe(expectedVersion);
});
Expand All @@ -51,12 +51,12 @@ describe('Versioning', () => {
const actualVersion = featureFlags.version.replace(/['"]/g, '');
const isV2 = featureFlags.isV2();

if (process.env.LIGHT_PROTOCOL_VERSION === 'V2') {
expect(actualVersion).toBe(VERSION.V2);
expect(isV2).toBe(true);
} else {
if (process.env.LIGHT_PROTOCOL_VERSION === 'V1') {
expect(actualVersion).toBe(VERSION.V1);
expect(isV2).toBe(false);
} else {
expect(actualVersion).toBe(VERSION.V2);
expect(isV2).toBe(true);
}
});
});
10 changes: 10 additions & 0 deletions js/stateless.js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [0.23.0-beta.10]

### Breaking Changes

- Default build target is now V2 when `LIGHT_PROTOCOL_VERSION` is unset. This applies to bundle replacement (`__BUILD_VERSION__`) and package scripts (`pnpm build`, `pnpm build-ci`). To force V1 builds, set `LIGHT_PROTOCOL_VERSION=V1`.

### Changed

- Beta-gated interface RPC paths remain enabled by default in V2, and `getAccountInfoInterface` now propagates upstream RPC errors whenever no definitive account result is available (instead of silently returning `null` on fetch failure paths).

## [0.22.0] - 2025-06-16

### Breaking Changes
Expand Down
6 changes: 3 additions & 3 deletions js/stateless.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/stateless.js",
"version": "0.23.0-beta.8",
"version": "0.23.0-beta.10",
"description": "JavaScript API for Light & ZK Compression",
"sideEffects": false,
"main": "dist/cjs/node/index.cjs",
Expand Down Expand Up @@ -110,11 +110,11 @@
"test:verbose": "vitest run --reporter=verbose",
"test:testnet": "vitest run tests/e2e/testnet.test.ts --reporter=verbose",
"pull-idls": "../../scripts/push-stateless-js-idls.sh && ../../scripts/push-compressed-token-idl.sh",
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
"build:bundle": "rimraf dist && rollup -c",
"build:v1": "LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle",
"build:v2": "LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle",
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
"format": "prettier --write .",
"lint": "eslint ."
}
Expand Down
2 changes: 1 addition & 1 deletion js/stateless.js/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const rolls = (fmt, env) => ({
preventAssignment: true,
values: {
__BUILD_VERSION__: JSON.stringify(
process.env.LIGHT_PROTOCOL_VERSION || 'V1',
process.env.LIGHT_PROTOCOL_VERSION || 'V2',
),
},
}),
Expand Down
Loading