@lightprotocol/zk-compression-cli 0.19.3 → 0.20.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
Binary file
Binary file
Binary file
Binary file
@@ -39,9 +39,11 @@ StartProver.flags = {
39
39
  "append-with-proofs",
40
40
  "append-with-subtrees",
41
41
  "update",
42
+ "address-append",
42
43
  "append-with-proofs-test",
43
44
  "append-with-subtrees-test",
44
45
  "update-test",
46
+ "address-append-test",
45
47
  ],
46
48
  multiple: true,
47
49
  required: false,
@@ -12,7 +12,7 @@ export declare const CARGO_GENERATE_TAG = "v0.18.4";
12
12
  export declare const SOLANA_VALIDATOR_PROCESS_NAME = "solana-test-validator";
13
13
  export declare const LIGHT_PROVER_PROCESS_NAME = "light-prover";
14
14
  export declare const INDEXER_PROCESS_NAME = "photon";
15
- export declare const PHOTON_VERSION = "0.47.0";
15
+ export declare const PHOTON_VERSION = "0.50.0";
16
16
  export declare const LIGHT_PROTOCOL_PROGRAMS_DIR_ENV = "LIGHT_PROTOCOL_PROGRAMS_DIR";
17
17
  export declare const BASE_PATH = "../../bin/";
18
18
  export declare const PROGRAM_ID = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS";
@@ -17,7 +17,7 @@ exports.CARGO_GENERATE_TAG = "v0.18.4";
17
17
  exports.SOLANA_VALIDATOR_PROCESS_NAME = "solana-test-validator";
18
18
  exports.LIGHT_PROVER_PROCESS_NAME = "light-prover";
19
19
  exports.INDEXER_PROCESS_NAME = "photon";
20
- exports.PHOTON_VERSION = "0.47.0";
20
+ exports.PHOTON_VERSION = "0.50.0";
21
21
  exports.LIGHT_PROTOCOL_PROGRAMS_DIR_ENV = "LIGHT_PROTOCOL_PROGRAMS_DIR";
22
22
  exports.BASE_PATH = "../../bin/";
23
23
  exports.PROGRAM_ID = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS";
@@ -192,7 +192,7 @@ async function startTestValidator({ additionalPrograms, skipSystemAccounts, limi
192
192
  });
193
193
  await killTestValidator();
194
194
  await new Promise((r) => setTimeout(r, 1000));
