Skip to content

Commit f341086

Browse files
chore: bump js beta versions (#2338)
* prep beta release * bump versions * fix comments and changelog
1 parent 2ac68f1 commit f341086

10 files changed

Lines changed: 29 additions & 23 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.8",
3+
"version": "0.28.0-beta.10",
44
"description": "ZK Compression: Secure Scaling on Solana",
55
"maintainers": [
66
{

js/compressed-token/CHANGELOG.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [Unreleased]
1+
## [0.23.0-beta.10]
22

33
### Breaking Changes
44

@@ -15,10 +15,6 @@
1515
- `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`.
1616
- **Migration impact:** callers that previously interpreted these paths as empty/not-found must now handle thrown errors explicitly (retry/backoff or surfacing RPC health).
1717

18-
## [0.23.0-beta.10]
19-
20-
### Breaking Changes
21-
2218
- **`decompressInterface` removed.** Use `loadAta` (action) or `createLoadAtaInstructions` (instruction builder) instead. `decompressInterface` did not support >8 compressed inputs and has been fully removed.
2319
- **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.
2420
- **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.

js/compressed-token/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightprotocol/compressed-token",
3-
"version": "0.23.0-beta.8",
3+
"version": "0.23.0-beta.10",
44
"description": "JS client to interact with the compressed-token program",
55
"sideEffects": false,
66
"main": "dist/cjs/node/index.cjs",
@@ -147,13 +147,13 @@
147147
"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",
148148
"test:e2e:all": "pnpm test:e2e:legacy:all && pnpm test:e2e:lighttoken:all",
149149
"pull-idl": "../../scripts/push-compressed-token-idl.sh",
150-
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
150+
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
151151
"build:bundle": "rimraf dist && rollup -c",
152152
"build:v1": "LIGHT_PROTOCOL_VERSION=V1 pnpm build:stateless:v1 && LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle",
153153
"build:v2": "LIGHT_PROTOCOL_VERSION=V2 pnpm build:stateless:v2 && LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle",
154154
"build:stateless:v1": "cd ../stateless.js && pnpm build:v1",
155155
"build:stateless:v2": "cd ../stateless.js && pnpm build:v2",
156-
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
156+
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
157157
"format": "prettier --write .",
158158
"lint": "eslint ."
159159
},

js/compressed-token/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const rolls = (fmt, env) => ({
3232
preventAssignment: true,
3333
values: {
3434
__BUILD_VERSION__: JSON.stringify(
35-
process.env.LIGHT_PROTOCOL_VERSION || 'V1',
35+
process.env.LIGHT_PROTOCOL_VERSION || 'V2',
3636
),
3737
},
3838
}),

js/compressed-token/src/utils/version-check.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { featureFlags, VERSION } from '@lightprotocol/stateless.js';
44
* Validates that the built version of stateless.js matches the expected version.
55
* Throws an error if there's a mismatch.
66
*
7-
* @param expectedVersion - The version expected (defaults to LIGHT_PROTOCOL_VERSION env var or V1)
7+
* @param expectedVersion - The version expected (defaults to LIGHT_PROTOCOL_VERSION env var or V2)
88
* @throws Error if the versions don't match
99
*/
1010
export function validateVersionConsistency(expectedVersion?: string): void {
1111
const expected =
12-
expectedVersion || process.env.LIGHT_PROTOCOL_VERSION || VERSION.V1;
12+
expectedVersion || process.env.LIGHT_PROTOCOL_VERSION || VERSION.V2;
1313
const actual = featureFlags.version.replace(/['"]/g, '');
1414

1515
if (actual !== expected) {

js/compressed-token/tests/setup/version-check.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default function setup() {
66

77
try {
88
validateVersionConsistency();
9-
const expectedVersion = process.env.LIGHT_PROTOCOL_VERSION || 'V1';
9+
const expectedVersion = process.env.LIGHT_PROTOCOL_VERSION || 'V2';
1010
console.log(`✅ Version check passed: Using ${expectedVersion}`);
1111
} catch (error) {
1212
console.error('❌ Version check failed:');

js/compressed-token/tests/unit/version.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { featureFlags, VERSION } from '@lightprotocol/stateless.js';
44
describe('Versioning', () => {
55
beforeAll(() => {
66
const expectedVersion =
7-
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V1;
7+
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V2;
88
const actualVersion = featureFlags.version.replace(/['"]/g, '');
99

1010
if (actualVersion !== expectedVersion) {
@@ -36,7 +36,7 @@ describe('Versioning', () => {
3636

3737
it('should respect LIGHT_PROTOCOL_VERSION environment variable', () => {
3838
const expectedVersion =
39-
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V1;
39+
process.env.LIGHT_PROTOCOL_VERSION || VERSION.V2;
4040
const actualVersion = featureFlags.version.replace(/['"]/g, '');
4141
expect(actualVersion).toBe(expectedVersion);
4242
});
@@ -51,12 +51,12 @@ describe('Versioning', () => {
5151
const actualVersion = featureFlags.version.replace(/['"]/g, '');
5252
const isV2 = featureFlags.isV2();
5353

54-
if (process.env.LIGHT_PROTOCOL_VERSION === 'V2') {
55-
expect(actualVersion).toBe(VERSION.V2);
56-
expect(isV2).toBe(true);
57-
} else {
54+
if (process.env.LIGHT_PROTOCOL_VERSION === 'V1') {
5855
expect(actualVersion).toBe(VERSION.V1);
5956
expect(isV2).toBe(false);
57+
} else {
58+
expect(actualVersion).toBe(VERSION.V2);
59+
expect(isV2).toBe(true);
6060
}
6161
});
6262
});

js/stateless.js/CHANGELOG.md

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

3+
## [0.23.0-beta.10]
4+
5+
### Breaking Changes
6+
7+
- 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`.
8+
9+
### Changed
10+
11+
- 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).
12+
313
## [0.22.0] - 2025-06-16
414

515
### Breaking Changes

js/stateless.js/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightprotocol/stateless.js",
3-
"version": "0.23.0-beta.8",
3+
"version": "0.23.0-beta.10",
44
"description": "JavaScript API for Light & ZK Compression",
55
"sideEffects": false,
66
"main": "dist/cjs/node/index.cjs",
@@ -110,11 +110,11 @@
110110
"test:verbose": "vitest run --reporter=verbose",
111111
"test:testnet": "vitest run tests/e2e/testnet.test.ts --reporter=verbose",
112112
"pull-idls": "../../scripts/push-stateless-js-idls.sh && ../../scripts/push-compressed-token-idl.sh",
113-
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
113+
"build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
114114
"build:bundle": "rimraf dist && rollup -c",
115115
"build:v1": "LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle",
116116
"build:v2": "LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle",
117-
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
117+
"build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; fi",
118118
"format": "prettier --write .",
119119
"lint": "eslint ."
120120
}

js/stateless.js/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const rolls = (fmt, env) => ({
2323
preventAssignment: true,
2424
values: {
2525
__BUILD_VERSION__: JSON.stringify(
26-
process.env.LIGHT_PROTOCOL_VERSION || 'V1',
26+
process.env.LIGHT_PROTOCOL_VERSION || 'V2',
2727
),
2828
},
2929
}),

0 commit comments

Comments
 (0)