@lightprotocol/zk-compression-cli 0.3.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.
- package/LICENSE +674 -0
- package/README.md +189 -0
- package/accounts/address_merkle_tree_C83cpRN6oaafjNgMQJvaYgAz592EP5wunKvbokeTKPLn.json +1 -0
- package/accounts/address_merkle_tree_queue_HNjtNrjt6irUPYEgxhx2Vcs42koK9fxzm3aFLHVaaRWz.json +1 -0
- package/accounts/governance_authority_pda_3MtrKu5Mjgh3JqeE5PeRzw2Ld28XjFgbbph67E6UERSx.json +1 -0
- package/accounts/group_pda_Edo2YjXU5eE17CejPBkupPgFLcYuAX47pGZmM7s2hAkj.json +1 -0
- package/accounts/merkle_tree_pubkey_5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W.json +1 -0
- package/accounts/nullifier_queue_pubkey_44J4oDXpjPAbzHCSc24q7NEiPekss4sAbLd8ka4gd9CZ.json +1 -0
- package/accounts/registered_program_pda_ytwwVWhQUMoTKdirKmvEW5xCRVr4B2dJZnToiHtE2L2.json +1 -0
- package/bin/account_compression.so +0 -0
- package/bin/light_compressed_pda.so +0 -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/bin/proving-keys/combined_26_1_1.key +0 -0
- package/bin/proving-keys/combined_26_1_1.vkey +1 -0
- package/bin/proving-keys/combined_26_1_2.key +0 -0
- package/bin/proving-keys/combined_26_1_2.vkey +1 -0
- package/bin/proving-keys/combined_26_2_1.key +0 -0
- package/bin/proving-keys/combined_26_2_1.vkey +1 -0
- package/bin/proving-keys/combined_26_2_2.key +0 -0
- package/bin/proving-keys/combined_26_2_2.vkey +1 -0
- package/bin/proving-keys/combined_26_3_1.key +0 -0
- package/bin/proving-keys/combined_26_3_1.vkey +1 -0
- package/bin/proving-keys/combined_26_3_2.key +0 -0
- package/bin/proving-keys/combined_26_3_2.vkey +1 -0
- package/bin/proving-keys/combined_26_4_1.key +0 -0
- package/bin/proving-keys/combined_26_4_1.vkey +1 -0
- package/bin/proving-keys/combined_26_4_2.key +0 -0
- package/bin/proving-keys/combined_26_4_2.vkey +1 -0
- package/bin/proving-keys/inclusion_26_1.key +0 -0
- package/bin/proving-keys/inclusion_26_1.vkey +1 -0
- package/bin/proving-keys/inclusion_26_2.key +0 -0
- package/bin/proving-keys/inclusion_26_2.vkey +1 -0
- package/bin/proving-keys/inclusion_26_3.key +0 -0
- package/bin/proving-keys/inclusion_26_3.vkey +1 -0
- package/bin/proving-keys/inclusion_26_4.key +0 -0
- package/bin/proving-keys/inclusion_26_4.vkey +1 -0
- package/bin/proving-keys/inclusion_26_8.key +0 -0
- package/bin/proving-keys/inclusion_26_8.vkey +1 -0
- package/bin/proving-keys/non-inclusion_26_1.key +0 -0
- package/bin/proving-keys/non-inclusion_26_1.vkey +1 -0
- package/bin/proving-keys/non-inclusion_26_2.key +0 -0
- package/bin/proving-keys/non-inclusion_26_2.vkey +1 -0
- package/bin/spl_noop.so +0 -0
- package/config.json +3 -0
- package/dist/commands/approve-and-mint-to/index.d.ts +14 -0
- package/dist/commands/approve-and-mint-to/index.js +64 -0
- package/dist/commands/balance/index.d.ts +12 -0
- package/dist/commands/balance/index.js +50 -0
- package/dist/commands/compress-sol/index.d.ts +12 -0
- package/dist/commands/compress-sol/index.js +48 -0
- package/dist/commands/compress-spl/index.d.ts +13 -0
- package/dist/commands/compress-spl/index.js +61 -0
- package/dist/commands/config/config.d.ts +11 -0
- package/dist/commands/config/config.js +69 -0
- package/dist/commands/config/index.d.ts +2 -0
- package/dist/commands/config/index.js +5 -0
- package/dist/commands/create-mint/index.d.ts +17 -0
- package/dist/commands/create-mint/index.js +67 -0
- package/dist/commands/decompress-sol/index.d.ts +12 -0
- package/dist/commands/decompress-sol/index.js +46 -0
- package/dist/commands/decompress-spl/index.d.ts +13 -0
- package/dist/commands/decompress-spl/index.js +60 -0
- package/dist/commands/mint-to/index.d.ts +14 -0
- package/dist/commands/mint-to/index.js +64 -0
- package/dist/commands/register-mint/index.d.ts +14 -0
- package/dist/commands/register-mint/index.js +50 -0
- package/dist/commands/start-prover/index.d.ts +11 -0
- package/dist/commands/start-prover/index.js +30 -0
- package/dist/commands/test-validator/index.d.ts +16 -0
- package/dist/commands/test-validator/index.js +61 -0
- package/dist/commands/transfer/index.d.ts +13 -0
- package/dist/commands/transfer/index.js +62 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/psp-utils/download.d.ts +34 -0
- package/dist/psp-utils/download.js +203 -0
- package/dist/psp-utils/index.d.ts +1 -0
- package/dist/psp-utils/index.js +4 -0
- package/dist/utils/constants.d.ts +14 -0
- package/dist/utils/constants.js +19 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/initTestEnv.d.ts +38 -0
- package/dist/utils/initTestEnv.js +171 -0
- package/dist/utils/process.d.ts +30 -0
- package/dist/utils/process.js +162 -0
- package/dist/utils/processPhotonIndexer.d.ts +1 -0
- package/dist/utils/processPhotonIndexer.js +45 -0
- package/dist/utils/processProverServer.d.ts +3 -0
- package/dist/utils/processProverServer.js +49 -0
- package/dist/utils/standardFlags.d.ts +8 -0
- package/dist/utils/standardFlags.js +36 -0
- package/dist/utils/utils.d.ts +26 -0
- package/dist/utils/utils.js +150 -0
- package/oclif.manifest.json +684 -0
- package/package.json +122 -0
- package/test_bin/dev +17 -0
- package/test_bin/run +5 -0
package/package.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lightprotocol/zk-compression-cli",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "ZK Compression: Secure Scaling on Solana",
|
|
5
|
+
"maintainers": [
|
|
6
|
+
{
|
|
7
|
+
"name": "Light Protocol maintainers",
|
|
8
|
+
"email": "friends@lightprotocol.com"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"light": "./test_bin/run"
|
|
13
|
+
},
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"/accounts",
|
|
18
|
+
"/bin",
|
|
19
|
+
"/dist",
|
|
20
|
+
"/test_bin",
|
|
21
|
+
"./config.json",
|
|
22
|
+
"/npm-shrinkwrap.json",
|
|
23
|
+
"/oclif.manifest.json"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@coral-xyz/anchor": "0.29.0",
|
|
27
|
+
"@oclif/core": "^3.26.2",
|
|
28
|
+
"@oclif/plugin-autocomplete": "^3.0.13",
|
|
29
|
+
"@oclif/plugin-help": "^6.0.20",
|
|
30
|
+
"@oclif/plugin-not-found": "^3.1.2",
|
|
31
|
+
"@oclif/plugin-plugins": "^5.0.7",
|
|
32
|
+
"@solana-developers/helpers": "^1.5.1",
|
|
33
|
+
"@solana/web3.js": "^1.91.8",
|
|
34
|
+
"axios": "^1.6.8",
|
|
35
|
+
"case-anything": "^2.1.13",
|
|
36
|
+
"cli-progress": "^3.12.0",
|
|
37
|
+
"cli-spinners": "^2.9.2",
|
|
38
|
+
"dotenv": "^16.4.5",
|
|
39
|
+
"ffjavascript": "^0.2.63",
|
|
40
|
+
"find-process": "^1.4.7",
|
|
41
|
+
"node-fetch": "^3.3.2",
|
|
42
|
+
"snake-case": "^3.0.4",
|
|
43
|
+
"tar": "^6.2.1",
|
|
44
|
+
"tweetnacl": "^1.0.3",
|
|
45
|
+
"wait-on": "^7.2.0",
|
|
46
|
+
"which": "^4.0.0",
|
|
47
|
+
"@lightprotocol/compressed-token": "0.2.0",
|
|
48
|
+
"@lightprotocol/stateless.js": "0.3.0",
|
|
49
|
+
"@lightprotocol/hasher.rs": "0.1.0-alpha.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@oclif/test": "2.3.9",
|
|
53
|
+
"@solana/spl-token": "^0.3.11",
|
|
54
|
+
"@types/bn.js": "^5.1.5",
|
|
55
|
+
"@types/chai": "^4.3.14",
|
|
56
|
+
"@types/cli-progress": "^3.11.5",
|
|
57
|
+
"@types/mocha": "^10.0.6",
|
|
58
|
+
"@types/node": "^20.12.7",
|
|
59
|
+
"@types/tar": "^6.1.12",
|
|
60
|
+
"@types/which": "^3.0.3",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
62
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
63
|
+
"chai": "^4.4.1",
|
|
64
|
+
"eslint": "8.57.0",
|
|
65
|
+
"eslint-config-oclif": "5.1.1",
|
|
66
|
+
"eslint-config-oclif-typescript": "3.1.4",
|
|
67
|
+
"eslint-config-prettier": "9.1.0",
|
|
68
|
+
"mocha": "^10.2.0",
|
|
69
|
+
"oclif": "4.8.0",
|
|
70
|
+
"prettier": "^3.0.3",
|
|
71
|
+
"shx": "^0.3.4",
|
|
72
|
+
"ts-mocha": "^10.0.0",
|
|
73
|
+
"ts-node": "^10.9.2",
|
|
74
|
+
"tslib": "^2.6.2",
|
|
75
|
+
"typescript": "5.3.2"
|
|
76
|
+
},
|
|
77
|
+
"oclif": {
|
|
78
|
+
"bin": "light",
|
|
79
|
+
"dirname": "light",
|
|
80
|
+
"commands": "./dist/commands",
|
|
81
|
+
"plugins": [
|
|
82
|
+
"@oclif/plugin-help",
|
|
83
|
+
"@oclif/plugin-plugins",
|
|
84
|
+
"@oclif/plugin-autocomplete",
|
|
85
|
+
"@oclif/plugin-not-found"
|
|
86
|
+
],
|
|
87
|
+
"topicSeparator": ""
|
|
88
|
+
},
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": ">=12.0.0"
|
|
91
|
+
},
|
|
92
|
+
"keywords": [
|
|
93
|
+
"oclif"
|
|
94
|
+
],
|
|
95
|
+
"types": "dist/index.d.ts",
|
|
96
|
+
"scripts": {
|
|
97
|
+
"add-bins": "./scripts/copyLocalProgramBinaries.sh && scripts/buildProver.sh",
|
|
98
|
+
"postinstall": "[ -d ./bin ] && find ./bin -type f -exec chmod +x {} + || echo 'No bin directory found, skipping chmod'",
|
|
99
|
+
"build": "shx rm -rf dist && pnpm tsc -p tsconfig.json && pnpm tsc -p tsconfig.test.json && pnpm add-bins",
|
|
100
|
+
"format": "pnpm prettier --write \"src/**/*.{ts,js}\" \"test/**/*.{ts,js}\" -w",
|
|
101
|
+
"format:check": "pnpm prettier \"src/**/*{ts,js}\" \"test/**/*.{ts,js}\" --check",
|
|
102
|
+
"lint": "eslint . --ext .ts",
|
|
103
|
+
"lint:fix": "eslint . --fix",
|
|
104
|
+
"test-utils": "mocha ./test/utils/index.test.ts -t 10000000 --exit",
|
|
105
|
+
"test-config": "mocha ./test/commands/config/index.test.ts -t 10000000 --exit",
|
|
106
|
+
"test-create-mint": "mocha ./test/commands/create-mint/index.test.ts -t 10000000 --exit",
|
|
107
|
+
"test-register-mint": "mocha ./test/commands/register-mint/index.test.ts -t 10000000 --exit",
|
|
108
|
+
"test-approve-and-mint-to": "mocha ./test/commands/approve-and-mint-to/index.test.ts -t 10000000 --exit",
|
|
109
|
+
"test-mint-to": "mocha ./test/commands/mint-to/index.test.ts -t 10000000 --exit",
|
|
110
|
+
"test-transfer": "mocha ./test/commands/transfer/index.test.ts -t 10000000 --exit",
|
|
111
|
+
"test-balance": "mocha ./test/commands/balance/index.test.ts -t 10000000 --exit",
|
|
112
|
+
"test-compress-sol": "mocha ./test/commands/compress-sol/index.test.ts -t 10000000 --exit",
|
|
113
|
+
"test-decompress-sol": "mocha ./test/commands/decompress-sol/index.test.ts -t 10000000 --exit",
|
|
114
|
+
"test-compress-spl": "mocha ./test/commands/compress-spl/index.test.ts -t 10000000 --exit",
|
|
115
|
+
"test-decompress-spl": "mocha ./test/commands/decompress-spl/index.test.ts -t 10000000 --exit",
|
|
116
|
+
"kill": "killall solana-test-validator || true && killall solana-test-val || true && sleep 1",
|
|
117
|
+
"test-cli": "pnpm test-config && pnpm kill",
|
|
118
|
+
"test": "pnpm kill && pnpm test-cli && pnpm test-utils && pnpm test-create-mint && pnpm test-mint-to && pnpm test-transfer && pnpm test-compress-spl && pnpm test-decompress-spl && pnpm test-balance && pnpm test-compress-sol && pnpm test-decompress-sol && pnpm test-register-mint && pnpm test-approve-and-mint-to",
|
|
119
|
+
"install-local": "pnpm build && pnpm global remove @lightprotocol/zk-compression-cli || true && pnpm global add $PWD",
|
|
120
|
+
"version": "oclif readme && git add README.md"
|
|
121
|
+
}
|
|
122
|
+
}
|
package/test_bin/dev
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const oclif = require('@oclif/core')
|
|
4
|
+
|
|
5
|
+
const path = require('path')
|
|
6
|
+
const project = path.join(__dirname, '..', 'tsconfig.test.json')
|
|
7
|
+
|
|
8
|
+
// In dev mode -> use ts-node and dev plugins
|
|
9
|
+
process.env.NODE_ENV = 'development'
|
|
10
|
+
|
|
11
|
+
require('ts-node').register({project})
|
|
12
|
+
|
|
13
|
+
// In dev mode, always show stack traces
|
|
14
|
+
oclif.settings.debug = true;
|
|
15
|
+
|
|
16
|
+
// Start the CLI
|
|
17
|
+
oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
|