@lightprotocol/zk-compression-cli 0.18.0 → 0.19.0

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
@@ -38,8 +38,8 @@ const initRepo = async (name, flags) => {
38
38
  const kebabCaseName = (0, case_anything_1.kebabCase)(name);
39
39
  const snakeCaseName = (0, case_anything_1.snakeCase)(name);
40
40
  const camelCaseName = (0, case_anything_1.pascalCase)(name);
41
- let command = localFilePath;
42
- let env = { ...process.env };
41
+ const command = localFilePath;
42
+ const env = { ...process.env };
43
43
  await (0, process_1.executeCommand)({
44
44
  command,
45
45
  args: [
@@ -20,8 +20,8 @@ export declare const ANCHOR_VERSION = "0.29.0";
20
20
  export declare const BORSH_VERSION = "0.9.2";
21
21
  export declare const LIGHT_HASHER_VERSION = "1.1.0";
22
22
  export declare const LIGHT_MACROS_VERSION = "1.1.0";
23
- export declare const LIGHT_SDK_VERSION = "0.10.0";
24
- export declare const LIGHT_SDK_MACROS_VERSION = "0.3.0";
23
+ export declare const LIGHT_SDK_VERSION = "0.11.0";
24
+ export declare const LIGHT_SDK_MACROS_VERSION = "0.4.0";
25
25
  export declare const LIGHT_UTILS_VERSION = "1.1.0";
26
26
  export declare const LIGHT_VERIFIER_VERSION = "1.1.0";
27
27
  export declare const SOLANA_SDK_VERSION = "1.18.22";
@@ -25,8 +25,8 @@ exports.ANCHOR_VERSION = "0.29.0";
25
25
  exports.BORSH_VERSION = "0.9.2";
26
26
  exports.LIGHT_HASHER_VERSION = "1.1.0";
27
27
  exports.LIGHT_MACROS_VERSION = "1.1.0";
28
- exports.LIGHT_SDK_VERSION = "0.10.0";
29
- exports.LIGHT_SDK_MACROS_VERSION = "0.3.0";
28
+ exports.LIGHT_SDK_VERSION = "0.11.0";
29
+ exports.LIGHT_SDK_MACROS_VERSION = "0.4.0";
30
30
  exports.LIGHT_UTILS_VERSION = "1.1.0";
31
31
  exports.LIGHT_VERIFIER_VERSION = "1.1.0";
32
32
  exports.SOLANA_SDK_VERSION = "1.18.22";
@@ -15,6 +15,7 @@ const find_process_1 = tslib_1.__importDefault(require("find-process"));
15
15
  const node_child_process_1 = require("node:child_process");
16
16
  const util_1 = require("util");
17
17
  const axios_1 = tslib_1.__importDefault(require("axios"));
18
+ const shellQuote = tslib_1.__importStar(require("shell-quote"));
18
19
  const waitOn = require("wait-on");
19
20
  async function killProcess(processName) {
20
21
  const processList = await (0, find_process_1.default)("name", processName);
@@ -24,7 +25,8 @@ async function killProcess(processName) {
24
25
  });
25
26
  }
26
27
  async function killProcessByPort(port) {
27
- await execute(`lsof -t -i:${port} | while read line; do kill -9 $line; done`);
28
+ const portArg = shellQuote.quote([`-i:${port}`]);
29
+ await execute(`lsof -t ${portArg} | while read line; do kill -9 $line; done`);
28
30
  }
29
31
  /**
30
32
  * Executes a command and logs the output to the console.
@@ -35,17 +37,20 @@ async function killProcessByPort(port) {
35
37
  */
36
38
  async function executeCommand({ command, args, additionalPath, logFile = true, env, }) {
37
39
  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(' ')}`;
40
+ const commandParts = command.split(" && ");
41
+ const finalCommand = commandParts.pop() || "";
42
+ const preCommands = commandParts.join(" && ");
43
+ const fullCommand = preCommands
44
+ ? `${preCommands} && ${finalCommand} ${args.join(" ")}`
45
+ : `${finalCommand} ${args.join(" ")}`;
42
46
  const commandBase = path_1.default.basename(finalCommand);
43
47
  let stdoutData = "";
44
48
  const childPathEnv = additionalPath
45
49
  ? process.env.PATH + path_1.default.delimiter + additionalPath
46
50
  : process.env.PATH;
47
51
  const options = {
48
- env: env || (childPathEnv ? { ...process.env, PATH: childPathEnv } : process.env),
52
+ env: env ||
53
+ (childPathEnv ? { ...process.env, PATH: childPathEnv } : process.env),
49
54
  shell: true,
50
55
  detached: true,
51
56
  };
@@ -57,6 +57,47 @@
57
57
  "index.js"
58
58
  ]
59
59
  },
60
+ "compress-sol": {
61
+ "aliases": [],
62
+ "args": {},
63
+ "examples": [
64
+ "$ light compress-sol --to PublicKey --amount 10"
65
+ ],
66
+ "flags": {
67
+ "to": {
68
+ "description": "Specify the recipient address.",
69
+ "name": "to",
70
+ "required": true,
71
+ "hasDynamicHelp": false,
72
+ "multiple": false,
73
+ "type": "option"
74
+ },
75
+ "amount": {
76
+ "description": "Amount to compress, in lamports.",
77
+ "name": "amount",
78
+ "required": true,
79
+ "hasDynamicHelp": false,
80
+ "multiple": false,
81
+ "type": "option"
82
+ }
83
+ },
84
+ "hasDynamicHelp": false,
85
+ "hiddenAliases": [],
86
+ "id": "compress-sol",
87
+ "pluginAlias": "@lightprotocol/zk-compression-cli",
88
+ "pluginName": "@lightprotocol/zk-compression-cli",
89
+ "pluginType": "core",
90
+ "strict": true,
91
+ "summary": "Compress SOL.",
92
+ "enableJsonFlag": false,
93
+ "isESM": false,
94
+ "relativePath": [
95
+ "dist",
96
+ "commands",
97
+ "compress-sol",
98
+ "index.js"
99
+ ]
100
+ },
60
101
  "balance": {
61
102
  "aliases": [],
62
103
  "args": {},
@@ -147,39 +188,6 @@
147
188
  "index.js"
148
189
  ]
149
190
  },
150
- "create-token-pool": {
151
- "aliases": [],
152
- "args": {},
153
- "examples": [
154
- "$ light create-token-pool --mint-decimals 5"
155
- ],
156
- "flags": {
157
- "mint": {
158
- "description": "Provide a base58 encoded mint address to register",
159
- "name": "mint",
160
- "required": true,
161
- "hasDynamicHelp": false,
162
- "multiple": false,
163
- "type": "option"
164
- }
165
- },
166
- "hasDynamicHelp": false,
167
- "hiddenAliases": [],
168
- "id": "create-token-pool",
169
- "pluginAlias": "@lightprotocol/zk-compression-cli",
170
- "pluginName": "@lightprotocol/zk-compression-cli",
171
- "pluginType": "core",
172
- "strict": true,
173
- "summary": "Register an existing mint with the CompressedToken program",
174
- "enableJsonFlag": false,
175
- "isESM": false,
176
- "relativePath": [
177
- "dist",
178
- "commands",
179
- "create-token-pool",
180
- "index.js"
181
- ]
182
- },
183
191
  "create-mint": {
184
192
  "aliases": [],
185
193
  "args": {},
@@ -230,24 +238,16 @@
230
238
  "index.js"
231
239
  ]
232
240
  },
233
- "compress-sol": {
241
+ "create-token-pool": {
234
242
  "aliases": [],
235
243
  "args": {},
236
244
  "examples": [
237
- "$ light compress-sol --to PublicKey --amount 10"
245
+ "$ light create-token-pool --mint-decimals 5"
238
246
  ],
239
247
  "flags": {
240
- "to": {
241
- "description": "Specify the recipient address.",
242
- "name": "to",
243
- "required": true,
244
- "hasDynamicHelp": false,
245
- "multiple": false,
246
- "type": "option"
247
- },
248
- "amount": {
249
- "description": "Amount to compress, in lamports.",
250
- "name": "amount",
248
+ "mint": {
249
+ "description": "Provide a base58 encoded mint address to register",
250
+ "name": "mint",
251
251
  "required": true,
252
252
  "hasDynamicHelp": false,
253
253
  "multiple": false,
@@ -256,18 +256,18 @@
256
256
  },
257
257
  "hasDynamicHelp": false,
258
258
  "hiddenAliases": [],
259
- "id": "compress-sol",
259
+ "id": "create-token-pool",
260
260
  "pluginAlias": "@lightprotocol/zk-compression-cli",
261
261
  "pluginName": "@lightprotocol/zk-compression-cli",
262
262
  "pluginType": "core",
263
263
  "strict": true,
264
- "summary": "Compress SOL.",
264
+ "summary": "Register an existing mint with the CompressedToken program",
265
265
  "enableJsonFlag": false,
266
266
  "isESM": false,
267
267
  "relativePath": [
268
268
  "dist",
269
269
  "commands",
270
- "compress-sol",
270
+ "create-token-pool",
271
271
  "index.js"
272
272
  ]
273
273
  },
@@ -831,5 +831,5 @@
831
831
  ]
832
832
  }
833
833
  },
834
- "version": "0.18.0"
834
+ "version": "0.19.0"
835
835
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/zk-compression-cli",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "ZK Compression: Secure Scaling on Solana",
5
5
  "maintainers": [
6
6
  {
@@ -31,6 +31,7 @@
31
31
  "@oclif/plugin-plugins": "^5.0.7",
32
32
  "@solana-developers/helpers": "^1.5.1",
33
33
  "@solana/web3.js": "^1.95.3",
34
+ "@types/shell-quote": "^1.7.5",
34
35
  "axios": "^1.6.8",
35
36
  "case-anything": "^2.1.13",
36
37
  "cli-progress": "^3.12.0",
@@ -44,9 +45,9 @@
44
45
  "tweetnacl": "^1.0.3",
45
46
  "wait-on": "^7.2.0",
46
47
  "which": "^4.0.0",
47
- "@lightprotocol/stateless.js": "0.13.0",
48
- "@lightprotocol/compressed-token": "0.13.0",
49
- "@lightprotocol/hasher.rs": "0.2.0"
48
+ "@lightprotocol/compressed-token": "0.14.0",
49
+ "@lightprotocol/hasher.rs": "0.2.0",
50
+ "@lightprotocol/stateless.js": "0.14.1"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@oclif/test": "2.3.9",