@devtion/backend 0.0.0-9c50f66 → 0.0.0-9d46256
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 +7 -7
- package/dist/src/functions/index.js +674 -356
- package/dist/src/functions/index.mjs +676 -360
- package/dist/types/functions/bandada.d.ts +4 -0
- package/dist/types/functions/bandada.d.ts.map +1 -0
- package/dist/types/functions/ceremony.d.ts.map +1 -1
- package/dist/types/functions/circuit.d.ts.map +1 -1
- package/dist/types/functions/index.d.ts +2 -0
- package/dist/types/functions/index.d.ts.map +1 -1
- package/dist/types/functions/siwe.d.ts +4 -0
- package/dist/types/functions/siwe.d.ts.map +1 -0
- package/dist/types/functions/storage.d.ts.map +1 -1
- package/dist/types/functions/timeout.d.ts.map +1 -1
- package/dist/types/functions/user.d.ts.map +1 -1
- package/dist/types/lib/errors.d.ts +3 -1
- package/dist/types/lib/errors.d.ts.map +1 -1
- package/dist/types/lib/services.d.ts +7 -0
- package/dist/types/lib/services.d.ts.map +1 -1
- package/dist/types/lib/utils.d.ts +1 -1
- package/dist/types/lib/utils.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +57 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/functions/bandada.ts +154 -0
- package/src/functions/ceremony.ts +19 -10
- package/src/functions/circuit.ts +444 -391
- package/src/functions/index.ts +2 -0
- package/src/functions/participant.ts +16 -16
- package/src/functions/siwe.ts +77 -0
- package/src/functions/storage.ts +13 -9
- package/src/functions/timeout.ts +17 -15
- package/src/functions/user.ts +23 -13
- package/src/lib/errors.ts +11 -1
- package/src/lib/services.ts +36 -0
- package/src/lib/utils.ts +11 -9
- package/src/types/declarations.d.ts +1 -0
- package/src/types/index.ts +61 -1
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Launching the ready-to-run customized scripts everyone could handle whatever is
|
|
|
51
51
|
|
|
52
52
|
## 🛠 Installation
|
|
53
53
|
|
|
54
|
-
**
|
|
54
|
+
**Prerequisites**
|
|
55
55
|
|
|
56
56
|
- Node.js version 16.0 or higher.
|
|
57
57
|
- Yarn version 3.5.0 or higher.
|
|
@@ -102,10 +102,10 @@ yarn firebase:init
|
|
|
102
102
|
|
|
103
103
|
#### AWS Infrastructure
|
|
104
104
|
|
|
105
|
-
0. Login or create a [new AWS Account](https://portal.aws.amazon.com/billing/signup?nc2=h_ct&src=header_signup&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email).
|
|
105
|
+
0. Login or create a [new AWS Account](https://portal.aws.amazon.com/billing/signup?nc2=h_ct&src=header_signup&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email).
|
|
106
106
|
- The AWS free tier account will cover a good number of requests for ceremonies but there could be some costs based on your ceremony circuits size.
|
|
107
|
-
1. Create an access key for a user with Admin privileges (
|
|
108
|
-
2. Setup the `awscli` ([docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)) and add the keys for this user.
|
|
107
|
+
1. Create an access key for a user with Admin privileges (**NOT ROOT USER**)
|
|
108
|
+
2. Setup the `awscli` ([docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)) and add the keys for this user.
|
|
109
109
|
3. Install `terraform` ([docs](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli))
|
|
110
110
|
4. Decide on an AWS region (by default this is **us-east-1**) - if you want to change you will need to do the following:
|
|
111
111
|
1. update **aws/lambda/index.mjs** ([exact line](https://github.com/privacy-scaling-explorations/p0tion/blob/dev/packages/backend/aws/lambda/index.mjs#L3)) to the new region
|
|
@@ -117,9 +117,9 @@ yarn firebase:init
|
|
|
117
117
|
1. `terraform init`
|
|
118
118
|
2. `terraform plan`
|
|
119
119
|
3. `terraform apply`
|
|
120
|
-
4. `terraform output secret_key`
|
|
120
|
+
4. `terraform output secret_key`
|
|
121
121
|
- To print the secret access key for the IAM user
|
|
122
|
-
|
|
122
|
+
5. Store the other values (sns_topic_arn etc.)
|
|
123
123
|
- These will be needed for the .env file configuration
|
|
124
124
|
|
|
125
125
|
The IAM user created with the steps above can be used for all p0tion's features.
|
|
@@ -148,7 +148,7 @@ yarn firebase:deploy-firestore
|
|
|
148
148
|
|
|
149
149
|
Firebase provides a [Local Emulator Suite](https://firebase.google.com/docs/emulator-suite) as a set of advanced dev-tools w/ a rich user-interface to build and test apps locally using Firebase services as Cloud Functions, Firestore and Authentication.
|
|
150
150
|
|
|
151
|
-
**
|
|
151
|
+
**Prerequisites**
|
|
152
152
|
|
|
153
153
|
- You will need Java JDK version 11 or higher to run the Firebase Local Emulator.
|
|
154
154
|
|