@devtion/backend 0.0.0-92056fa → 0.0.0-9843891

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.
Files changed (36) hide show
  1. package/README.md +7 -7
  2. package/dist/src/functions/index.js +413 -129
  3. package/dist/src/functions/index.mjs +416 -134
  4. package/dist/types/functions/bandada.d.ts +4 -0
  5. package/dist/types/functions/bandada.d.ts.map +1 -0
  6. package/dist/types/functions/ceremony.d.ts.map +1 -1
  7. package/dist/types/functions/circuit.d.ts.map +1 -1
  8. package/dist/types/functions/index.d.ts +2 -0
  9. package/dist/types/functions/index.d.ts.map +1 -1
  10. package/dist/types/functions/siwe.d.ts +4 -0
  11. package/dist/types/functions/siwe.d.ts.map +1 -0
  12. package/dist/types/functions/storage.d.ts.map +1 -1
  13. package/dist/types/functions/timeout.d.ts.map +1 -1
  14. package/dist/types/functions/user.d.ts.map +1 -1
  15. package/dist/types/lib/errors.d.ts +2 -1
  16. package/dist/types/lib/errors.d.ts.map +1 -1
  17. package/dist/types/lib/services.d.ts +7 -0
  18. package/dist/types/lib/services.d.ts.map +1 -1
  19. package/dist/types/lib/utils.d.ts.map +1 -1
  20. package/dist/types/types/index.d.ts +56 -0
  21. package/dist/types/types/index.d.ts.map +1 -1
  22. package/package.json +4 -3
  23. package/src/functions/bandada.ts +155 -0
  24. package/src/functions/ceremony.ts +11 -6
  25. package/src/functions/circuit.ts +140 -118
  26. package/src/functions/index.ts +2 -0
  27. package/src/functions/participant.ts +15 -15
  28. package/src/functions/siwe.ts +77 -0
  29. package/src/functions/storage.ts +11 -8
  30. package/src/functions/timeout.ts +7 -5
  31. package/src/functions/user.ts +22 -12
  32. package/src/lib/errors.ts +6 -1
  33. package/src/lib/services.ts +36 -0
  34. package/src/lib/utils.ts +10 -8
  35. package/src/types/declarations.d.ts +1 -0
  36. package/src/types/index.ts +60 -0
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
- **Prerequisities**
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 (__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.
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
- 6. Store the other values (sns_topic_arn etc.)
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
- **Prerequisities**
151
+ **Prerequisites**
152
152
 
153
153
  - You will need Java JDK version 11 or higher to run the Firebase Local Emulator.
154
154