195
- console.log("Starting test validator...", command);
195
+ console.log("Starting test validator...");
196
196
  await (0, process_1.executeCommand)({
197
197
  command,
198
198
  args: [...solanaArgs],
@@ -77,7 +77,6 @@ async function executeCommand({ command, args, additionalPath, logFile = true, e
77
77
  }
78
78
  logStream = fs_1.default.createWriteStream(file, { flags: "a" });
79
79
  }
80
- console.log(`Executing command: ${fullCommand}`);
81
80
  let childProcess;
82
81
  try {
83
82
  childProcess = (0, child_process_1.spawn)(fullCommand, [], options);
@@ -165,8 +164,8 @@ async function waitForServers(servers) {
165
164
  const opts = {
166
165
  resources: servers.map(({ port, path }) => `http-get://127.0.0.1:${port}${path}`),
167
166
  delay: 1000,
168
- timeout: 25000,
169
- interval: 300,
167
+ timeout: 300000,
168
+ interval: 1000,
170
169
  simultaneous: 2,
171
170
  validateStatus: function (status) {
172
171
  return ((status >= 200 && status < 300) || status === 404 || status === 405);
@@ -25,7 +25,6 @@ async function startProver(proverPort, runMode, circuits = []) {
25
25
  args.push("--run-mode", runMode);
26
26
  }
27
27
  for (const circuit of circuits) {
28
- console.log(`Adding circuit: ${circuit}`);
29
28
  args.push("--circuit", circuit);
30
29
  }
31
30
  if (runMode != null) {
@@ -1,62 +1,5 @@
1
1
  {
2
2
  "commands": {
3
- "approve-and-mint-to": {
4
- "aliases": [],
5
- "args": {},
6
- "examples": [
7
- "$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
8
- ],
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
- "mint": {
19
- "description": "Specify the mint address.",
20
- "name": "mint",
21
- "required": true,
22
- "hasDynamicHelp": false,
23
- "multiple": false,
24
- "type": "option"
25
- },
26
- "to": {
27
- "description": "Specify the recipient address.",
28
- "name": "to",
29
- "required": true,
30
- "hasDynamicHelp": false,
31
- "multiple": false,
32
- "type": "option"
33
- },
34
- "amount": {
35
- "description": "Amount to mint, in tokens.",
36
- "name": "amount",
37
- "required": true,
38
- "hasDynamicHelp": false,
39
- "multiple": false,
40
- "type": "option"
41
- }
42
- },
43
- "hasDynamicHelp": false,
44
- "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
3
  "balance": {
61
4
  "aliases": [],
62
5
  "args": {},
@@ -98,13 +41,21 @@
98
41
  "index.js"
99
42
  ]
100
43
  },
101
- "compress-spl": {
44
+ "approve-and-mint-to": {
102
45
  "aliases": [],
103
46
  "args": {},
104
47
  "examples": [
105
- "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
48
+ "$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
106
49
  ],
107
50
  "flags": {
51
+ "mint-authority": {
52
+ "description": "Specify the filepath of the mint authority keypair. Defaults to your local solana wallet.",
53
+ "name": "mint-authority",
54
+ "required": false,
55
+ "hasDynamicHelp": false,
56
+ "multiple": false,
57
+ "type": "option"
58
+ },
108
59
  "mint": {
109
60
  "description": "Specify the mint address.",
110
61
  "name": "mint",
@@ -114,7 +65,7 @@
114
65
  "type": "option"
115
66
  },
116
67
  "to": {
117
- "description": "Specify the recipient address (owner of destination compressed token account).",
68
+ "description": "Specify the recipient address.",
118
69
  "name": "to",
119
70
  "required": true,
120
71
  "hasDynamicHelp": false,
@@ -122,7 +73,7 @@
122
73
  "type": "option"
123
74
  },
124
75
  "amount": {
125
- "description": "Amount to compress, in tokens.",
76
+ "description": "Amount to mint, in tokens.",
126
77
  "name": "amount",
127
78
  "required": true,
128
79
  "hasDynamicHelp": false,
@@ -132,18 +83,18 @@
132
83
  },
133
84
  "hasDynamicHelp": false,
134
85
  "hiddenAliases": [],
135
- "id": "compress-spl",
86
+ "id": "approve-and-mint-to",
136
87
  "pluginAlias": "@lightprotocol/zk-compression-cli",
137
88
  "pluginName": "@lightprotocol/zk-compression-cli",
138
89
  "pluginType": "core",
139
90
  "strict": true,
140
- "summary": "Compress SPL tokens.",
91
+ "summary": "Mint tokens to a compressed account via external mint authority",
141
92
  "enableJsonFlag": false,
142
93
  "isESM": false,
143
94
  "relativePath": [
144
95
  "dist",
145
96
  "commands",
146
- "compress-spl",
97
+ "approve-and-mint-to",
147
98
  "index.js"
148
99
  ]
149
100
  },
@@ -188,6 +139,56 @@
188
139
  "index.js"
189
140
  ]
190
141
  },
142
+ "create-mint": {
143
+ "aliases": [],
144
+ "args": {},
145
+ "examples": [
146
+ "$ light create-mint --mint-decimals 5"
147
+ ],
148
+ "flags": {
149
+ "mint-keypair": {
150
+ "description": "Provide a path to a mint keypair file. Defaults to a random keypair",
151
+ "name": "mint-keypair",
152
+ "required": false,
153
+ "hasDynamicHelp": false,
154
+ "multiple": false,
155
+ "type": "option"
156
+ },
157
+ "mint-authority": {
158
+ "description": "Address of the mint authority. Defaults to the fee payer",
159
+ "name": "mint-authority",
160
+ "required": false,
161
+ "hasDynamicHelp": false,
162
+ "multiple": false,
163
+ "type": "option"
164
+ },
165
+ "mint-decimals": {
166
+ "description": "Number of base 10 digits to the right of the decimal place [default: 9]",
167
+ "name": "mint-decimals",
168
+ "required": false,
169
+ "default": 9,
170
+ "hasDynamicHelp": false,
171
+ "multiple": false,
172
+ "type": "option"
173
+ }
174
+ },
175
+ "hasDynamicHelp": false,
176
+ "hiddenAliases": [],
177
+ "id": "create-mint",
178
+ "pluginAlias": "@lightprotocol/zk-compression-cli",
179
+ "pluginName": "@lightprotocol/zk-compression-cli",
180
+ "pluginType": "core",
181
+ "strict": true,
182
+ "summary": "Create a new compressed token mint",
183
+ "enableJsonFlag": false,
184
+ "isESM": false,
185
+ "relativePath": [
186
+ "dist",
187
+ "commands",
188
+ "create-mint",
189
+ "index.js"
190
+ ]
191
+ },
191
192
  "config:config": {
192
193
  "aliases": [],
193
194
  "args": {},
@@ -294,34 +295,17 @@
294
295
  "index.js"
295
296
  ]
296
297
  },
297
- "create-mint": {
298
+ "create-token-pool": {
298
299
  "aliases": [],
299
300
  "args": {},
300
301
  "examples": [
301
- "$ light create-mint --mint-decimals 5"
302
+ "$ light create-token-pool --mint-decimals 5"
302
303
  ],
303
304
  "flags": {
304
- "mint-keypair": {
305
- "description": "Provide a path to a mint keypair file. Defaults to a random keypair",
306
- "name": "mint-keypair",
307
- "required": false,
308
- "hasDynamicHelp": false,
309
- "multiple": false,
310
- "type": "option"
311
- },
312
- "mint-authority": {
313
- "description": "Address of the mint authority. Defaults to the fee payer",
314
- "name": "mint-authority",
315
- "required": false,
316
- "hasDynamicHelp": false,
317
- "multiple": false,
318
- "type": "option"
319
- },
320
- "mint-decimals": {
321
- "description": "Number of base 10 digits to the right of the decimal place [default: 9]",
322
- "name": "mint-decimals",
323
- "required": false,
324
- "default": 9,
305
+ "mint": {
306
+ "description": "Provide a base58 encoded mint address to register",
307
+ "name": "mint",
308
+ "required": true,
325
309
  "hasDynamicHelp": false,
326
310
  "multiple": false,
327
311
  "type": "option"
@@ -329,51 +313,67 @@
329
313
  },
330
314
  "hasDynamicHelp": false,
331
315
  "hiddenAliases": [],
332
- "id": "create-mint",
316
+ "id": "create-token-pool",
333
317
  "pluginAlias": "@lightprotocol/zk-compression-cli",
334
318
  "pluginName": "@lightprotocol/zk-compression-cli",
335
319
  "pluginType": "core",
336
320
  "strict": true,
337
- "summary": "Create a new compressed token mint",
321
+ "summary": "Register an existing mint with the CompressedToken program",
338
322
  "enableJsonFlag": false,
339
323
  "isESM": false,
340
324
  "relativePath": [
341
325
  "dist",
342
326
  "commands",
343
- "create-mint",
327
+ "create-token-pool",
344
328
  "index.js"
345
329
  ]
346
330
  },
347
- "create-token-pool": {
331
+ "compress-spl": {
348
332
  "aliases": [],
349
333
  "args": {},
350
334
  "examples": [
351
- "$ light create-token-pool --mint-decimals 5"
335
+ "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
352
336
  ],
353
337
  "flags": {
354
338
  "mint": {
355
- "description": "Provide a base58 encoded mint address to register",
339
+ "description": "Specify the mint address.",
356
340
  "name": "mint",
357
341
  "required": true,
358
342
  "hasDynamicHelp": false,
359
343
  "multiple": false,
360
344
  "type": "option"
345
+ },
346
+ "to": {
347
+ "description": "Specify the recipient address (owner of destination compressed token account).",
348
+ "name": "to",
349
+ "required": true,
350
+ "hasDynamicHelp": false,
351
+ "multiple": false,
352
+ "type": "option"
353
+ },
354
+ "amount": {
355
+ "description": "Amount to compress, in tokens.",
356
+ "name": "amount",
357
+ "required": true,
358
+ "hasDynamicHelp": false,
359
+ "multiple": false,
360
+ "type": "option"
361
361
  }
362
362
  },
363
363
  "hasDynamicHelp": false,
364
364
  "hiddenAliases": [],
365
- "id": "create-token-pool",
365
+ "id": "compress-spl",
366
366
  "pluginAlias": "@lightprotocol/zk-compression-cli",
367
367
  "pluginName": "@lightprotocol/zk-compression-cli",
368
368
  "pluginType": "core",
369
369
  "strict": true,
370
- "summary": "Register an existing mint with the CompressedToken program",
370
+ "summary": "Compress SPL tokens.",
371
371
  "enableJsonFlag": false,
372
372
  "isESM": false,
373
373
  "relativePath": [
374
374
  "dist",
375
375
  "commands",
376
- "create-token-pool",
376
+ "compress-spl",
377
377
  "index.js"
378
378
  ]
379
379
  },
@@ -634,9 +634,11 @@
634
634
  "append-with-proofs",
635
635
  "append-with-subtrees",
636
636
  "update",
637
+ "address-append",
637
638
  "append-with-proofs-test",
638
639
  "append-with-subtrees-test",
639
- "update-test"
640
+ "update-test",
641
+ "address-append-test"
640
642
  ],
641
643
  "type": "option"
642
644
  }
@@ -871,5 +873,5 @@
871
873
  ]
872
874
  }
873
875
  },
874
- "version": "0.19.3"
876
+ "version": "0.20.0"
875
877
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/zk-compression-cli",
3
- "version": "0.19.3",
3
+ "version": "0.20.0",
4
4
  "description": "ZK Compression: Secure Scaling on Solana",
5
5
  "maintainers": [
6
6
  {
@@ -21,6 +21,10 @@
21
21
  "./config.json",
22
22
  "/npm-shrinkwrap.json",
23
23
  "/oclif.manifest.json",
24
+ "!bin/proving-keys/address-append_26_1.key",
25
+ "!bin/proving-keys/address-append_26_1.vkey",
26
+ "!bin/proving-keys/address-append_26_10.key",
27
+ "!bin/proving-keys/address-append_26_10.vkey",
24
28
  "!bin/proving-keys/append-with-proofs_26_10.key",
25
29
  "!bin/proving-keys/append-with-proofs_26_10.vkey",
26
30
  "!bin/proving-keys/append-with-subtrees_26_10.key",
@@ -51,9 +55,9 @@
51
55
  "tweetnacl": "^1.0.3",
52
56
  "wait-on": "^7.2.0",
53
57
  "which": "^4.0.0",
54
- "@lightprotocol/compressed-token": "0.14.3",
55
- "@lightprotocol/stateless.js": "0.14.4",
56
- "@lightprotocol/hasher.rs": "0.2.0"
58
+ "@lightprotocol/hasher.rs": "0.2.0",
59
+ "@lightprotocol/stateless.js": "0.15.0",
60
+ "@lightprotocol/compressed-token": "0.15.0"
57
61
  },
58
62
  "devDependencies": {
59
63
  "@oclif/test": "2.3.9",