@devtion/devcli 0.0.0-dev → 0.0.0-eb3bb7d
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 +21 -0
- package/README.md +2 -0
- package/dist/.env +40 -39
- package/dist/index.js +1 -1
- package/package.json +99 -97
- package/src/commands/auth.ts +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Ethereum Foundation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -61,6 +61,8 @@ or run specific commands with `npx`:
|
|
|
61
61
|
npx @p0tion/phase2cli contribute
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
> Please note that phase2cli only runs on Linux or Mac systems. If a Windows user, please install [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) first.
|
|
65
|
+
|
|
64
66
|
## 📜 Usage
|
|
65
67
|
|
|
66
68
|
### Local Development
|
package/dist/.env
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
### FIREBASE ###
|
|
2
|
-
### These configs are related to the configuration of the Firebase services.
|
|
1
|
+
### FIREBASE ###
|
|
2
|
+
### These configs are related to the configuration of the Firebase services.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# The Firebase Application API key for making request against the services.
|
|
6
|
+
# nb. this is going to be auto-generated when creating a new application.
|
|
7
|
+
FIREBASE_API_KEY=AIzaSyDVAu8U4zBpM3FFLPyktSjZnCmg1IR73Cg
|
|
8
|
+
# The URL to Firebase Authentication service (should point to default).
|
|
9
|
+
# nb. this is going to be auto-generated when creating a new application.
|
|
10
|
+
FIREBASE_AUTH_DOMAIN=p0tion-ci-environment.firebaseapp.com
|
|
11
|
+
# The Firebase Application project id (should match with application name).
|
|
12
|
+
FIREBASE_PROJECT_ID=p0tion-ci-environment
|
|
13
|
+
# The Firebase unique message sender identifier (to recognize the application user).
|
|
14
|
+
# nb. this is going to be auto-generated when creating a new application.
|
|
15
|
+
FIREBASE_MESSAGING_SENDER_ID=22680510841
|
|
16
|
+
# The Firebase unique identifier for your application.
|
|
17
|
+
# nb. this is going to be auto-generated when creating a new application.
|
|
18
|
+
FIREBASE_APP_ID=1:22680510841:web:529a664e73dbabd1c7cfa8
|
|
19
|
+
FIREBASE_CF_URL_VERIFY_CONTRIBUTION=https://verifycontribution-mq4aqokliq-ew.a.run.app
|
|
20
|
+
|
|
21
|
+
### AUTHENTICATION ###
|
|
22
|
+
### These configs are related to the authentication of users.
|
|
23
|
+
|
|
24
|
+
# The unique identifier for the Github client associated to the OAuth Application.
|
|
25
|
+
AUTH_GITHUB_CLIENT_ID=e9f8a5fabdfe0d95618c
|
|
26
|
+
|
|
27
|
+
### AWS S3 STORAGE ###
|
|
28
|
+
### These configs are related to the configuration of the interaction with the
|
|
29
|
+
### AWS S3 bucket used as storage for ceremony artifacts.
|
|
30
|
+
|
|
31
|
+
# The chunk size to be used when executing multi-part upload or downloads.
|
|
32
|
+
# default 50 MBs.
|
|
33
|
+
# (e.g. a 200 MB file setting a stream chunk size of 50 MB is going to be splitted and uploaded/downloaded in 4 chunks).
|
|
34
|
+
CONFIG_STREAM_CHUNK_SIZE_IN_MB=50
|
|
35
|
+
# The postfix string for each ceremony bucket.
|
|
36
|
+
# default -ph2-ceremony
|
|
37
|
+
CONFIG_CEREMONY_BUCKET_POSTFIX=-p0tion-development-environment
|
|
38
|
+
# The amount of time in seconds which indicates the duration about the validity of a pre-signed URL.
|
|
39
|
+
# default: 7200 seconds = 2 hours.
|
|
40
|
+
CONFIG_PRESIGNED_URL_EXPIRATION_IN_SECONDS=7200
|
|
3
41
|
|
|
4
|
-
|
|
5
|
-
# The Firebase Application API key for making request against the services.
|
|
6
|
-
# nb. this is going to be auto-generated when creating a new application.
|
|
7
|
-
FIREBASE_API_KEY="AIzaSyC_m2yETFfuJ_dO5mtQfyU6qlc8k3CTFUY"
|
|
8
|
-
# The URL to Firebase Authentication service (should point to default).
|
|
9
|
-
# nb. this is going to be auto-generated when creating a new application.
|
|
10
|
-
FIREBASE_AUTH_DOMAIN="pse-p0tion-production.firebaseapp.com"
|
|
11
|
-
# The Firebase Application project id (should match with application name).
|
|
12
|
-
FIREBASE_PROJECT_ID="pse-p0tion-production"
|
|
13
|
-
# The Firebase unique message sender identifier (to recognize the application user).
|
|
14
|
-
# nb. this is going to be auto-generated when creating a new application.
|
|
15
|
-
FIREBASE_MESSAGING_SENDER_ID="791425100143"
|
|
16
|
-
# The Firebase unique identifier for your application.
|
|
17
|
-
# nb. this is going to be auto-generated when creating a new application.
|
|
18
|
-
FIREBASE_APP_ID="1:791425100143:web:86313c4d311c8f6014a09a"
|
|
19
|
-
FIREBASE_CF_URL_VERIFY_CONTRIBUTION="https://verifycontribution-h3mhz7ox4a-ew.a.run.app"
|
|
20
|
-
|
|
21
|
-
### AUTHENTICATION ###
|
|
22
|
-
### These configs are related to the authentication of users.
|
|
23
|
-
|
|
24
|
-
# The unique identifier for the Github client associated to the OAuth Application.
|
|
25
|
-
AUTH_GITHUB_CLIENT_ID="057a55ac6fe383cfcc3a"
|
|
26
|
-
|
|
27
|
-
### AWS S3 STORAGE ###
|
|
28
|
-
### These configs are related to the configuration of the interaction with the
|
|
29
|
-
### AWS S3 bucket used as storage for ceremony artifacts.
|
|
30
|
-
|
|
31
|
-
# The chunk size to be used when executing multi-part upload or downloads.
|
|
32
|
-
# default 50 MBs.
|
|
33
|
-
# (e.g. a 200 MB file setting a stream chunk size of 50 MB is going to be splitted and uploaded/downloaded in 4 chunks).
|
|
34
|
-
CONFIG_STREAM_CHUNK_SIZE_IN_MB=50
|
|
35
|
-
# The postfix string for each ceremony bucket.
|
|
36
|
-
# default "-ph2-ceremony"
|
|
37
|
-
CONFIG_CEREMONY_BUCKET_POSTFIX="-pse-p0tion-production"
|
|
38
|
-
# The amount of time in seconds which indicates the duration about the validity of a pre-signed URL.
|
|
39
|
-
# default: 7200 seconds = 2 hours.
|
|
40
|
-
CONFIG_PRESIGNED_URL_EXPIRATION_IN_SECONDS=7200
|
package/dist/index.js
CHANGED
|
@@ -2114,7 +2114,7 @@ const onVerification = async (verification) => {
|
|
|
2114
2114
|
clipboard.readSync();
|
|
2115
2115
|
// Display data.
|
|
2116
2116
|
console.log(`${theme.symbols.warning} Visit ${theme.text.bold(theme.text.underlined(verification.verification_uri))} on this device to generate a new token and authenticate\n`);
|
|
2117
|
-
console.log(theme.colors.magenta(figlet.textSync(
|
|
2117
|
+
console.log(theme.colors.magenta(figlet.textSync("Code is Below", { font: "ANSI Shadow" })), '\n');
|
|
2118
2118
|
console.log(`${theme.symbols.info} Your auth code: ${theme.text.bold(verification.user_code)} has been copied to your clipboard (${theme.emojis.clipboard} ${theme.symbols.success})\n`);
|
|
2119
2119
|
const spinner = customSpinner(`Redirecting to Github...`, `clock`);
|
|
2120
2120
|
spinner.start();
|
package/package.json
CHANGED
|
@@ -1,99 +1,101 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
2
|
+
"name": "@devtion/devcli",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.0-eb3bb7d",
|
|
5
|
+
"description": "All-in-one interactive command-line for interfacing with zkSNARK Phase 2 Trusted Setup ceremonies",
|
|
6
|
+
"repository": "git@github.com:privacy-scaling-explorations/p0tion.git",
|
|
7
|
+
"homepage": "https://github.com/privacy-scaling-explorations/p0tion",
|
|
8
|
+
"bugs": "https://github.com/privacy-scaling-explorations/p0tion/issues",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"bin": "dist/index.js",
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"types": "dist/types/index.d.ts",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=16.14.0"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/",
|
|
18
|
+
"src/",
|
|
19
|
+
"types/",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"typescript",
|
|
24
|
+
"zero-knowledge",
|
|
25
|
+
"zk-snarks",
|
|
26
|
+
"phase-2",
|
|
27
|
+
"trusted-setup",
|
|
28
|
+
"ceremony",
|
|
29
|
+
"snarkjs",
|
|
30
|
+
"circom"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
|
|
34
|
+
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
|
|
35
|
+
"start": "ts-node --esm ./src/index.ts",
|
|
36
|
+
"auth": "yarn start auth",
|
|
37
|
+
"contribute": "yarn start contribute",
|
|
38
|
+
"clean": "yarn start clean",
|
|
39
|
+
"list": "yarn start list",
|
|
40
|
+
"logout": "yarn start logout",
|
|
41
|
+
"validate": "yarn start validate",
|
|
42
|
+
"coordinate:setup": "yarn start coordinate setup",
|
|
43
|
+
"coordinate:observe": "yarn start coordinate observe",
|
|
44
|
+
"coordinate:finalize": "yarn start coordinate finalize",
|
|
45
|
+
"docs": "typedoc src/**/*.ts --out ../../docs/phase2cli"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/clear": "^0.1.2",
|
|
49
|
+
"@types/cli-progress": "^3.11.0",
|
|
50
|
+
"@types/figlet": "^1.5.6",
|
|
51
|
+
"@types/mime-types": "^2.1.1",
|
|
52
|
+
"@types/node-emoji": "^1.8.2",
|
|
53
|
+
"@types/node-fetch": "^2.6.3",
|
|
54
|
+
"@types/ora": "^3.2.0",
|
|
55
|
+
"@types/prompts": "^2.4.4",
|
|
56
|
+
"@types/rollup-plugin-auto-external": "^2.0.2",
|
|
57
|
+
"@types/winston": "^2.4.4",
|
|
58
|
+
"rollup-plugin-auto-external": "^2.0.0",
|
|
59
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
60
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
61
|
+
"solc": "^0.8.19",
|
|
62
|
+
"ts-node": "^10.9.1",
|
|
63
|
+
"typescript": "^5.0.4"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@adobe/node-fetch-retry": "^2.2.0",
|
|
67
|
+
"@aws-sdk/client-s3": "^3.329.0",
|
|
68
|
+
"@octokit/auth-oauth-app": "^5.0.5",
|
|
69
|
+
"@octokit/auth-oauth-device": "^4.0.4",
|
|
70
|
+
"@octokit/request": "^6.2.3",
|
|
71
|
+
"@p0tion/actions": "^1.0.5",
|
|
72
|
+
"blakejs": "^1.2.1",
|
|
73
|
+
"boxen": "^7.1.0",
|
|
74
|
+
"chalk": "^5.2.0",
|
|
75
|
+
"clear": "^0.1.0",
|
|
76
|
+
"cli-progress": "^3.12.0",
|
|
77
|
+
"clipboardy": "^3.0.0",
|
|
78
|
+
"commander": "^10.0.1",
|
|
79
|
+
"conf": "^11.0.1",
|
|
80
|
+
"dotenv": "^16.0.3",
|
|
81
|
+
"figlet": "^1.6.0",
|
|
82
|
+
"firebase": "^9.21.0",
|
|
83
|
+
"log-symbols": "^5.1.0",
|
|
84
|
+
"mime-types": "^2.1.35",
|
|
85
|
+
"node-disk-info": "^1.3.0",
|
|
86
|
+
"node-emoji": "^1.11.0",
|
|
87
|
+
"node-fetch": "^3.3.1",
|
|
88
|
+
"open": "^9.1.0",
|
|
89
|
+
"ora": "^6.3.0",
|
|
90
|
+
"prompts": "^2.4.2",
|
|
91
|
+
"rimraf": "^5.0.0",
|
|
92
|
+
"rollup": "^3.21.6",
|
|
93
|
+
"snarkjs": "^0.6.11",
|
|
94
|
+
"timer-node": "^5.0.7",
|
|
95
|
+
"winston": "^3.8.2"
|
|
96
|
+
},
|
|
97
|
+
"publishConfig": {
|
|
98
|
+
"access": "public"
|
|
99
|
+
},
|
|
100
|
+
"gitHead": "d21d2002b8d020289595aaea83be0202d28486cb"
|
|
99
101
|
}
|
package/src/commands/auth.ts
CHANGED
|
@@ -73,8 +73,8 @@ export const onVerification = async (verification: Verification): Promise<void>
|
|
|
73
73
|
)} on this device to generate a new token and authenticate\n`
|
|
74
74
|
)
|
|
75
75
|
|
|
76
|
-
console.log(theme.colors.magenta(figlet.textSync(
|
|
77
|
-
|
|
76
|
+
console.log(theme.colors.magenta(figlet.textSync("Code is Below", { font: "ANSI Shadow" })), '\n')
|
|
77
|
+
|
|
78
78
|
console.log(
|
|
79
79
|
`${theme.symbols.info} Your auth code: ${theme.text.bold(verification.user_code)} has been copied to your clipboard (${theme.emojis.clipboard} ${
|
|
80
80
|
theme.symbols.success
|