@lightprotocol/compressed-token 0.22.1-alpha.0 → 0.22.1-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/compressed-token",
3
- "version": "0.22.1-alpha.0",
3
+ "version": "0.22.1-alpha.3",
4
4
  "description": "JS client to interact with the compressed-token program",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/node/index.cjs",
@@ -11,10 +11,20 @@
11
11
  "types": "./dist/types/index.d.ts",
12
12
  "default": "./dist/cjs/node/index.cjs"
13
13
  },
14
+ "./unified": {
15
+ "require": "./dist/cjs/node/unified/index.cjs",
16
+ "types": "./dist/types/unified/index.d.ts",
17
+ "default": "./dist/cjs/node/unified/index.cjs"
18
+ },
14
19
  "./browser": {
15
20
  "import": "./dist/es/browser/index.js",
16
21
  "require": "./dist/cjs/browser/index.cjs",
17
22
  "types": "./dist/types/index.d.ts"
23
+ },
24
+ "./browser/unified": {
25
+ "import": "./dist/es/browser/unified/index.js",
26
+ "require": "./dist/cjs/browser/unified/index.cjs",
27
+ "types": "./dist/types/unified/index.d.ts"
18
28
  }
19
29
  },
20
30
  "types": "./dist/types/index.d.ts",
@@ -29,18 +39,21 @@
29
39
  ],
30
40
  "license": "Apache-2.0",
31
41
  "peerDependencies": {
42
+ "@coral-xyz/borsh": "^0.29.0",
32
43
  "@solana/spl-token": ">=0.3.9",
33
44
  "@solana/web3.js": ">=1.73.5",
34
- "@lightprotocol/stateless.js": "0.22.1-alpha.0"
45
+ "@lightprotocol/stateless.js": "0.22.1-alpha.2"
35
46
  },
36
47
  "dependencies": {
37
- "@coral-xyz/borsh": "^0.29.0",
48
+ "@solana/buffer-layout": "^4.0.1",
49
+ "@solana/buffer-layout-utils": "^0.2.0",
38
50
  "bn.js": "^5.2.1",
39
51
  "buffer": "6.0.3"
40
52
  },
41
53
  "devDependencies": {
42
54
  "@coral-xyz/anchor": "^0.29.0",
43
55
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
56
+ "@eslint/js": "9.36.0",
44
57
  "@lightprotocol/hasher.rs": "0.2.1",
45
58
  "@rollup/plugin-alias": "^5.1.0",
46
59
  "@rollup/plugin-babel": "^6.0.4",
@@ -51,14 +64,14 @@
51
64
  "@rollup/plugin-terser": "^0.4.4",
52
65
  "@rollup/plugin-typescript": "^11.1.6",
53
66
  "@solana/spl-token": "0.4.8",
54
- "@solana/web3.js": "1.98.0",
67
+ "@solana/web3.js": "1.98.4",
55
68
  "@types/bn.js": "^5.1.5",
56
69
  "@types/node": "^22.5.5",
57
- "@typescript-eslint/eslint-plugin": "^7.13.1",
58
- "@typescript-eslint/parser": "^7.13.1",
70
+ "@typescript-eslint/eslint-plugin": "^8.44.0",
71
+ "@typescript-eslint/parser": "^8.44.0",
59
72
  "add": "^2.0.6",
60
73
  "crypto-browserify": "^3.12.0",
61
- "eslint": "^8.56.0",
74
+ "eslint": "^9.36.0",
62
75
  "eslint-plugin-import": "^2.30.0",
63
76
  "eslint-plugin-n": "^17.10.2",
64
77
  "eslint-plugin-promise": "^7.1.0",
@@ -73,8 +86,7 @@
73
86
  "ts-node": "^10.9.2",
74
87
  "tslib": "^2.7.0",
75
88
  "typescript": "^5.6.2",
76
- "vitest": "^2.1.1",
77
- "@lightprotocol/programs": "0.3.0"
89
+ "vitest": "^2.1.1"
78
90
  },
79
91
  "keywords": [
80
92
  "zk",
@@ -91,13 +103,25 @@
91
103
  "{workspaceRoot}/target/idl",
92
104
  "{workspaceRoot}/target/types"
93
105
  ]
