@devtion/actions 0.0.0-7e983e3
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 +83 -0
- package/dist/index.mjs +2608 -0
- package/dist/index.node.js +2714 -0
- package/dist/types/hardhat.config.d.ts +6 -0
- package/dist/types/hardhat.config.d.ts.map +1 -0
- package/dist/types/src/helpers/authentication.d.ts +21 -0
- package/dist/types/src/helpers/authentication.d.ts.map +1 -0
- package/dist/types/src/helpers/constants.d.ts +194 -0
- package/dist/types/src/helpers/constants.d.ts.map +1 -0
- package/dist/types/src/helpers/contracts.d.ts +57 -0
- package/dist/types/src/helpers/contracts.d.ts.map +1 -0
- package/dist/types/src/helpers/crypto.d.ts +27 -0
- package/dist/types/src/helpers/crypto.d.ts.map +1 -0
- package/dist/types/src/helpers/database.d.ts +105 -0
- package/dist/types/src/helpers/database.d.ts.map +1 -0
- package/dist/types/src/helpers/functions.d.ts +145 -0
- package/dist/types/src/helpers/functions.d.ts.map +1 -0
- package/dist/types/src/helpers/security.d.ts +10 -0
- package/dist/types/src/helpers/security.d.ts.map +1 -0
- package/dist/types/src/helpers/services.d.ts +38 -0
- package/dist/types/src/helpers/services.d.ts.map +1 -0
- package/dist/types/src/helpers/storage.d.ts +121 -0
- package/dist/types/src/helpers/storage.d.ts.map +1 -0
- package/dist/types/src/helpers/tasks.d.ts +2 -0
- package/dist/types/src/helpers/tasks.d.ts.map +1 -0
- package/dist/types/src/helpers/utils.d.ts +139 -0
- package/dist/types/src/helpers/utils.d.ts.map +1 -0
- package/dist/types/src/helpers/verification.d.ts +95 -0
- package/dist/types/src/helpers/verification.d.ts.map +1 -0
- package/dist/types/src/helpers/vm.d.ts +112 -0
- package/dist/types/src/helpers/vm.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +15 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/types/enums.d.ts +133 -0
- package/dist/types/src/types/enums.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +603 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/package.json +87 -0
- package/src/helpers/authentication.ts +37 -0
- package/src/helpers/constants.ts +312 -0
- package/src/helpers/contracts.ts +268 -0
- package/src/helpers/crypto.ts +55 -0
- package/src/helpers/database.ts +221 -0
- package/src/helpers/functions.ts +438 -0
- package/src/helpers/security.ts +86 -0
- package/src/helpers/services.ts +83 -0
- package/src/helpers/storage.ts +329 -0
- package/src/helpers/tasks.ts +56 -0
- package/src/helpers/utils.ts +743 -0
- package/src/helpers/verification.ts +354 -0
- package/src/helpers/vm.ts +392 -0
- package/src/index.ts +162 -0
- package/src/types/enums.ts +141 -0
- package/src/types/index.ts +650 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Define different states of a ceremony.
|
|
3
|
+
* @enum {string}
|
|
4
|
+
* - SCHEDULED: when the ceremony setup has been properly completed but the contribution period has not yet started.
|
|
5
|
+
* - OPENED: when the contribution period has started.
|
|
6
|
+
* - PAUSED: When the coordinator has manually paused the ceremony (NB. currently not possible because the relevant functionality has not yet been implemented).
|
|
7
|
+
* - CLOSED: when the contribution period has finished.
|
|
8
|
+
* - FINALIZED: when the ceremony finalization has been properly completed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const enum CeremonyState {
|
|
11
|
+
SCHEDULED = "SCHEDULED",
|
|
12
|
+
OPENED = "OPENED",
|
|
13
|
+
PAUSED = "PAUSED",
|
|
14
|
+
CLOSED = "CLOSED",
|
|
15
|
+
FINALIZED = "FINALIZED"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Define the type of Trusted Setup ceremony (Phase 1 or Phase 2).
|
|
19
|
+
* @enum {string}
|
|
20
|
+
* - PHASE1: when the ceremony is a Phase 1 Trusted Setup ceremony.
|
|
21
|
+
* - PHASE2: when the ceremony is a Phase 2 Trusted Setup ceremony.
|
|
22
|
+
*/
|
|
23
|
+
export declare const enum CeremonyType {
|
|
24
|
+
PHASE1 = "PHASE1",
|
|
25
|
+
PHASE2 = "PHASE2"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Define different status of a participant.
|
|
29
|
+
* @enum {string}
|
|
30
|
+
* - CREATED: when the participant document has been created in the database.
|
|
31
|
+
* - WAITING: when the participant is waiting for a contribution (i.e., is currently queued or is waiting for its status to be checked after a timeout expiration).
|
|
32
|
+
* - READY: when the participant is ready for a contribution.
|
|
33
|
+
* - CONTRIBUTING: when the participant is currently contributing (i.e., not queued anymore, but the current contributor at this time).
|
|
34
|
+
* - CONTRIBUTED: when the participant has completed successfully the contribution for all circuits in a ceremony. The participant may need to wait for the latest contribution verification while having this status.
|
|
35
|
+
* - DONE: when the participant has completed contributions and verifications from coordinator.
|
|
36
|
+
* - FINALIZING: when the coordinator is currently finalizing the ceremony.
|
|
37
|
+
* - FINALIZED: when the coordinator has successfully finalized the ceremony.
|
|
38
|
+
* - TIMEDOUT: when the participant has been timedout while contributing. This may happen due to network or memory issues, un/intentional crash, or contributions lasting for too long.
|
|
39
|
+
* - EXHUMED: when the participant is ready to resume the contribution after a timeout expiration.
|
|
40
|
+
*/
|
|
41
|
+
export declare const enum ParticipantStatus {
|
|
42
|
+
CREATED = "CREATED",
|
|
43
|
+
WAITING = "WAITING",
|
|
44
|
+
READY = "READY",
|
|
45
|
+
CONTRIBUTING = "CONTRIBUTING",
|
|
46
|
+
CONTRIBUTED = "CONTRIBUTED",
|
|
47
|
+
DONE = "DONE",
|
|
48
|
+
FINALIZING = "FINALIZING",
|
|
49
|
+
FINALIZED = "FINALIZED",
|
|
50
|
+
TIMEDOUT = "TIMEDOUT",
|
|
51
|
+
EXHUMED = "EXHUMED"
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Define different steps during which the participant may be during the contribution.
|
|
55
|
+
* @enum {string}
|
|
56
|
+
* - DOWNLOADING: when the participant is doing the download of the last contribution (from previous participant).
|
|
57
|
+
* - COMPUTING: when the participant is actively computing the contribution.
|
|
58
|
+
* - UPLOADING: when the participant is uploading the computed contribution.
|
|
59
|
+
* - VERIFYING: when the participant is waiting from verification results from the coordinator.
|
|
60
|
+
* - COMPLETED: when the participant has received the verification results from the coordinator and completed the contribution steps.
|
|
61
|
+
*/
|
|
62
|
+
export declare const enum ParticipantContributionStep {
|
|
63
|
+
DOWNLOADING = "DOWNLOADING",
|
|
64
|
+
COMPUTING = "COMPUTING",
|
|
65
|
+
UPLOADING = "UPLOADING",
|
|
66
|
+
VERIFYING = "VERIFYING",
|
|
67
|
+
COMPLETED = "COMPLETED"
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Define what type of timeout was performed.
|
|
71
|
+
* @enum {string}
|
|
72
|
+
* - BLOCKING_CONTRIBUTION: when the current contributor was blocking the waiting queue.
|
|
73
|
+
* - BLOCKING_CLOUD_FUNCTION: when the contribution verification has gone beyond the time limit.
|
|
74
|
+
*/
|
|
75
|
+
export declare const enum TimeoutType {
|
|
76
|
+
BLOCKING_CONTRIBUTION = "BLOCKING_CONTRIBUTION",
|
|
77
|
+
BLOCKING_CLOUD_FUNCTION = "BLOCKING_CLOUD_FUNCTION"
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Define what type of timeout mechanism is currently adopted for a ceremony.
|
|
81
|
+
* @enum {string}
|
|
82
|
+
* - DYNAMIC: self-update approach based on latest contribution time.
|
|
83
|
+
* - FIXED: approach based on a fixed amount of time.
|
|
84
|
+
*/
|
|
85
|
+
export declare const enum CeremonyTimeoutType {
|
|
86
|
+
DYNAMIC = "DYNAMIC",
|
|
87
|
+
FIXED = "FIXED"
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Define request type for pre-signed urls.
|
|
91
|
+
*/
|
|
92
|
+
export declare const enum RequestType {
|
|
93
|
+
PUT = "PUT",
|
|
94
|
+
GET = "GET"
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Define the environment in use when testing.
|
|
98
|
+
* @enum {string}
|
|
99
|
+
* - DEVELOPMENT: tests are performed on the local Firebase emulator instance.
|
|
100
|
+
* - PRODUCTION: tests are performed on the remote (deployed) Firebase application.
|
|
101
|
+
*/
|
|
102
|
+
export declare const enum TestingEnvironment {
|
|
103
|
+
DEVELOPMENT = "DEVELOPMENT",
|
|
104
|
+
PRODUCTION = "PRODUCTION"
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Define what type of contribution verification mechanism is currently adopted for a circuit.
|
|
108
|
+
* @enum {string}
|
|
109
|
+
* - CF: Cloud Functions.
|
|
110
|
+
* - VM: Virtual Machine.
|
|
111
|
+
*/
|
|
112
|
+
export declare const enum CircuitContributionVerificationMechanism {
|
|
113
|
+
CF = "CF",
|
|
114
|
+
VM = "VM"
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Define the supported VM volume types.
|
|
118
|
+
* @dev the VM volume types can be retrieved at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html
|
|
119
|
+
* @enum {string}
|
|
120
|
+
* - GP2: General Purpose SSD version 2.
|
|
121
|
+
* - GP3: General Purpose SSD version 3.
|
|
122
|
+
* - IO1: Provisioned IOPS SSD volumes version 1.
|
|
123
|
+
* - ST1: Throughput Optimized HDD volumes.
|
|
124
|
+
* - SC1: Cold HDD volumes.
|
|
125
|
+
*/
|
|
126
|
+
export declare const enum DiskTypeForVM {
|
|
127
|
+
GP2 = "gp2",
|
|
128
|
+
GP3 = "gp3",
|
|
129
|
+
IO1 = "io1",
|
|
130
|
+
ST1 = "st1",
|
|
131
|
+
SC1 = "sc1"
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/types/enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,0BAAkB,aAAa;IAC3B,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;CAC1B;AAED;;;;;GAKG;AACH,0BAAkB,YAAY;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,0BAAkB,iBAAiB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACtB;AAED;;;;;;;;GAQG;AACH,0BAAkB,2BAA2B;IACzC,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED;;;;;GAKG;AACH,0BAAkB,WAAW;IACzB,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;CACtD;AAED;;;;;GAKG;AACH,0BAAkB,mBAAmB;IACjC,OAAO,YAAY;IACnB,KAAK,UAAU;CAClB;AAED;;GAEG;AACH,0BAAkB,WAAW;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;CACd;AAED;;;;;GAKG;AACH,0BAAkB,kBAAkB;IAChC,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC5B;AAED;;;;;GAKG;AACH,0BAAkB,wCAAwC;IACtD,EAAE,OAAO;IACT,EAAE,OAAO;CACZ;AAED;;;;;;;;;GASG;AACH,0BAAkB,aAAa;IAC3B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;CACd"}
|