@lightprotocol/zk-compression-cli 0.15.0 → 0.15.2
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/bin/account_compression.so +0 -0
- package/bin/{cargo-generate → forester} +0 -0
- package/bin/forester.toml +15 -0
- package/bin/light_compressed_token.so +0 -0
- package/bin/light_registry.so +0 -0
- package/bin/light_system_program.so +0 -0
- package/bin/prover-darwin-arm64 +0 -0
- package/bin/prover-darwin-x64 +0 -0
- package/bin/prover-linux-arm64 +0 -0
- package/bin/prover-linux-x64 +0 -0
- package/bin/prover-windows-arm64.exe +0 -0
- package/bin/prover-windows-x64.exe +0 -0
- package/dist/commands/init/index.js +7 -0
- package/dist/utils/process.d.ts +2 -1
- package/dist/utils/process.js +3 -2
- package/oclif.manifest.json +140 -140
- package/package.json +3 -3
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
Binary file
|
package/bin/light_registry.so
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/prover-darwin-arm64
CHANGED
|
Binary file
|
package/bin/prover-darwin-x64
CHANGED
|
Binary file
|
package/bin/prover-linux-arm64
CHANGED
|
Binary file
|
package/bin/prover-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -11,6 +11,7 @@ const psp_utils_1 = require("../../psp-utils");
|
|
|
11
11
|
const constants_1 = require("../../utils/constants");
|
|
12
12
|
const utils_1 = require("../../utils");
|
|
13
13
|
const case_anything_1 = require("case-anything");
|
|
14
|
+
const child_process_1 = require("child_process");
|
|
14
15
|
class InitCommand extends core_1.Command {
|
|
15
16
|
async run() {
|
|
16
17
|
const { args, flags } = await this.parse(InitCommand);
|
|
@@ -39,6 +40,11 @@ const initRepo = async (name, flags) => {
|
|
|
39
40
|
const kebabCaseName = (0, case_anything_1.kebabCase)(name);
|
|
40
41
|
const snakeCaseName = (0, case_anything_1.snakeCase)(name);
|
|
41
42
|
const camelCaseName = (0, case_anything_1.pascalCase)(name);
|
|
43
|
+
// Set up environment variables for macOS builds
|
|
44
|
+
if (os.platform() === "darwin") {
|
|
45
|
+
process.env.CC = (0, child_process_1.execSync)("xcrun -find clang").toString().trim();
|
|
46
|
+
process.env.SDKROOT = (0, child_process_1.execSync)("xcrun --show-sdk-path").toString().trim();
|
|
47
|
+
}
|
|
42
48
|
await (0, process_1.executeCommand)({
|
|
43
49
|
command: localFilePath,
|
|
44
50
|
args: [
|
|
@@ -85,6 +91,7 @@ const initRepo = async (name, flags) => {
|
|
|
85
91
|
`tokio-version=${constants_1.TOKIO_VERSION}`,
|
|
86
92
|
],
|
|
87
93
|
logFile: true,
|
|
94
|
+
env: process.env,
|
|
88
95
|
});
|
|
89
96
|
await (0, stateless_js_1.sleep)(1000);
|
|
90
97
|
};
|
package/dist/utils/process.d.ts
CHANGED
|
@@ -7,11 +7,12 @@ export declare function killProcessByPort(port: number): Promise<void>;
|
|
|
7
7
|
* @param additionalPath - Additional path to be added to the PATH environment
|
|
8
8
|
* variable.
|
|
9
9
|
*/
|
|
10
|
-
export declare function executeCommand({ command, args, additionalPath, logFile, }: {
|
|
10
|
+
export declare function executeCommand({ command, args, additionalPath, logFile, env, }: {
|
|
11
11
|
command: string;
|
|
12
12
|
args: string[];
|
|
13
13
|
additionalPath?: string;
|
|
14
14
|
logFile?: boolean;
|
|
15
|
+
env?: NodeJS.ProcessEnv;
|
|
15
16
|
}): Promise<string>;
|
|
16
17
|
/**
|
|
17
18
|
* Executes a shell command and returns a promise that resolves to the output of the shell command, or an error.
|
package/dist/utils/process.js
CHANGED
|
@@ -33,7 +33,7 @@ async function killProcessByPort(port) {
|
|
|
33
33
|
* @param additionalPath - Additional path to be added to the PATH environment
|
|
34
34
|
* variable.
|
|
35
35
|
*/
|
|
36
|
-
async function executeCommand({ command, args, additionalPath, logFile = true, }) {
|
|
36
|
+
async function executeCommand({ command, args, additionalPath, logFile = true, env, }) {
|
|
37
37
|
return new Promise((resolve, reject) => {
|
|
38
38
|
const commandBase = path_1.default.basename(command);
|
|
39
39
|
let stdoutData = "";
|
|
@@ -41,7 +41,8 @@ async function executeCommand({ command, args, additionalPath, logFile = true, }
|
|
|
41
41
|
? process.env.PATH + path_1.default.delimiter + additionalPath
|
|
42
42
|
: process.env.PATH;
|
|
43
43
|
const options = {
|
|
44
|
-
env:
|
|
44
|
+
env: env ||
|
|
45
|
+
(childPathEnv ? { ...process.env, PATH: childPathEnv } : process.env),
|
|
45
46
|
detached: true,
|
|
46
47
|
};
|
|
47
48
|
let logStream = null;
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,144 @@
|
|
|
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
|
+
"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",
|
|
87
|
+
"pluginAlias": "@lightprotocol/zk-compression-cli",
|
|
88
|
+
"pluginName": "@lightprotocol/zk-compression-cli",
|
|
89
|
+
"pluginType": "core",
|
|
90
|
+
"strict": true,
|
|
91
|
+
"summary": "Get balance",
|
|
92
|
+
"enableJsonFlag": false,
|
|
93
|
+
"isESM": false,
|
|
94
|
+
"relativePath": [
|
|
95
|
+
"dist",
|
|
96
|
+
"commands",
|
|
97
|
+
"balance",
|
|
98
|
+
"index.js"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"compress-sol": {
|
|
102
|
+
"aliases": [],
|
|
103
|
+
"args": {},
|
|
104
|
+
"examples": [
|
|
105
|
+
"$ light compress-sol --to PublicKey --amount 10"
|
|
106
|
+
],
|
|
107
|
+
"flags": {
|
|
108
|
+
"to": {
|
|
109
|
+
"description": "Specify the recipient address.",
|
|
110
|
+
"name": "to",
|
|
111
|
+
"required": true,
|
|
112
|
+
"hasDynamicHelp": false,
|
|
113
|
+
"multiple": false,
|
|
114
|
+
"type": "option"
|
|
115
|
+
},
|
|
116
|
+
"amount": {
|
|
117
|
+
"description": "Amount to compress, in lamports.",
|
|
118
|
+
"name": "amount",
|
|
119
|
+
"required": true,
|
|
120
|
+
"hasDynamicHelp": false,
|
|
121
|
+
"multiple": false,
|
|
122
|
+
"type": "option"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"hasDynamicHelp": false,
|
|
126
|
+
"hiddenAliases": [],
|
|
127
|
+
"id": "compress-sol",
|
|
128
|
+
"pluginAlias": "@lightprotocol/zk-compression-cli",
|
|
129
|
+
"pluginName": "@lightprotocol/zk-compression-cli",
|
|
130
|
+
"pluginType": "core",
|
|
131
|
+
"strict": true,
|
|
132
|
+
"summary": "Compress SOL.",
|
|
133
|
+
"enableJsonFlag": false,
|
|
134
|
+
"isESM": false,
|
|
135
|
+
"relativePath": [
|
|
136
|
+
"dist",
|
|
137
|
+
"commands",
|
|
138
|
+
"compress-sol",
|
|
139
|
+
"index.js"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
3
142
|
"compress-spl": {
|
|
4
143
|
"aliases": [],
|
|
5
144
|
"args": {},
|
|
@@ -205,63 +344,6 @@
|
|
|
205
344
|
"index.js"
|
|
206
345
|
]
|
|
207
346
|
},
|
|
208
|
-
"approve-and-mint-to": {
|
|
209
|
-
"aliases": [],
|
|
210
|
-
"args": {},
|
|
211
|
-
"examples": [
|
|
212
|
-
"$ light approve-and-mint-to --mint PublicKey --to PublicKey --amount 1000"
|
|
213
|
-
],
|
|
214
|
-
"flags": {
|
|
215
|
-
"mint-authority": {
|
|
216
|
-
"description": "Specify the filepath of the mint authority keypair. Defaults to your local solana wallet.",
|
|
217
|
-
"name": "mint-authority",
|
|
218
|
-
"required": false,
|
|
219
|
-
"hasDynamicHelp": false,
|
|
220
|
-
"multiple": false,
|
|
221
|
-
"type": "option"
|
|
222
|
-
},
|
|
223
|
-
"mint": {
|
|
224
|
-
"description": "Specify the mint address.",
|
|
225
|
-
"name": "mint",
|
|
226
|
-
"required": true,
|
|
227
|
-
"hasDynamicHelp": false,
|
|
228
|
-
"multiple": false,
|
|
229
|
-
"type": "option"
|
|
230
|
-
},
|
|
231
|
-
"to": {
|
|
232
|
-
"description": "Specify the recipient address.",
|
|
233
|
-
"name": "to",
|
|
234
|
-
"required": true,
|
|
235
|
-
"hasDynamicHelp": false,
|
|
236
|
-
"multiple": false,
|
|
237
|
-
"type": "option"
|
|
238
|
-
},
|
|
239
|
-
"amount": {
|
|
240
|
-
"description": "Amount to mint, in tokens.",
|
|
241
|
-
"name": "amount",
|
|
242
|
-
"required": true,
|
|
243
|
-
"hasDynamicHelp": false,
|
|
244
|
-
"multiple": false,
|
|
245
|
-
"type": "option"
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
"hasDynamicHelp": false,
|
|
249
|
-
"hiddenAliases": [],
|
|
250
|
-
"id": "approve-and-mint-to",
|
|
251
|
-
"pluginAlias": "@lightprotocol/zk-compression-cli",
|
|
252
|
-
"pluginName": "@lightprotocol/zk-compression-cli",
|
|
253
|
-
"pluginType": "core",
|
|
254
|
-
"strict": true,
|
|
255
|
-
"summary": "Mint tokens to a compressed account via external mint authority",
|
|
256
|
-
"enableJsonFlag": false,
|
|
257
|
-
"isESM": false,
|
|
258
|
-
"relativePath": [
|
|
259
|
-
"dist",
|
|
260
|
-
"commands",
|
|
261
|
-
"approve-and-mint-to",
|
|
262
|
-
"index.js"
|
|
263
|
-
]
|
|
264
|
-
},
|
|
265
347
|
"create-token-pool": {
|
|
266
348
|
"aliases": [],
|
|
267
349
|
"args": {},
|
|
@@ -295,47 +377,6 @@
|
|
|
295
377
|
"index.js"
|
|
296
378
|
]
|
|
297
379
|
},
|
|
298
|
-
"balance": {
|
|
299
|
-
"aliases": [],
|
|
300
|
-
"args": {},
|
|
301
|
-
"examples": [
|
|
302
|
-
"$ light balance --mint=<ADDRESS> --owner=<ADDRESS>"
|
|
303
|
-
],
|
|
304
|
-
"flags": {
|
|
305
|
-
"owner": {
|
|
306
|
-
"description": "Address of the compressed token owner.",
|
|
307
|
-
"name": "owner",
|
|
308
|
-
"required": true,
|
|
309
|
-
"hasDynamicHelp": false,
|
|
310
|
-
"multiple": false,
|
|
311
|
-
"type": "option"
|
|
312
|
-
},
|
|
313
|
-
"mint": {
|
|
314
|
-
"description": "Mint address of the compressed token account.",
|
|
315
|
-
"name": "mint",
|
|
316
|
-
"required": true,
|
|
317
|
-
"hasDynamicHelp": false,
|
|
318
|
-
"multiple": false,
|
|
319
|
-
"type": "option"
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
"hasDynamicHelp": false,
|
|
323
|
-
"hiddenAliases": [],
|
|
324
|
-
"id": "balance",
|
|
325
|
-
"pluginAlias": "@lightprotocol/zk-compression-cli",
|
|
326
|
-
"pluginName": "@lightprotocol/zk-compression-cli",
|
|
327
|
-
"pluginType": "core",
|
|
328
|
-
"strict": true,
|
|
329
|
-
"summary": "Get balance",
|
|
330
|
-
"enableJsonFlag": false,
|
|
331
|
-
"isESM": false,
|
|
332
|
-
"relativePath": [
|
|
333
|
-
"dist",
|
|
334
|
-
"commands",
|
|
335
|
-
"balance",
|
|
336
|
-
"index.js"
|
|
337
|
-
]
|
|
338
|
-
},
|
|
339
380
|
"decompress-sol": {
|
|
340
381
|
"aliases": [],
|
|
341
382
|
"args": {},
|
|
@@ -377,47 +418,6 @@
|
|
|
377
418
|
"index.js"
|
|
378
419
|
]
|
|
379
420
|
},
|
|
380
|
-
"compress-sol": {
|
|
381
|
-
"aliases": [],
|
|
382
|
-
"args": {},
|
|
383
|
-
"examples": [
|
|
384
|
-
"$ light compress-sol --to PublicKey --amount 10"
|
|
385
|
-
],
|
|
386
|
-
"flags": {
|
|
387
|
-
"to": {
|
|
388
|
-
"description": "Specify the recipient address.",
|
|
389
|
-
"name": "to",
|
|
390
|
-
"required": true,
|
|
391
|
-
"hasDynamicHelp": false,
|
|
392
|
-
"multiple": false,
|
|
393
|
-
"type": "option"
|
|
394
|
-
},
|
|
395
|
-
"amount": {
|
|
396
|
-
"description": "Amount to compress, in lamports.",
|
|
397
|
-
"name": "amount",
|
|
398
|
-
"required": true,
|
|
399
|
-
"hasDynamicHelp": false,
|
|
400
|
-
"multiple": false,
|
|
401
|
-
"type": "option"
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
"hasDynamicHelp": false,
|
|
405
|
-
"hiddenAliases": [],
|
|
406
|
-
"id": "compress-sol",
|
|
407
|
-
"pluginAlias": "@lightprotocol/zk-compression-cli",
|
|
408
|
-
"pluginName": "@lightprotocol/zk-compression-cli",
|
|
409
|
-
"pluginType": "core",
|
|
410
|
-
"strict": true,
|
|
411
|
-
"summary": "Compress SOL.",
|
|
412
|
-
"enableJsonFlag": false,
|
|
413
|
-
"isESM": false,
|
|
414
|
-
"relativePath": [
|
|
415
|
-
"dist",
|
|
416
|
-
"commands",
|
|
417
|
-
"compress-sol",
|
|
418
|
-
"index.js"
|
|
419
|
-
]
|
|
420
|
-
},
|
|
421
421
|
"decompress-spl": {
|
|
422
422
|
"aliases": [],
|
|
423
423
|
"args": {},
|
|
@@ -831,5 +831,5 @@
|
|
|
831
831
|
]
|
|
832
832
|
}
|
|
833
833
|
},
|
|
834
|
-
"version": "0.15.
|
|
834
|
+
"version": "0.15.2"
|
|
835
835
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightprotocol/zk-compression-cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
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/
|
|
47
|
+
"@lightprotocol/hasher.rs": "0.2.0",
|
|
48
48
|
"@lightprotocol/stateless.js": "0.13.0",
|
|
49
|
-
"@lightprotocol/
|
|
49
|
+
"@lightprotocol/compressed-token": "0.13.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@oclif/test": "2.3.9",
|