@lightprotocol/zk-compression-cli 0.4.1 → 0.4.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/README.md CHANGED
@@ -88,6 +88,35 @@ solana balance
88
88
 
89
89
  Now you're all set up to run CLI commands :)
90
90
 
91
+ #### Using ZK Testnet
92
+
93
+ By default, the CLI interacts with localnet. You can view the current config by running:
94
+
95
+ ```bash
96
+ light config --get
97
+ ```
98
+
99
+ To switch to ZK Testnet, run:
100
+
101
+ ```bash
102
+ light config --indexerUrl "https://zk-testnet.helius.dev:8784" \
103
+ --proverUrl "https://zk-testnet.helius.dev:3001" \
104
+ --solanaRpcUrl "https://zk-testnet.helius.dev:8899"
105
+ ```
106
+
107
+ Also adjust your solana config:
108
+
109
+ ```bash
110
+ # Set config
111
+ solana config set --url "https://zk-testnet.helius.dev:8899"
112
+
113
+ # Airdrop 1 SOL
114
+ solana airdrop 1
115
+
116
+ # Print your address
117
+ solana address
118
+ ```
119
+
91
120
  ### Commands
92
121
 
93
122
  #### Create a compressed token mint
Binary file
package/bin/forester CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -12,7 +12,7 @@ async function startIndexer(rpcUrl, indexerPort, checkPhotonVersion = true, phot
12
12
  const resolvedOrNull = which_1.default.sync("photon", { nothrow: true });
13
13
  if (resolvedOrNull === null ||
14
14
  (checkPhotonVersion && !(await isExpectedPhotonVersion(constants_1.PHOTON_VERSION)))) {
15
- const message = `Photon indexer not found. Please install it by running "cargo install photon-indexer --version ${constants_1.PHOTON_VERSION}"`;
15
+ const message = `Photon indexer not found. Please install it by running "cargo install photon-indexer --version ${constants_1.PHOTON_VERSION} --locked"`;
16
16
  console.log(message);
17
17
  throw new Error(message);
18
18
  }
@@ -98,25 +98,34 @@
98
98
  "index.js"
99
99
  ]
100
100
  },
