@lightprotocol/zk-compression-cli 0.17.0 → 0.18.1

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -17,7 +17,6 @@ class InitCommand extends core_1.Command {
17
17
  const { name } = args;
18
18
  this.log("Initializing project...");
19
19
  await (0, exports.initRepo)(name, flags);
20
- this.log("✅ Project initialized successfully");
21
20
  }
22
21
  }
23
22
  InitCommand.description = "Initialize a compressed account project.";
@@ -39,12 +38,8 @@ const initRepo = async (name, flags) => {
39
38
  const kebabCaseName = (0, case_anything_1.kebabCase)(name);
40
39
  const snakeCaseName = (0, case_anything_1.snakeCase)(name);
41
40
  const camelCaseName = (0, case_anything_1.pascalCase)(name);
42
- let command = localFilePath;
43
- let env = { ...process.env };
44
- if (os.platform() === "darwin") {
45
- const cpathExport = 'export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include:$CPATH"';
46
- command = `${cpathExport} && ${command}`;
47
- }
41
+ const command = localFilePath;
42
+ const env = { ...process.env };
48
43
  await (0, process_1.executeCommand)({
49
44
  command,
50
45
  args: [
@@ -93,21 +88,18 @@ const initRepo = async (name, flags) => {
93
88
  logFile: true,
94
89
  env: env,
95
90
  });
91
+ console.log("✅ Project initialized successfully");
96
92
  if (os.platform() === "darwin") {
97
93
  console.log(`
98
94
  🧢 Important for macOS users 🧢
99
- ---------------------------
100
- 1. Run this command in your terminal:
101
- export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include:$CPATH"
95
+ ===============================
102
96
 
103
- 2. To persist this change:
104
- • Zsh users (default): Add the line to ~/.zshrc
105
- • Bash users: Add the line to ~/.bash_profile
97
+ Run this command in your terminal before building your project:
106
98
 
107
- 3. Apply changes:
108
- Zsh: Run 'source ~/.zshrc'
109
- • Bash: Run 'source ~/.bash_profile'
110
- `.trim());
99
+ ----------------------------------------------------------------------------------------------------
100
+ echo 'export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include:$CPATH"' >> ~/.zshrc && source ~/.zshrc
101
+ ----------------------------------------------------------------------------------------------------
102
+ `);
111
103
  }
112
104
  await (0, stateless_js_1.sleep)(1000);
113
105
  };
@@ -35,17 +35,20 @@ async function killProcessByPort(port) {
35
35
  */
36
36
  async function executeCommand({ command, args, additionalPath, logFile = true, env, }) {
37
37
  return new Promise((resolve, reject) => {
38
- const commandParts = command.split(' && ');
39
- const finalCommand = commandParts.pop() || '';
40
- const preCommands = commandParts.join(' && ');
41
- const fullCommand = preCommands ? `${preCommands} && ${finalCommand} ${args.join(' ')}` : `${finalCommand} ${args.join(' ')}`;
38
+ const commandParts = command.split(" && ");
39
+ const finalCommand = commandParts.pop() || "";
40
+ const preCommands = commandParts.join(" && ");
41
+ const fullCommand = preCommands
42
+ ? `${preCommands} && ${finalCommand} ${args.join(" ")}`
43
+ : `${finalCommand} ${args.join(" ")}`;
42
44
  const commandBase = path_1.default.basename(finalCommand);
43
45
  let stdoutData = "";
44
46
  const childPathEnv = additionalPath
45
47
  ? process.env.PATH + path_1.default.delimiter + additionalPath
46
48
  : process.env.PATH;
47
49
  const options = {
48
- env: env || (childPathEnv ? { ...process.env, PATH: childPathEnv } : process.env),
50
+ env: env ||
51
+ (childPathEnv ? { ...process.env, PATH: childPathEnv } : process.env),
49
52
  shell: true,
50
53
  detached: true,
51
54
  };
@@ -1,20 +1,12 @@
1
1
  {
2
2
  "commands": {
3
- "approve-and-mint-to": {
3
+ "compress-spl": {
4
4
  "aliases": [],
5
5
  "args": {},
6
6
  "examples": [
7
- "$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
7
+ "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
8
8
  ],
9
9
  "flags": {
10
- "mint-authority": {
11
- "description": "Specify the filepath of the mint authority keypair. Defaults to your local solana wallet.",
12
- "name": "mint-authority",
13
- "required": false,
14
- "hasDynamicHelp": false,
15
- "multiple": false,
16
- "type": "option"
17
- },
18
10
  "mint": {
19
11
  "description": "Specify the mint address.",
20
12
  "name": "mint",
@@ -24,7 +16,7 @@
24
16
  "type": "option"
25
17
  },
26
18
  "to": {
27
- "description": "Specify the recipient address.",
19
+ "description": "Specify the recipient address (owner of destination compressed token account).",
28
20
  "name": "to",
29
21
  "required": true,
30
22
  "hasDynamicHelp": false,
@@ -32,7 +24,7 @@
32
24
  "type": "option"
33
25
  },
34
26
  "amount": {
35
- "description": "Amount to mint, in tokens.",
27
+ "description": "Amount to compress, in tokens.",
36
28
  "name": "amount",
37
29
  "required": true,
38
30
  "hasDynamicHelp": false,
@@ -42,59 +34,18 @@
42
34
  },
43
35
  "hasDynamicHelp": false,
44
36
  "hiddenAliases": [],
45
- "id": "approve-and-mint-to",
46
- "pluginAlias": "@lightprotocol/zk-compression-cli",
47
- "pluginName": "@lightprotocol/zk-compression-cli",
48
- "pluginType": "core",
49
- "strict": true,
50
- "summary": "Mint tokens to a compressed account via external mint authority",
51
- "enableJsonFlag": false,
52
- "isESM": false,
53
- "relativePath": [
54
- "dist",
55
- "commands",
56
- "approve-and-mint-to",
57
- "index.js"
58
- ]
59
- },
60
- "balance": {
61
- "aliases": [],
62
- "args": {},
63
- "examples": [
64
- "$ light balance --mint=<ADDRESS> --owner=<ADDRESS>"
65
- ],
66
- "flags": {
67
- "owner": {
68
- "description": "Address of the compressed token owner.",
69
- "name": "owner",
70
- "required": true,
71
- "hasDynamicHelp": false,
72
- "multiple": false,
73
- "type": "option"
74
- },
75
- "mint": {
76
- "description": "Mint address of the compressed token account.",
77
- "name": "mint",
78
- "required": true,
79
- "hasDynamicHelp": false,
80
- "multiple": false,
81
- "type": "option"
82
- }
83
- },
84
- "hasDynamicHelp": false,
85
- "hiddenAliases": [],
86
- "id": "balance",
37
+ "id": "compress-spl",
87
38
  "pluginAlias": "@lightprotocol/zk-compression-cli",
88
39
  "pluginName": "@lightprotocol/zk-compression-cli",
89
40
  "pluginType": "core",
90
41
  "strict": true,
91
- "summary": "Get balance",
42
+ "summary": "Compress SPL tokens.",
92
43
  "enableJsonFlag": false,
93
44
  "isESM": false,
94
45
  "relativePath": [
95
46
  "dist",
96
47
  "commands",
97
- "balance",
48
+ "compress-spl",
98
49
  "index.js"
99
50
  ]
100
51
  },
@@ -254,6 +205,47 @@
254
205
  "index.js"
255
206
  ]
256
207
  },
208
+ "balance": {
209
+ "aliases": [],
210
+ "args": {},
211
+ "examples": [
212
+ "$ light balance --mint=<ADDRESS> --owner=<ADDRESS>"
213
+ ],
214
+ "flags": {
215
+ "owner": {
216
+ "description": "Address of the compressed token owner.",
217
+ "name": "owner",
218
+ "required": true,
219
+ "hasDynamicHelp": false,
220
+ "multiple": false,
221
+ "type": "option"
222
+ },
223
+ "mint": {
224
+ "description": "Mint address of the compressed token account.",
225
+ "name": "mint",
226
+ "required": true,
227
+ "hasDynamicHelp": false,
228
+ "multiple": false,
229
+ "type": "option"
230
+ }
231
+ },
232
+ "hasDynamicHelp": false,
233
+ "hiddenAliases": [],
234
+ "id": "balance",
235
+ "pluginAlias": "@lightprotocol/zk-compression-cli",
236
+ "pluginName": "@lightprotocol/zk-compression-cli",
237
+ "pluginType": "core",
238
+ "strict": true,
239
+ "summary": "Get balance",
240
+ "enableJsonFlag": false,
241
+ "isESM": false,
242
+ "relativePath": [
243
+ "dist",
244
+ "commands",
245
+ "balance",
246
+ "index.js"
247
+ ]
248
+ },
257
249
  "create-token-pool": {
258
250
  "aliases": [],
259
251
  "args": {},
@@ -287,13 +279,21 @@
287
279
  "index.js"
288
280
  ]
289
281
  },
290
- "compress-spl": {
282
+ "approve-and-mint-to": {
291
283
  "aliases": [],
292
284
  "args": {},
293
285
  "examples": [
294
- "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
286
+ "$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
295
287
  ],
296
288
  "flags": {
289
+ "mint-authority": {
290
+ "description": "Specify the filepath of the mint authority keypair. Defaults to your local solana wallet.",
291
+ "name": "mint-authority",
292
+ "required": false,
293
+ "hasDynamicHelp": false,
294
+ "multiple": false,
295
+ "type": "option"
296
+ },
297
297
  "mint": {
298
298
  "description": "Specify the mint address.",
299
299
  "name": "mint",
@@ -303,7 +303,7 @@
303
303
  "type": "option"
304
304
  },
305
305
  "to": {
306
- "description": "Specify the recipient address (owner of destination compressed token account).",
306
+ "description": "Specify the recipient address.",
307
307
  "name": "to",
308
308
  "required": true,
309
309
  "hasDynamicHelp": false,
@@ -311,7 +311,7 @@
311
311
  "type": "option"
312
312
  },
313
313
  "amount": {
314
- "description": "Amount to compress, in tokens.",
314
+ "description": "Amount to mint, in tokens.",
315
315
  "name": "amount",
316
316
  "required": true,
317
317
  "hasDynamicHelp": false,
@@ -321,26 +321,26 @@
321
321
  },
322
322
  "hasDynamicHelp": false,
323
323
  "hiddenAliases": [],
324
- "id": "compress-spl",
324
+ "id": "approve-and-mint-to",
325
325
  "pluginAlias": "@lightprotocol/zk-compression-cli",
326
326
  "pluginName": "@lightprotocol/zk-compression-cli",
327
327
  "pluginType": "core",
328
328
  "strict": true,
329
- "summary": "Compress SPL tokens.",
329
+ "summary": "Mint tokens to a compressed account via external mint authority",
330
330
  "enableJsonFlag": false,
331
331
  "isESM": false,
332
332
  "relativePath": [
333
333
  "dist",
334
334
  "commands",
335
- "compress-spl",
335
+ "approve-and-mint-to",
336
336
  "index.js"
337
337
  ]
338
338
  },
339
- "compress-sol": {
339
+ "decompress-sol": {
340
340
  "aliases": [],
341
341
  "args": {},
342
342
  "examples": [
343
- "$ light compress-sol --to PublicKey --amount 10"
343
+ "$ light decompress-sol --to PublicKey --amount 10"
344
344
  ],
345
345
  "flags": {
346
346
  "to": {
@@ -352,7 +352,7 @@
352
352
  "type": "option"
353
353
  },
354
354
  "amount": {
355
- "description": "Amount to compress, in lamports.",
355
+ "description": "Amount to decompress, in lamports.",
356
356
  "name": "amount",
357
357
  "required": true,
358
358
  "hasDynamicHelp": false,
@@ -362,26 +362,26 @@
362
362
  },
363
363
  "hasDynamicHelp": false,
364
364
  "hiddenAliases": [],
365
- "id": "compress-sol",
365
+ "id": "decompress-sol",
366
366
  "pluginAlias": "@lightprotocol/zk-compression-cli",
367
367
  "pluginName": "@lightprotocol/zk-compression-cli",
368
368
  "pluginType": "core",
369
369
  "strict": true,
370
- "summary": "Compress SOL.",
370
+ "summary": "Decompress SOL.",
371
371
  "enableJsonFlag": false,
372
372
  "isESM": false,
373
373
  "relativePath": [
374
374
  "dist",
375
375
  "commands",
376
- "compress-sol",
376
+ "decompress-sol",
377
377
  "index.js"
378
378
  ]
379
379
  },
380
- "decompress-sol": {
380
+ "compress-sol": {
381
381
  "aliases": [],
382
382
  "args": {},
383
383
  "examples": [
384
- "$ light decompress-sol --to PublicKey --amount 10"
384
+ "$ light compress-sol --to PublicKey --amount 10"
385
385
  ],
386
386
  "flags": {
387
387
  "to": {
@@ -393,7 +393,7 @@
393
393
  "type": "option"
394
394
  },
395
395
  "amount": {
396
- "description": "Amount to decompress, in lamports.",
396
+ "description": "Amount to compress, in lamports.",
397
397
  "name": "amount",
398
398
  "required": true,
399
399
  "hasDynamicHelp": false,
@@ -403,18 +403,18 @@
403
403
  },
404
404
  "hasDynamicHelp": false,
405
405
  "hiddenAliases": [],
406
- "id": "decompress-sol",
406
+ "id": "compress-sol",
407
407
  "pluginAlias": "@lightprotocol/zk-compression-cli",
408
408
  "pluginName": "@lightprotocol/zk-compression-cli",
409
409
  "pluginType": "core",
410
410
  "strict": true,
411
- "summary": "Decompress SOL.",
411
+ "summary": "Compress SOL.",
412
412
  "enableJsonFlag": false,
413
413
  "isESM": false,
414
414
  "relativePath": [
415
415
  "dist",
416
416
  "commands",
417
- "decompress-sol",
417
+ "compress-sol",
418
418
  "index.js"
419
419
  ]
420
420
  },
@@ -831,5 +831,5 @@
831
831
  ]
832
832
  }
833
833
  },
834
- "version": "0.17.0"
834
+ "version": "0.18.1"
835
835
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/zk-compression-cli",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "description": "ZK Compression: Secure Scaling on Solana",
5
5
  "maintainers": [
6
6
  {
@@ -45,8 +45,8 @@
45
45
  "wait-on": "^7.2.0",
46
46
  "which": "^4.0.0",
47
47
  "@lightprotocol/compressed-token": "0.13.0",
48
- "@lightprotocol/hasher.rs": "0.2.0",
49
- "@lightprotocol/stateless.js": "0.13.0"
48
+ "@lightprotocol/stateless.js": "0.13.0",
49
+ "@lightprotocol/hasher.rs": "0.2.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@oclif/test": "2.3.9",
Binary file
package/bin/forester DELETED
Binary file
package/bin/forester.toml DELETED
@@ -1,15 +0,0 @@
1
- CU_LIMIT=1_000_000
2
- RPC_POOL_SIZE=20
3
- MAX_RETRIES=5
4
- RETRY_DELAY=1000
5
- RETRY_TIMEOUT=120_000
6
- INDEXER_BATCH_SIZE=50
7
- INDEXER_MAX_CONCURRENT_BATCHES=50
8
- TRANSACTION_BATCH_SIZE=1
9
- TRANSACTION_MAX_CONCURRENT_BATCHES=50
10
- SLOT_UPDATE_INTERVAL_SECONDS=30
11
- TREE_DISCOVERY_INTERVAL_SECONDS=5
12
- STATE_QUEUE_START_INDEX=0
13
- STATE_QUEUE_LENGTH=28807
14
- ADDRESS_QUEUE_START_INDEX=0
15
- ADDRESS_QUEUE_LENGTH=28807