106
+ },
107
+ "build-ci": {
108
+ "dependsOn": [
109
+ "@lightprotocol/stateless.js:build-ci"
110
+ ]
111
+ },
112
+ "test-ci": {
113
+ "dependsOn": [
114
+ "@lightprotocol/stateless.js:test-ci"
115
+ ]
94
116
  }
95
117
  }
96
118
  },
97
119
  "scripts": {
98
- "test": "pnpm test:e2e:all",
99
- "test:v1": "LIGHT_PROTOCOL_VERSION=V1 pnpm test",
100
- "test:v2": "LIGHT_PROTOCOL_VERSION=V2 pnpm test",
120
+ "test": "pnpm test:e2e:legacy:all",
121
+ "test-ci": "pnpm test:v1 && pnpm test:v2 && LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all",
122
+ "test:v1": "pnpm build:v1 && LIGHT_PROTOCOL_VERSION=V1 vitest run tests/unit && LIGHT_PROTOCOL_VERSION=V1 pnpm test:e2e:legacy:all",
123
+ "test:v2": "pnpm build:v2 && LIGHT_PROTOCOL_VERSION=V2 vitest run tests/unit && LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:legacy:all",
124
+ "test:v2:ctoken": "pnpm build:v2 && LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all",
101
125
  "test-all": "vitest run",
102
126
  "test:unit:all": "EXCLUDE_E2E=true vitest run",
103
127
  "test:unit:all:v1": "LIGHT_PROTOCOL_VERSION=V1 vitest run tests/unit --reporter=verbose",
@@ -106,6 +130,14 @@
106
130
  "test-validator": "./../../cli/test_bin/run test-validator",
107
131
  "test-validator-skip-prover": "./../../cli/test_bin/run test-validator --skip-prover",
108
132
  "test:e2e:create-mint": "pnpm test-validator && NODE_OPTIONS='--trace-deprecation' vitest run tests/e2e/create-mint.test.ts --reporter=verbose",
133
+ "test:e2e:create-compressed-mint": "pnpm test-validator && vitest run tests/e2e/create-compressed-mint.test.ts --reporter=verbose --bail=1",
134
+ "test:e2e:create-associated-ctoken": "pnpm test-validator && vitest run tests/e2e/create-associated-ctoken.test.ts --reporter=verbose",
135
+ "test:e2e:mint-to-ctoken": "pnpm test-validator && vitest run tests/e2e/mint-to-ctoken.test.ts --reporter=verbose",
136
+ "test:e2e:mint-to-compressed": "pnpm test-validator && vitest run tests/e2e/mint-to-compressed.test.ts --reporter=verbose",
137
+ "test:e2e:mint-to-interface": "pnpm test-validator && vitest run tests/e2e/mint-to-interface.test.ts --reporter=verbose",
138
+ "test:e2e:mint-workflow": "pnpm test-validator && vitest run tests/e2e/mint-workflow.test.ts --reporter=verbose",
139
+ "test:e2e:update-mint": "pnpm test-validator && vitest run tests/e2e/update-mint.test.ts --reporter=verbose",
140
+ "test:e2e:update-metadata": "pnpm test-validator && vitest run tests/e2e/update-metadata.test.ts --reporter=verbose",
109
141
  "test:e2e:layout": "vitest run tests/e2e/layout.test.ts --reporter=verbose --bail=1",
110
142
  "test:e2e:select-accounts": "vitest run tests/e2e/select-accounts.test.ts --reporter=verbose",
111
143
  "test:e2e:create-token-pool": "pnpm test-validator && vitest run tests/e2e/create-token-pool.test.ts",
@@ -119,10 +151,21 @@
119
151
  "test:e2e:compress-spl-token-account": "pnpm test-validator && vitest run tests/e2e/compress-spl-token-account.test.ts --reporter=verbose",
120
152
  "test:e2e:decompress": "pnpm test-validator && vitest run tests/e2e/decompress.test.ts --reporter=verbose",
121
153
  "test:e2e:decompress-delegated": "pnpm test-validator && vitest run tests/e2e/decompress-delegated.test.ts --reporter=verbose",
154
+ "test:e2e:decompress2": "pnpm test-validator && vitest run tests/e2e/decompress2.test.ts --reporter=verbose",
122
155
  "test:e2e:rpc-token-interop": "pnpm test-validator && vitest run tests/e2e/rpc-token-interop.test.ts --reporter=verbose",
123
156
  "test:e2e:rpc-multi-trees": "pnpm test-validator && vitest run tests/e2e/rpc-multi-trees.test.ts --reporter=verbose",
124
157
  "test:e2e:multi-pool": "pnpm test-validator && vitest run tests/e2e/multi-pool.test.ts --reporter=verbose",
125
- "test:e2e:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/delegate.test.ts && vitest run tests/e2e/transfer-delegated.test.ts && vitest run tests/e2e/multi-pool.test.ts && vitest run tests/e2e/decompress-delegated.test.ts && pnpm test-validator-skip-prover && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/compress-spl-token-account.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/create-token-pool.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts && vitest run tests/e2e/rpc-token-interop.test.ts && vitest run tests/e2e/rpc-multi-trees.test.ts && vitest run tests/e2e/layout.test.ts && vitest run tests/e2e/select-accounts.test.ts",
158
+ "test:e2e:legacy:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/delegate.test.ts && vitest run tests/e2e/transfer-delegated.test.ts && vitest run tests/e2e/multi-pool.test.ts && vitest run tests/e2e/decompress-delegated.test.ts && pnpm test-validator-skip-prover && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/compress-spl-token-account.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/create-token-pool.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts && vitest run tests/e2e/rpc-token-interop.test.ts && vitest run tests/e2e/rpc-multi-trees.test.ts && vitest run tests/e2e/layout.test.ts && vitest run tests/e2e/select-accounts.test.ts",
159
+ "test:e2e:wrap": "pnpm test-validator && vitest run tests/e2e/wrap.test.ts --reporter=verbose",
160
+ "test:e2e:get-mint-interface": "pnpm test-validator && vitest run tests/e2e/get-mint-interface.test.ts --reporter=verbose",
161
+ "test:e2e:get-or-create-ata-interface": "pnpm test-validator && vitest run tests/e2e/get-or-create-ata-interface.test.ts --reporter=verbose",
162
+ "test:e2e:get-account-interface": "pnpm test-validator && vitest run tests/e2e/get-account-interface.test.ts --reporter=verbose",
163
+ "test:e2e:load-ata-standard": "pnpm test-validator && vitest run tests/e2e/load-ata-standard.test.ts --reporter=verbose",
164
+ "test:e2e:load-ata-unified": "pnpm test-validator && vitest run tests/e2e/load-ata-unified.test.ts --reporter=verbose",
165
+ "test:e2e:load-ata-combined": "pnpm test-validator && vitest run tests/e2e/load-ata-combined.test.ts --reporter=verbose",
166
+ "test:e2e:load-ata-spl-t22": "pnpm test-validator && vitest run tests/e2e/load-ata-spl-t22.test.ts --reporter=verbose",
167
+ "test:e2e:load-ata:all": "pnpm test-validator && vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1",
168
+ "test:e2e:ctoken:all": "pnpm test-validator && vitest run tests/e2e/create-compressed-mint.test.ts --bail=1 && vitest run tests/e2e/create-associated-ctoken.test.ts --bail=1 && vitest run tests/e2e/mint-to-ctoken.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/mint-to-compressed.test.ts --bail=1 && vitest run tests/e2e/mint-to-interface.test.ts --bail=1 && vitest run tests/e2e/mint-workflow.test.ts --bail=1 && vitest run tests/e2e/update-mint.test.ts --bail=1 && vitest run tests/e2e/update-metadata.test.ts --bail=1 && vitest run tests/e2e/compressible-load.test.ts --bail=1 && vitest run tests/e2e/wrap.test.ts --bail=1 && vitest run tests/e2e/get-mint-interface.test.ts --bail=1 && vitest run tests/e2e/get-account-interface.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1",
126
169
  "pull-idl": "../../scripts/push-compressed-token-idl.sh",
127
170
  "build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
128
171
  "build:bundle": "rimraf dist && rollup -c",
@@ -130,6 +173,7 @@
130
173
  "build:v2": "LIGHT_PROTOCOL_VERSION=V2 pnpm build:stateless:v2 && LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle",
131
174
  "build:stateless:v1": "cd ../stateless.js && pnpm build:v1",
132
175
  "build:stateless:v2": "cd ../stateless.js && pnpm build:v2",
176
+ "build-ci": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",
133
177
  "format": "prettier --write .",
134
178
  "lint": "eslint ."
135
179
  }