101
- "compress-sol": {
101
+ "create-mint": {
102
102
  "aliases": [],
103
103
  "args": {},
104
104
  "examples": [
105
- "$ light compress-sol --to PublicKey --amount 10"
105
+ "$ light create-mint --mint-decimals 5"
106
106
  ],
107
107
  "flags": {
108
- "to": {
109
- "description": "Specify the recipient address.",
110
- "name": "to",
111
- "required": true,
108
+ "mint-keypair": {
109
+ "description": "Provide a path to a mint keypair file. Defaults to a random keypair",
110
+ "name": "mint-keypair",
111
+ "required": false,
112
112
  "hasDynamicHelp": false,
113
113
  "multiple": false,
114
114
  "type": "option"
115
115
  },
116
- "amount": {
117
- "description": "Amount to compress, in lamports.",
118
- "name": "amount",
119
- "required": true,
116
+ "mint-authority": {
117
+ "description": "Address of the mint authority. Defaults to the fee payer",
118
+ "name": "mint-authority",
119
+ "required": false,
120
+ "hasDynamicHelp": false,
121
+ "multiple": false,
122
+ "type": "option"
123
+ },
124
+ "mint-decimals": {
125
+ "description": "Number of base 10 digits to the right of the decimal place [default: 9]",
126
+ "name": "mint-decimals",
127
+ "required": false,
128
+ "default": 9,
120
129
  "hasDynamicHelp": false,
121
130
  "multiple": false,
122
131
  "type": "option"
@@ -124,117 +133,124 @@
124
133
  },
125
134
  "hasDynamicHelp": false,
126
135
  "hiddenAliases": [],
127
- "id": "compress-sol",
136
+ "id": "create-mint",
128
137
  "pluginAlias": "@lightprotocol/zk-compression-cli",
129
138
  "pluginName": "@lightprotocol/zk-compression-cli",
130
139
  "pluginType": "core",
131
140
  "strict": true,
132
- "summary": "Compress SOL.",
141
+ "summary": "Create a new compressed token mint",
133
142
  "enableJsonFlag": false,
134
143
  "isESM": false,
135
144
  "relativePath": [
136
145
  "dist",
137
146
  "commands",
138
- "compress-sol",
147
+ "create-mint",
139
148
  "index.js"
140
149
  ]
141
150
  },
142
- "compress-spl": {
151
+ "config:config": {
143
152
  "aliases": [],
144
153
  "args": {},
154
+ "description": "Initialize or update the configuration values. The default config path is ~/.config/light/config.json you can set up a custom path with an environment variable export LIGHT_PROTOCOL_CONFIG=path/to/config.json",
145
155
  "examples": [
146
- "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
156
+ "$ light config --solanaRpcUrl https://solana-api.example.com"
147
157
  ],
148
158
  "flags": {
149
- "mint": {
150
- "description": "Specify the mint address.",
151
- "name": "mint",
152
- "required": true,
159
+ "solanaRpcUrl": {
160
+ "description": "Solana RPC url",
161
+ "name": "solanaRpcUrl",
153
162
  "hasDynamicHelp": false,
154
163
  "multiple": false,
155
164
  "type": "option"
156
165
  },
157
- "to": {
158
- "description": "Specify the recipient address (owner of destination compressed token account).",
159
- "name": "to",
160
- "required": true,
166
+ "indexerUrl": {
167
+ "description": "Indexer url",
168
+ "name": "indexerUrl",
161
169
  "hasDynamicHelp": false,
162
170
  "multiple": false,
163
171
  "type": "option"
164
172
  },
165
- "amount": {
166
- "description": "Amount to compress, in tokens.",
167
- "name": "amount",
168
- "required": true,
173
+ "proverUrl": {
174
+ "description": "Prover url",
175
+ "name": "proverUrl",
169
176
  "hasDynamicHelp": false,
170
177
  "multiple": false,
171
178
  "type": "option"
179
+ },
180
+ "get": {
181
+ "description": "Gets the current config values",
182
+ "name": "get",
183
+ "required": false,
184
+ "allowNo": false,
185
+ "type": "boolean"
172
186
  }
173
187
  },
174
188
  "hasDynamicHelp": false,
175
189
  "hiddenAliases": [],
176
- "id": "compress-spl",
190
+ "id": "config:config",
177
191
  "pluginAlias": "@lightprotocol/zk-compression-cli",
178
192
  "pluginName": "@lightprotocol/zk-compression-cli",
179
193
  "pluginType": "core",
180
194
  "strict": true,
181
- "summary": "Compress SPL tokens.",
182
195
  "enableJsonFlag": false,
183
196
  "isESM": false,
184
197
  "relativePath": [
185
198
  "dist",
186
199
  "commands",
187
- "compress-spl",
200
+ "config",
188
201
  "index.js"
189
202
  ]
190
203
  },
191
- "create-mint": {
204
+ "config": {
192
205
  "aliases": [],
193
206
  "args": {},
207
+ "description": "Initialize or update the configuration values. The default config path is ~/.config/light/config.json you can set up a custom path with an environment variable export LIGHT_PROTOCOL_CONFIG=path/to/config.json",
194
208
  "examples": [
195
- "$ light create-mint --mint-decimals 5"
209
+ "$ light config --solanaRpcUrl https://solana-api.example.com"
196
210
  ],
197
211
  "flags": {
198
- "mint-keypair": {
199
- "description": "Provide a path to a mint keypair file. Defaults to a random keypair",
200
- "name": "mint-keypair",
201
- "required": false,
212
+ "solanaRpcUrl": {
213
+ "description": "Solana RPC url",
214
+ "name": "solanaRpcUrl",
202
215
  "hasDynamicHelp": false,
203
216
  "multiple": false,
204
217
  "type": "option"
205
218
  },
206
- "mint-authority": {
207
- "description": "Address of the mint authority. Defaults to the fee payer",
208
- "name": "mint-authority",
209
- "required": false,
219
+ "indexerUrl": {
220
+ "description": "Indexer url",
221
+ "name": "indexerUrl",
210
222
  "hasDynamicHelp": false,
211
223
  "multiple": false,
212
224
  "type": "option"
213
225
  },
214
- "mint-decimals": {
215
- "description": "Number of base 10 digits to the right of the decimal place [default: 9]",
216
- "name": "mint-decimals",
217
- "required": false,
218
- "default": 9,
226
+ "proverUrl": {
227
+ "description": "Prover url",
228
+ "name": "proverUrl",
219
229
  "hasDynamicHelp": false,
220
230
  "multiple": false,
221
231
  "type": "option"
232
+ },
233
+ "get": {
234
+ "description": "Gets the current config values",
235
+ "name": "get",
236
+ "required": false,
237
+ "allowNo": false,
238
+ "type": "boolean"
222
239
  }
223
240
  },
224
241
  "hasDynamicHelp": false,
225
242
  "hiddenAliases": [],
226
- "id": "create-mint",
243
+ "id": "config",
227
244
  "pluginAlias": "@lightprotocol/zk-compression-cli",
228
245
  "pluginName": "@lightprotocol/zk-compression-cli",
229
246
  "pluginType": "core",
230
247
  "strict": true,
231
- "summary": "Create a new compressed token mint",
232
248
  "enableJsonFlag": false,
233
249
  "isESM": false,
234
250
  "relativePath": [
235
251
  "dist",
236
252
  "commands",
237
- "create-mint",
253
+ "config",
238
254
  "index.js"
239
255
  ]
240
256
  },
@@ -279,109 +295,93 @@
279
295
  "index.js"
280
296
  ]
281
297
  },
282
- "config:config": {
298
+ "compress-spl": {
283
299
  "aliases": [],
284
300
  "args": {},
285
- "description": "Initialize or update the configuration values. The default config path is ~/.config/light/config.json you can set up a custom path with an environment variable export LIGHT_PROTOCOL_CONFIG=path/to/config.json",
286
301
  "examples": [
287
- "$ light config --solanaRpcUrl https://solana-api.example.com"
302
+ "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
288
303
  ],
289
304
  "flags": {
290
- "solanaRpcUrl": {
291
- "description": "Solana RPC url",
292
- "name": "solanaRpcUrl",
305
+ "mint": {
306
+ "description": "Specify the mint address.",
307
+ "name": "mint",
308
+ "required": true,
293
309
  "hasDynamicHelp": false,
294
310
  "multiple": false,
295
311
  "type": "option"
296
312
  },
297
- "indexerUrl": {
298
- "description": "Indexer url",
299
- "name": "indexerUrl",
313
+ "to": {
314
+ "description": "Specify the recipient address (owner of destination compressed token account).",
315
+ "name": "to",
316
+ "required": true,
300
317
  "hasDynamicHelp": false,
301
318
  "multiple": false,
302
319
  "type": "option"
303
320
  },
304
- "proverUrl": {
305
- "description": "Prover url",
306
- "name": "proverUrl",
321
+ "amount": {
322
+ "description": "Amount to compress, in tokens.",
323
+ "name": "amount",
324
+ "required": true,
307
325
  "hasDynamicHelp": false,
308
326
  "multiple": false,
309
327
  "type": "option"
310
- },
311
- "get": {
312
- "description": "Gets the current config values",
313
- "name": "get",
314
- "required": false,
315
- "allowNo": false,
316
- "type": "boolean"
317
328
  }
318
329
  },
319
330
  "hasDynamicHelp": false,
320
331
  "hiddenAliases": [],
321
- "id": "config:config",
332
+ "id": "compress-spl",
322
333
  "pluginAlias": "@lightprotocol/zk-compression-cli",
323
334
  "pluginName": "@lightprotocol/zk-compression-cli",
324
335
  "pluginType": "core",
325
336
  "strict": true,
337
+ "summary": "Compress SPL tokens.",
326
338
  "enableJsonFlag": false,
327
339
  "isESM": false,
328
340
  "relativePath": [
329
341
  "dist",
330
342
  "commands",
331
- "config",
343
+ "compress-spl",
332
344
  "index.js"
333
345
  ]
334
346
  },
335
- "config": {
347
+ "compress-sol": {
336
348
  "aliases": [],
337
349
  "args": {},
338
- "description": "Initialize or update the configuration values. The default config path is ~/.config/light/config.json you can set up a custom path with an environment variable export LIGHT_PROTOCOL_CONFIG=path/to/config.json",
339
350
  "examples": [
340
- "$ light config --solanaRpcUrl https://solana-api.example.com"
351
+ "$ light compress-sol --to PublicKey --amount 10"
341
352
  ],
342
353
  "flags": {
343
- "solanaRpcUrl": {
344
- "description": "Solana RPC url",
345
- "name": "solanaRpcUrl",
346
- "hasDynamicHelp": false,
347
- "multiple": false,
348
- "type": "option"
349
- },
350
- "indexerUrl": {
351
- "description": "Indexer url",
352
- "name": "indexerUrl",
354
+ "to": {
355
+ "description": "Specify the recipient address.",
356
+ "name": "to",
357
+ "required": true,
353
358
  "hasDynamicHelp": false,
354
359
  "multiple": false,
355
360
  "type": "option"
356
361
  },
357
- "proverUrl": {
358
- "description": "Prover url",
359
- "name": "proverUrl",
362
+ "amount": {
363
+ "description": "Amount to compress, in lamports.",
364
+ "name": "amount",
365
+ "required": true,
360
366
  "hasDynamicHelp": false,
361
367
  "multiple": false,
362
368
  "type": "option"
363
- },
364
- "get": {
365
- "description": "Gets the current config values",
366
- "name": "get",
367
- "required": false,
368
- "allowNo": false,
369
- "type": "boolean"
370
369
  }
371
370
  },
372
371
  "hasDynamicHelp": false,
373
372
  "hiddenAliases": [],
374
- "id": "config",
373
+ "id": "compress-sol",
375
374
  "pluginAlias": "@lightprotocol/zk-compression-cli",
376
375
  "pluginName": "@lightprotocol/zk-compression-cli",
377
376
  "pluginType": "core",
378
377
  "strict": true,
378
+ "summary": "Compress SOL.",
379
379
  "enableJsonFlag": false,
380
380
  "isESM": false,
381
381
  "relativePath": [
382
382
  "dist",
383
383
  "commands",
384
- "config",
384
+ "compress-sol",
385
385
  "index.js"
386
386
  ]
387
387
  },
@@ -762,5 +762,5 @@
762
762
  ]
763
763
  }
764
764
  },
765
- "version": "0.4.1"
765
+ "version": "0.4.3"
766
766
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/zk-compression-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "ZK Compression: Secure Scaling on Solana",
5
5
  "maintainers": [
6
6
  {
@@ -44,9 +44,9 @@
44
44
  "tweetnacl": "^1.0.3",
45
45
  "wait-on": "^7.2.0",
46
46
  "which": "^4.0.0",
47
- "@lightprotocol/compressed-token": "0.3.0",
48
- "@lightprotocol/stateless.js": "0.4.0",
49
- "@lightprotocol/hasher.rs": "0.2.0"
47
+ "@lightprotocol/compressed-token": "0.3.1",
48
+ "@lightprotocol/hasher.rs": "0.2.0",
49
+ "@lightprotocol/stateless.js": "0.4.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@oclif/test": "2.3.9",