@lightprotocol/zk-compression-cli 0.20.4 → 0.22.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
@@ -1,6 +1,7 @@
1
1
  import { Command } from "@oclif/core";
2
2
  declare class SetupCommand extends Command {
3
3
  static description: string;
4
+ static examples: string[];
4
5
  protected finally(_: Error | undefined): Promise<any>;
5
6
  static flags: {
6
7
  "skip-indexer": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -16,6 +17,8 @@ declare class SetupCommand extends Command {
16
17
  "limit-ledger-size": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
17
18
  "gossip-host": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
18
19
  stop: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
+ "geyser-config": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ "validator-args": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
22
  };
20
23
  run(): Promise<void>;
21
24
  }
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  const core_1 = require("@oclif/core");
4
5
  const initTestEnv_1 = require("../../utils/initTestEnv");
5
6
  const index_1 = require("../../utils/index");
7
+ const path_1 = tslib_1.__importDefault(require("path"));
8
+ const fs_1 = tslib_1.__importDefault(require("fs"));
6
9
  class SetupCommand extends core_1.Command {
7
10
  finally(_) {
8
11
  process.exit();
@@ -11,6 +14,12 @@ class SetupCommand extends core_1.Command {
11
14
  const { flags } = await this.parse(SetupCommand);
12
15
  const loader = new index_1.CustomLoader("Performing setup tasks...\n");
13
16
  loader.start();
17
+ if (flags["geyser-config"]) {
18
+ const configPath = path_1.default.resolve(flags["geyser-config"]);
19
+ if (!fs_1.default.existsSync(configPath)) {
20
+ this.error(`Geyser config file not found: ${configPath}`);
21
+ }
22
+ }
14
23
  if (flags["stop"] === true) {
15
24
  await (0, initTestEnv_1.stopTestEnv)({
16
25
  indexer: !flags["skip-indexer"],
@@ -32,12 +41,20 @@ class SetupCommand extends core_1.Command {
32
41
  skipSystemAccounts: flags["skip-system-accounts"],
33
42
  proverRunMode: flags["prover-run-mode"],
34
43
  circuits: flags["circuit"],
44
+ geyserConfig: flags["geyser-config"],
45
+ validatorArgs: flags["validator-args"],
35
46
  });
36
47
  this.log("\nSetup tasks completed successfully \x1b[32m✔\x1b[0m");
37
48
  }
38
49
  }
39
50
  }
40
- SetupCommand.description = "Perform setup tasks";
51
+ SetupCommand.description = "Start a local test setup with: Solana test validator, Photon indexer, and Light prover";
52
+ SetupCommand.examples = [
53
+ "$ light test-validator",
54
+ "$ light test-validator --skip-indexer",
55
+ "$ light test-validator --geyser-config ./config.json",
56
+ '$ light test-validator --validator-args "--limit-ledger-size 50000000"',
57
+ ];
41
58
  SetupCommand.flags = {
42
59
  "skip-indexer": core_1.Flags.boolean({
43
60
  description: "Runs a test validator without starting a new indexer.",
@@ -120,5 +137,14 @@ SetupCommand.flags = {
120
137
  required: false,
121
138
  default: false,
122
139
  }),
140
+ "geyser-config": core_1.Flags.string({
141
+ description: "Path to Geyser plugin config.",
142
+ required: false,
143
+ }),
144
+ "validator-args": core_1.Flags.string({
145
+ description: "Additional arguments to pass directly to solana-test-validator. Only use if you know what you are doing.",
146
+ required: false,
147
+ exclusive: ["geyser-config"],
148
+ }),
123
149
  };
124
150
  exports.default = SetupCommand;
@@ -2,7 +2,7 @@ export declare function stopTestEnv(options: {
2
2
  indexer: boolean;
3
3
  prover: boolean;
4
4
  }): Promise<void>;
5
- export declare function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer, prover, rpcPort, indexerPort, proverPort, gossipHost, checkPhotonVersion, photonDatabaseUrl, limitLedgerSize, proverRunMode, circuits, }: {
5
+ export declare function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer, prover, rpcPort, indexerPort, proverPort, gossipHost, checkPhotonVersion, photonDatabaseUrl, limitLedgerSize, proverRunMode, circuits, geyserConfig, validatorArgs, }: {
6
6
  additionalPrograms?: {
7
7
  address: string;
8
8
  path: string;
@@ -19,8 +19,10 @@ export declare function initTestEnv({ additionalPrograms, skipSystemAccounts, in
19
19
  limitLedgerSize?: number;
20
20
  proverRunMode?: "inclusion" | "non-inclusion" | "forester" | "forester-test" | "rpc" | "full" | "full-test";
21
21
  circuits?: string[];
22
+ validatorArgs?: string;
23
+ geyserConfig?: string;
22
24
  }): Promise<void>;
23
- export declare function initTestEnvIfNeeded({ additionalPrograms, skipSystemAccounts, indexer, prover, }?: {
25
+ export declare function initTestEnvIfNeeded({ additionalPrograms, skipSystemAccounts, indexer, prover, geyserConfig, validatorArgs, }?: {
24
26
  additionalPrograms?: {
25
27
  address: string;
26
28
  path: string;
@@ -28,6 +30,8 @@ export declare function initTestEnvIfNeeded({ additionalPrograms, skipSystemAcco
28
30
  skipSystemAccounts?: boolean;
29
31
  indexer?: boolean;
30
32
  prover?: boolean;
33
+ geyserConfig?: string;
34
+ validatorArgs?: string;
31
35
  }): Promise<void>;
32
36
  export declare function programsDirPath(): string;
33
37
  export declare function programFilePath(programName: string): string;
@@ -42,7 +46,7 @@ export declare function getSolanaArgs({ additionalPrograms, skipSystemAccounts,
42
46
  gossipHost?: string;
43
47
  downloadBinaries?: boolean;
44
48
  }): Promise<Array<string>>;
45
- export declare function startTestValidator({ additionalPrograms, skipSystemAccounts, limitLedgerSize, rpcPort, gossipHost, }: {
49
+ export declare function startTestValidator({ additionalPrograms, skipSystemAccounts, limitLedgerSize, rpcPort, gossipHost, validatorArgs, geyserConfig, }: {
46
50
  additionalPrograms?: {
47
51
  address: string;
48
52
  path: string;
@@ -51,5 +55,7 @@ export declare function startTestValidator({ additionalPrograms, skipSystemAccou
51
55
  limitLedgerSize?: number;
52
56
  rpcPort?: number;
53
57
  gossipHost?: string;
58
+ validatorArgs?: string;
59
+ geyserConfig?: string;
54
60
  }): Promise<void>;
55
61
  export declare function killTestValidator(): Promise<void>;
@@ -42,7 +42,7 @@ async function stopTestEnv(options) {
42
42
  await Promise.all(killPromises);
43
43
  console.log("All specified processes and validator stopped.");
44
44
  }
45
- async function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer = true, prover = true, rpcPort = 8899, indexerPort = 8784, proverPort = 3001, gossipHost = "127.0.0.1", checkPhotonVersion = true, photonDatabaseUrl, limitLedgerSize, proverRunMode, circuits, }) {
45
+ async function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer = true, prover = true, rpcPort = 8899, indexerPort = 8784, proverPort = 3001, gossipHost = "127.0.0.1", checkPhotonVersion = true, photonDatabaseUrl, limitLedgerSize, proverRunMode, circuits, geyserConfig, validatorArgs, }) {
46
46
  // We cannot await this promise directly because it will hang the process
47
47
  startTestValidator({
48
48
  additionalPrograms,
@@ -50,6 +50,8 @@ async function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer = t
50
50
  limitLedgerSize,
51
51
  rpcPort,
52
52
  gossipHost,
53
+ validatorArgs,
54
+ geyserConfig,
53
55
  });
54
56
  await (0, process_1.waitForServers)([{ port: rpcPort, path: "/health" }]);
55
57
  await (0, process_1.confirmServerStability)(`http://127.0.0.1:${rpcPort}/health`);
@@ -66,7 +68,7 @@ async function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer = t
66
68
  await (0, processProverServer_1.startProver)(proverPort, proverRunMode, circuits);
67
69
  }
68
70
  }
69
- async function initTestEnvIfNeeded({ additionalPrograms, skipSystemAccounts, indexer = false, prover = false, } = {}) {
71
+ async function initTestEnvIfNeeded({ additionalPrograms, skipSystemAccounts, indexer = false, prover = false, geyserConfig, validatorArgs, } = {}) {
70
72
  try {
71
73
  const anchorProvider = await (0, utils_1.setAnchorProvider)();
72
74
  // this request will fail if there is no local test validator running
@@ -80,6 +82,8 @@ async function initTestEnvIfNeeded({ additionalPrograms, skipSystemAccounts, ind
80
82
  skipSystemAccounts,
81
83
  indexer,
82
84
  prover,
85
+ geyserConfig,
86
+ validatorArgs,
83
87
  });
84
88
  }
85
89
  }
@@ -181,7 +185,7 @@ async function getSolanaArgs({ additionalPrograms, skipSystemAccounts, limitLedg
181
185
  }
182
186
  return solanaArgs;
183
187
  }
184
- async function startTestValidator({ additionalPrograms, skipSystemAccounts, limitLedgerSize, rpcPort, gossipHost, }) {
188
+ async function startTestValidator({ additionalPrograms, skipSystemAccounts, limitLedgerSize, rpcPort, gossipHost, validatorArgs, geyserConfig, }) {
185
189
  const command = "solana-test-validator";
186
190
  const solanaArgs = await getSolanaArgs({
187
191
  additionalPrograms,
@@ -192,6 +196,14 @@ async function startTestValidator({ additionalPrograms, skipSystemAccounts, limi
192
196
  });
193
197
  await killTestValidator();
194
198
  await new Promise((r) => setTimeout(r, 1000));
199
+ // Add geyser config if provided
200
+ if (geyserConfig) {
201
+ solanaArgs.push("--geyser-plugin-config", geyserConfig);
202
+ }
203
+ // Add custom validator args last
204
+ if (validatorArgs) {
205
+ solanaArgs.push(...validatorArgs.split(" "));
206
+ }
195
207
  console.log("Starting test validator...");
196
208
  await (0, process_1.executeCommand)({
197
209
  command,
@@ -1,190 +1,206 @@
1
1
  {
2
2
  "commands": {
3
- "approve-and-mint-to": {
3
+ "balance": {
4
4
  "aliases": [],
5
5
  "args": {},
6
6
  "examples": [
7
- "$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
7
+ "$ light balance --mint=<ADDRESS> --owner=<ADDRESS>"
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,
10
+ "owner": {
11
+ "description": "Address of the compressed token owner.",
12
+ "name": "owner",
13
+ "required": true,
14
14
  "hasDynamicHelp": false,
15
15
  "multiple": false,
16
16
  "type": "option"
17
17
  },
18
18
  "mint": {
19
- "description": "Specify the mint address.",
19
+ "description": "Mint address of the compressed token account.",
20
20
  "name": "mint",
21
21
  "required": true,
22
22
  "hasDynamicHelp": false,
23
23
  "multiple": false,
24
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
25
  }
42
26
  },
43
27
  "hasDynamicHelp": false,
44
28
  "hiddenAliases": [],
45
- "id": "approve-and-mint-to",
29
+ "id": "balance",
46
30
  "pluginAlias": "@lightprotocol/zk-compression-cli",
47
31
  "pluginName": "@lightprotocol/zk-compression-cli",
48
32
  "pluginType": "core",
49
33
  "strict": true,
50
- "summary": "Mint tokens to a compressed account via external mint authority",
34
+ "summary": "Get balance",
51
35
  "enableJsonFlag": false,
52
36
  "isESM": false,
53
37
  "relativePath": [
54
38
  "dist",
55
39
  "commands",
56
- "approve-and-mint-to",
40
+ "balance",
57
41
  "index.js"
58
42
  ]
59
43
  },
60
- "balance": {
44
+ "approve-and-mint-to": {
61
45
  "aliases": [],
62
46
  "args": {},
63
47
  "examples": [
64
- "$ light balance --mint=<ADDRESS> --owner=<ADDRESS>"
48
+ "$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
65
49
  ],
66
50
  "flags": {
67
- "owner": {
68
- "description": "Address of the compressed token owner.",
69
- "name": "owner",
70
- "required": true,
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,
71
55
  "hasDynamicHelp": false,
72
56
  "multiple": false,
73
57
  "type": "option"
74
58
  },
75
59
  "mint": {
76
- "description": "Mint address of the compressed token account.",
60
+ "description": "Specify the mint address.",
77
61
  "name": "mint",
78
62
  "required": true,
79
63
  "hasDynamicHelp": false,
80
64
  "multiple": false,
81
65
  "type": "option"
66
+ },
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 mint, in tokens.",
77
+ "name": "amount",
78
+ "required": true,
79
+ "hasDynamicHelp": false,
80
+ "multiple": false,
81
+ "type": "option"
82
82
  }
83
83
  },
84
84
  "hasDynamicHelp": false,
85
85
  "hiddenAliases": [],
86
- "id": "balance",
86
+ "id": "approve-and-mint-to",
87
87
  "pluginAlias": "@lightprotocol/zk-compression-cli",
88
88
  "pluginName": "@lightprotocol/zk-compression-cli",
89
89
  "pluginType": "core",
90
90
  "strict": true,
91
- "summary": "Get balance",
91
+ "summary": "Mint tokens to a compressed account via external mint authority",
92
92
  "enableJsonFlag": false,
93
93
  "isESM": false,
94
94
  "relativePath": [
95
95
  "dist",
96
96
  "commands",
97
- "balance",
97
+ "approve-and-mint-to",
98
98
  "index.js"
99
99
  ]
100
100
  },
101
- "compress-spl": {
101
+ "config:config": {
102
102
  "aliases": [],
103
103
  "args": {},
104
+ "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",
104
105
  "examples": [
105
- "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
106
+ "$ light config --solanaRpcUrl https://solana-api.example.com"
106
107
  ],
107
108
  "flags": {
108
- "mint": {
109
- "description": "Specify the mint address.",
110
- "name": "mint",
111
- "required": true,
109
+ "solanaRpcUrl": {
110
+ "description": "Solana RPC url",
111
+ "name": "solanaRpcUrl",
112
112
  "hasDynamicHelp": false,
113
113
  "multiple": false,
114
114
  "type": "option"
115
115
  },
116
- "to": {
117
- "description": "Specify the recipient address (owner of destination compressed token account).",
118
- "name": "to",
119
- "required": true,
116
+ "indexerUrl": {
117
+ "description": "Indexer url",
118
+ "name": "indexerUrl",
120
119
  "hasDynamicHelp": false,
121
120
  "multiple": false,
122
121
  "type": "option"
123
122
  },
124
- "amount": {
125
- "description": "Amount to compress, in tokens.",
126
- "name": "amount",
127
- "required": true,
123
+ "proverUrl": {
124
+ "description": "Prover url",
125
+ "name": "proverUrl",
128
126
  "hasDynamicHelp": false,
129
127
  "multiple": false,
130
128
  "type": "option"
129
+ },
130
+ "get": {
131
+ "description": "Gets the current config values",
132
+ "name": "get",
133
+ "required": false,
134
+ "allowNo": false,
135
+ "type": "boolean"
131
136
  }
132
137
  },
133
138
  "hasDynamicHelp": false,
134
139
  "hiddenAliases": [],
135
- "id": "compress-spl",
140
+ "id": "config:config",
136
141
  "pluginAlias": "@lightprotocol/zk-compression-cli",
137
142
  "pluginName": "@lightprotocol/zk-compression-cli",
138
143
  "pluginType": "core",
139
144
  "strict": true,
140
- "summary": "Compress SPL tokens.",
141
145
  "enableJsonFlag": false,
142
146
  "isESM": false,
143
147
  "relativePath": [
144
148
  "dist",
145
149
  "commands",
146
- "compress-spl",
150
+ "config",
147
151
  "index.js"
148
152
  ]
149
153
  },
150
- "compress-sol": {
154
+ "config": {
151
155
  "aliases": [],
152
156
  "args": {},
157
+ "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",
153
158
  "examples": [
154
- "$ light compress-sol --to PublicKey --amount 10"
159
+ "$ light config --solanaRpcUrl https://solana-api.example.com"
155
160
  ],
156
161
  "flags": {
157
- "to": {
158
- "description": "Specify the recipient address.",
159
- "name": "to",
160
- "required": true,
162
+ "solanaRpcUrl": {
163
+ "description": "Solana RPC url",
164
+ "name": "solanaRpcUrl",
161
165
  "hasDynamicHelp": false,
162
166
  "multiple": false,
163
167
  "type": "option"
164
168
  },
165
- "amount": {
166
- "description": "Amount to compress, in lamports.",
167
- "name": "amount",
168
- "required": true,
169
+ "indexerUrl": {
170
+ "description": "Indexer url",
171
+ "name": "indexerUrl",
172
+ "hasDynamicHelp": false,
173
+ "multiple": false,
174
+ "type": "option"
175
+ },
176
+ "proverUrl": {
177
+ "description": "Prover url",
178
+ "name": "proverUrl",
169
179
  "hasDynamicHelp": false,
170
180
  "multiple": false,
171
181
  "type": "option"
182
+ },
183
+ "get": {
184
+ "description": "Gets the current config values",
185
+ "name": "get",
186
+ "required": false,
187
+ "allowNo": false,
188
+ "type": "boolean"
172
189
  }
173
190
  },
174
191
  "hasDynamicHelp": false,
175
192
  "hiddenAliases": [],
176
- "id": "compress-sol",
193
+ "id": "config",
177
194
  "pluginAlias": "@lightprotocol/zk-compression-cli",
178
195
  "pluginName": "@lightprotocol/zk-compression-cli",
179
196
  "pluginType": "core",
180
197
  "strict": true,
181
- "summary": "Compress SOL.",
182
198
  "enableJsonFlag": false,
183
199
  "isESM": false,
184
200
  "relativePath": [
185
201
  "dist",
186
202
  "commands",
187
- "compress-sol",
203
+ "config",
188
204
  "index.js"
189
205
  ]
190
206
  },
@@ -271,109 +287,93 @@
271
287
  "index.js"
272
288
  ]
273
289
  },
274
- "config:config": {
290
+ "compress-sol": {
275
291
  "aliases": [],
276
292
  "args": {},
277
- "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",
278
293
  "examples": [
279
- "$ light config --solanaRpcUrl https://solana-api.example.com"
294
+ "$ light compress-sol --to PublicKey --amount 10"
280
295
  ],
281
296
  "flags": {
282
- "solanaRpcUrl": {
283
- "description": "Solana RPC url",
284
- "name": "solanaRpcUrl",
285
- "hasDynamicHelp": false,
286
- "multiple": false,
287
- "type": "option"
288
- },
289
- "indexerUrl": {
290
- "description": "Indexer url",
291
- "name": "indexerUrl",
297
+ "to": {
298
+ "description": "Specify the recipient address.",
299
+ "name": "to",
300
+ "required": true,
292
301
  "hasDynamicHelp": false,
293
302
  "multiple": false,
294
303
  "type": "option"
295
304
  },
296
- "proverUrl": {
297
- "description": "Prover url",
298
- "name": "proverUrl",
305
+ "amount": {
306
+ "description": "Amount to compress, in lamports.",
307
+ "name": "amount",
308
+ "required": true,
299
309
  "hasDynamicHelp": false,
300
310
  "multiple": false,
301
311
  "type": "option"
302
- },
303
- "get": {
304
- "description": "Gets the current config values",
305
- "name": "get",
306
- "required": false,
307
- "allowNo": false,
308
- "type": "boolean"
309
312
  }
310
313
  },
311
314
  "hasDynamicHelp": false,
312
315
  "hiddenAliases": [],
313
- "id": "config:config",
316
+ "id": "compress-sol",
314
317
  "pluginAlias": "@lightprotocol/zk-compression-cli",
315
318
  "pluginName": "@lightprotocol/zk-compression-cli",
316
319
  "pluginType": "core",
317
320
  "strict": true,
321
+ "summary": "Compress SOL.",
318
322
  "enableJsonFlag": false,
319
323
  "isESM": false,
320
324
  "relativePath": [
321
325
  "dist",
322
326
  "commands",
323
- "config",
327
+ "compress-sol",
324
328
  "index.js"
325
329
  ]
326
330
  },
327
- "config": {
331
+ "compress-spl": {
328
332
  "aliases": [],
329
333
  "args": {},
330
- "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",
331
334
  "examples": [
332
- "$ light config --solanaRpcUrl https://solana-api.example.com"
335
+ "$ light compress-spl --mint PublicKey --to PublicKey --amount 10"
333
336
  ],
334
337
  "flags": {
335
- "solanaRpcUrl": {
336
- "description": "Solana RPC url",
337
- "name": "solanaRpcUrl",
338
+ "mint": {
339
+ "description": "Specify the mint address.",
340
+ "name": "mint",
341
+ "required": true,
338
342
  "hasDynamicHelp": false,
339
343
  "multiple": false,
340
344
  "type": "option"
341
345
  },
342
- "indexerUrl": {
343
- "description": "Indexer url",
344
- "name": "indexerUrl",
346
+ "to": {
347
+ "description": "Specify the recipient address (owner of destination compressed token account).",
348
+ "name": "to",
349
+ "required": true,
345
350
  "hasDynamicHelp": false,
346
351
  "multiple": false,
347
352
  "type": "option"
348
353
  },
349
- "proverUrl": {
350
- "description": "Prover url",
351
- "name": "proverUrl",
354
+ "amount": {
355
+ "description": "Amount to compress, in tokens.",
356
+ "name": "amount",
357
+ "required": true,
352
358
  "hasDynamicHelp": false,
353
359
  "multiple": false,
354
360
  "type": "option"
355
- },
356
- "get": {
357
- "description": "Gets the current config values",
358
- "name": "get",
359
- "required": false,
360
- "allowNo": false,
361
- "type": "boolean"
362
361
  }
363
362
  },
364
363
  "hasDynamicHelp": false,
365
364
  "hiddenAliases": [],
366
- "id": "config",
365
+ "id": "compress-spl",
367
366
  "pluginAlias": "@lightprotocol/zk-compression-cli",
368
367
  "pluginName": "@lightprotocol/zk-compression-cli",
369
368
  "pluginType": "core",
370
369
  "strict": true,
370
+ "summary": "Compress SPL tokens.",
371
371
  "enableJsonFlag": false,
372
372
  "isESM": false,
373
373
  "relativePath": [
374
374
  "dist",
375
375
  "commands",
376
- "config",
376
+ "compress-spl",
377
377
  "index.js"
378
378
  ]
379
379
  },
@@ -662,7 +662,13 @@
662
662
  "test-validator": {
663
663
  "aliases": [],
664
664
  "args": {},
665
- "description": "Perform setup tasks",
665
+ "description": "Start a local test setup with: Solana test validator, Photon indexer, and Light prover",
666
+ "examples": [
667
+ "$ light test-validator",
668
+ "$ light test-validator --skip-indexer",
669
+ "$ light test-validator --geyser-config ./config.json",
670
+ "$ light test-validator --validator-args \"--limit-ledger-size 50000000\""
671
+ ],
666
672
  "flags": {
667
673
  "skip-indexer": {
668
674
  "description": "Runs a test validator without starting a new indexer.",
@@ -797,6 +803,25 @@
797
803
  "required": false,
798
804
  "allowNo": false,
799
805
  "type": "boolean"
806
+ },
807
+ "geyser-config": {
808
+ "description": "Path to Geyser plugin config.",
809
+ "name": "geyser-config",
810
+ "required": false,
811
+ "hasDynamicHelp": false,
812
+ "multiple": false,
813
+ "type": "option"
814
+ },
815
+ "validator-args": {
816
+ "description": "Additional arguments to pass directly to solana-test-validator. Only use if you know what you are doing.",
817
+ "exclusive": [
818
+ "geyser-config"
819
+ ],
820
+ "name": "validator-args",
821
+ "required": false,
822
+ "hasDynamicHelp": false,
823
+ "multiple": false,
824
+ "type": "option"
800
825
  }
801
826
  },
802
827
  "hasDynamicHelp": false,
@@ -873,5 +898,5 @@
873
898
  ]
874
899
  }
875
900
  },
876
- "version": "0.20.4"
901
+ "version": "0.22.0"
877
902
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/zk-compression-cli",
3
- "version": "0.20.4",
3
+ "version": "0.22.0",
4
4
  "description": "ZK Compression: Secure Scaling on Solana",
5
5
  "maintainers": [
6
6
  {
@@ -41,7 +41,7 @@
41
41
  "@oclif/plugin-not-found": "^3.1.2",
42
42
  "@oclif/plugin-plugins": "^5.0.7",
43
43
  "@solana-developers/helpers": "^1.5.1",
44
- "@solana/web3.js": "^1.95.3",
44
+ "@solana/web3.js": "1.95.3",
45
45
  "axios": "^1.6.8",
46
46
  "case-anything": "^2.1.13",
47
47
  "cli-progress": "^3.12.0",
@@ -55,9 +55,9 @@
55
55
  "tweetnacl": "^1.0.3",
56
56
  "wait-on": "^7.2.0",
57
57
  "which": "^4.0.0",
58
- "@lightprotocol/compressed-token": "0.15.4",
58
+ "@lightprotocol/compressed-token": "0.16.0",
59
59
  "@lightprotocol/hasher.rs": "0.2.0",
60
- "@lightprotocol/stateless.js": "0.15.4"
60
+ "@lightprotocol/stateless.js": "0.16.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@oclif/test": "2.3.9",