@maci-protocol/coordinator 0.0.0-ci.e0aedb2 → 0.0.0-ci.e535d7c
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 +1 -2
- package/README.md +13 -6
- package/build/hardhat.config.cjs +3 -0
- package/build/hardhat.config.cjs.map +1 -1
- package/build/hardhat.config.d.cts +3 -0
- package/build/scripts/generateMaciKeyPair.js +2 -2
- package/build/scripts/generateMaciKeyPair.js.map +1 -1
- package/build/tests/constants.d.ts +0 -1
- package/build/tests/constants.d.ts.map +1 -1
- package/build/tests/constants.js +0 -1
- package/build/tests/constants.js.map +1 -1
- package/build/tests/e2e.aa.test.js +17 -14
- package/build/tests/e2e.aa.test.js.map +1 -1
- package/build/tests/e2e.deploy.test.js +121 -73
- package/build/tests/e2e.deploy.test.js.map +1 -1
- package/build/tests/utils.d.ts +6 -0
- package/build/tests/utils.d.ts.map +1 -1
- package/build/tests/utils.js +12 -3
- package/build/tests/utils.js.map +1 -1
- package/build/ts/common/__tests__/common.test.js +2 -6
- package/build/ts/common/__tests__/common.test.js.map +1 -1
- package/build/ts/common/accountAbstraction.d.ts +2 -19
- package/build/ts/common/accountAbstraction.d.ts.map +1 -1
- package/build/ts/common/accountAbstraction.js +14 -43
- package/build/ts/common/accountAbstraction.js.map +1 -1
- package/build/ts/common/chain.d.ts +16 -0
- package/build/ts/common/chain.d.ts.map +1 -0
- package/build/ts/common/chain.js +35 -0
- package/build/ts/common/chain.js.map +1 -0
- package/build/ts/common/errors.d.ts +17 -18
- package/build/ts/common/errors.d.ts.map +1 -1
- package/build/ts/common/errors.js +17 -18
- package/build/ts/common/errors.js.map +1 -1
- package/build/ts/common/index.d.ts +2 -0
- package/build/ts/common/index.d.ts.map +1 -1
- package/build/ts/common/index.js +2 -0
- package/build/ts/common/index.js.map +1 -1
- package/build/ts/common/types.d.ts +2 -3
- package/build/ts/common/types.d.ts.map +1 -1
- package/build/ts/deployer/__tests__/deployer.service.test.js +30 -289
- package/build/ts/deployer/__tests__/deployer.service.test.js.map +1 -1
- package/build/ts/deployer/__tests__/utils.d.ts +30 -1
- package/build/ts/deployer/__tests__/utils.d.ts.map +1 -1
- package/build/ts/deployer/__tests__/utils.js +42 -7
- package/build/ts/deployer/__tests__/utils.js.map +1 -1
- package/build/ts/deployer/deployer.service.d.ts +17 -53
- package/build/ts/deployer/deployer.service.d.ts.map +1 -1
- package/build/ts/deployer/deployer.service.js +164 -451
- package/build/ts/deployer/deployer.service.js.map +1 -1
- package/build/ts/deployer/dto.d.ts +4 -4
- package/build/ts/deployer/dto.d.ts.map +1 -1
- package/build/ts/deployer/dto.js +9 -1
- package/build/ts/deployer/dto.js.map +1 -1
- package/build/ts/deployer/types.d.ts +57 -19
- package/build/ts/deployer/types.d.ts.map +1 -1
- package/build/ts/proof/__tests__/proof.controller.test.js +3 -1
- package/build/ts/proof/__tests__/proof.controller.test.js.map +1 -1
- package/build/ts/proof/__tests__/proof.gateway.test.js +4 -1
- package/build/ts/proof/__tests__/proof.gateway.test.js.map +1 -1
- package/build/ts/proof/__tests__/proof.service.test.js +9 -7
- package/build/ts/proof/__tests__/proof.service.test.js.map +1 -1
- package/build/ts/proof/dto.d.ts +10 -9
- package/build/ts/proof/dto.d.ts.map +1 -1
- package/build/ts/proof/dto.js +42 -21
- package/build/ts/proof/dto.js.map +1 -1
- package/build/ts/proof/proof.controller.d.ts +3 -2
- package/build/ts/proof/proof.controller.d.ts.map +1 -1
- package/build/ts/proof/proof.controller.js.map +1 -1
- package/build/ts/proof/proof.service.d.ts +3 -3
- package/build/ts/proof/proof.service.d.ts.map +1 -1
- package/build/ts/proof/proof.service.js +38 -119
- package/build/ts/proof/proof.service.js.map +1 -1
- package/build/ts/proof/types.d.ts +16 -8
- package/build/ts/proof/types.d.ts.map +1 -1
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.d.ts +53 -0
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.d.ts.map +1 -0
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.js +105 -0
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.js.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.service.d.ts +13 -2
- package/build/ts/sessionKeys/sessionKeys.service.d.ts.map +1 -1
- package/build/ts/sessionKeys/sessionKeys.service.js +22 -4
- package/build/ts/sessionKeys/sessionKeys.service.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +26 -25
- package/build/ts/deployer/utils.d.ts +0 -8
- package/build/ts/deployer/utils.d.ts.map +0 -1
- package/build/ts/deployer/utils.js +0 -9
- package/build/ts/deployer/utils.js.map +0 -1
package/build/ts/proof/dto.js
CHANGED
|
@@ -22,10 +22,6 @@ export class GenerateProofDto {
|
|
|
22
22
|
* Maci contract address
|
|
23
23
|
*/
|
|
24
24
|
maciContractAddress;
|
|
25
|
-
/**
|
|
26
|
-
* Tally contract address
|
|
27
|
-
*/
|
|
28
|
-
tallyContractAddress;
|
|
29
25
|
/**
|
|
30
26
|
* Whether to use Qv or NonQv
|
|
31
27
|
*/
|
|
@@ -46,6 +42,12 @@ export class GenerateProofDto {
|
|
|
46
42
|
* Blocks per batch for event processing
|
|
47
43
|
*/
|
|
48
44
|
blocksPerBatch;
|
|
45
|
+
sessionKeyAddress;
|
|
46
|
+
approval;
|
|
47
|
+
/**
|
|
48
|
+
* Chain Name
|
|
49
|
+
*/
|
|
50
|
+
chain;
|
|
49
51
|
}
|
|
50
52
|
__decorate([
|
|
51
53
|
ApiProperty({
|
|
@@ -65,14 +67,6 @@ __decorate([
|
|
|
65
67
|
IsEthereumAddress(),
|
|
66
68
|
__metadata("design:type", String)
|
|
67
69
|
], GenerateProofDto.prototype, "maciContractAddress", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
ApiProperty({
|
|
70
|
-
description: "Tally contract address",
|
|
71
|
-
type: String,
|
|
72
|
-
}),
|
|
73
|
-
IsEthereumAddress(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], GenerateProofDto.prototype, "tallyContractAddress", void 0);
|
|
76
70
|
__decorate([
|
|
77
71
|
ApiProperty({
|
|
78
72
|
description: "Whether to use quadratic voting or not",
|
|
@@ -127,6 +121,34 @@ __decorate([
|
|
|
127
121
|
IsOptional(),
|
|
128
122
|
__metadata("design:type", Number)
|
|
129
123
|
], GenerateProofDto.prototype, "blocksPerBatch", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
ApiProperty({
|
|
126
|
+
description: "Session key address",
|
|
127
|
+
type: String,
|
|
128
|
+
required: false,
|
|
129
|
+
}),
|
|
130
|
+
IsOptional(),
|
|
131
|
+
IsEthereumAddress(),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], GenerateProofDto.prototype, "sessionKeyAddress", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
ApiProperty({
|
|
136
|
+
description: "Approval",
|
|
137
|
+
type: String,
|
|
138
|
+
required: false,
|
|
139
|
+
}),
|
|
140
|
+
IsOptional(),
|
|
141
|
+
IsString(),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], GenerateProofDto.prototype, "approval", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
ApiProperty({
|
|
146
|
+
description: "Chain to which to deploy the contract(s)",
|
|
147
|
+
enum: ESupportedNetworks,
|
|
148
|
+
}),
|
|
149
|
+
IsEnum(ESupportedNetworks),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], GenerateProofDto.prototype, "chain", void 0);
|
|
130
152
|
/**
|
|
131
153
|
* Data transfer object for merge trees
|
|
132
154
|
*/
|
|
@@ -165,7 +187,9 @@ __decorate([
|
|
|
165
187
|
ApiProperty({
|
|
166
188
|
description: "Session key address",
|
|
167
189
|
type: String,
|
|
190
|
+
required: false,
|
|
168
191
|
}),
|
|
192
|
+
IsOptional(),
|
|
169
193
|
IsEthereumAddress(),
|
|
170
194
|
__metadata("design:type", String)
|
|
171
195
|
], MergeTreesDto.prototype, "sessionKeyAddress", void 0);
|
|
@@ -173,7 +197,9 @@ __decorate([
|
|
|
173
197
|
ApiProperty({
|
|
174
198
|
description: "Approval",
|
|
175
199
|
type: String,
|
|
200
|
+
required: false,
|
|
176
201
|
}),
|
|
202
|
+
IsOptional(),
|
|
177
203
|
IsString(),
|
|
178
204
|
__metadata("design:type", String)
|
|
179
205
|
], MergeTreesDto.prototype, "approval", void 0);
|
|
@@ -194,7 +220,6 @@ export class SubmitProofsDto {
|
|
|
194
220
|
*/
|
|
195
221
|
pollId;
|
|
196
222
|
maciContractAddress;
|
|
197
|
-
tallyContractAddress;
|
|
198
223
|
sessionKeyAddress;
|
|
199
224
|
approval;
|
|
200
225
|
/**
|
|
@@ -220,19 +245,13 @@ __decorate([
|
|
|
220
245
|
IsEthereumAddress(),
|
|
221
246
|
__metadata("design:type", String)
|
|
222
247
|
], SubmitProofsDto.prototype, "maciContractAddress", void 0);
|
|
223
|
-
__decorate([
|
|
224
|
-
ApiProperty({
|
|
225
|
-
description: "Tally contract address",
|
|
226
|
-
type: String,
|
|
227
|
-
}),
|
|
228
|
-
IsEthereumAddress(),
|
|
229
|
-
__metadata("design:type", String)
|
|
230
|
-
], SubmitProofsDto.prototype, "tallyContractAddress", void 0);
|
|
231
248
|
__decorate([
|
|
232
249
|
ApiProperty({
|
|
233
250
|
description: "Session key address",
|
|
234
251
|
type: String,
|
|
252
|
+
required: false,
|
|
235
253
|
}),
|
|
254
|
+
IsOptional(),
|
|
236
255
|
IsEthereumAddress(),
|
|
237
256
|
__metadata("design:type", String)
|
|
238
257
|
], SubmitProofsDto.prototype, "sessionKeyAddress", void 0);
|
|
@@ -240,7 +259,9 @@ __decorate([
|
|
|
240
259
|
ApiProperty({
|
|
241
260
|
description: "Approval",
|
|
242
261
|
type: String,
|
|
262
|
+
required: false,
|
|
243
263
|
}),
|
|
264
|
+
IsOptional(),
|
|
244
265
|
IsString(),
|
|
245
266
|
__metadata("design:type", String)
|
|
246
267
|
], SubmitProofsDto.prototype, "approval", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dto.js","sourceRoot":"","sources":["../../../ts/proof/dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAItH,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;OAEG;IAQH,IAAI,CAAU;IAEd;;OAEG;IAMH,mBAAmB,CAAU;IAE7B;;OAEG;IAMH,
|
|
1
|
+
{"version":3,"file":"dto.js","sourceRoot":"","sources":["../../../ts/proof/dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAItH,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;OAEG;IAQH,IAAI,CAAU;IAEd;;OAEG;IAMH,mBAAmB,CAAU;IAE7B;;OAEG;IAMH,kBAAkB,CAAW;IAE7B;;OAEG;IASH,8BAA8B,CAAU;IAExC;;OAEG;IASH,UAAU,CAAU;IAEpB;;OAEG;IASH,QAAQ,CAAU;IAElB;;OAEG;IAWH,cAAc,CAAU;IASxB,iBAAiB,CAAO;IASxB,QAAQ,CAAU;IAElB;;OAEG;IAMH,KAAK,CAAsB;CAC5B;AAvGC;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,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1B;;OAEG;IAQH,MAAM,CAAU;IAOhB,mBAAmB,CAAO;IAS1B,iBAAiB,CAAO;IASxB,QAAQ,CAAU;IAElB;;OAEG;IAMH,KAAK,CAAsB;CAC5B;AApCC;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM;KACb,CAAC;IACD,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;;+CACS;AAOhB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,MAAM;KACb,CAAC;IACD,iBAAiB,EAAE;;4DACM;AAS1B;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,iBAAiB,EAAE;;0DACI;AASxB;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,QAAQ,EAAE;;iDACO;AAUlB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,kBAAkB;KACzB,CAAC;IACD,MAAM,CAAC,kBAAkB,CAAC;;8CACA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IGenerateData, IMergeArgs } from "./types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ITallyData } from "@maci-protocol/sdk";
|
|
3
3
|
import { FileService } from "../file/file.service";
|
|
4
|
+
import { IGetPublicKeyData } from "../file/types";
|
|
4
5
|
import { GenerateProofDto, SubmitProofsDto } from "./dto";
|
|
5
6
|
import { ProofGeneratorService } from "./proof.service";
|
|
6
7
|
export declare class ProofController {
|
|
@@ -35,7 +36,7 @@ export declare class ProofController {
|
|
|
35
36
|
* Submit proofs on-chain api method
|
|
36
37
|
* @param args - submit proofs on-chain args
|
|
37
38
|
*/
|
|
38
|
-
submit(args: SubmitProofsDto): Promise<
|
|
39
|
+
submit(args: SubmitProofsDto): Promise<ITallyData>;
|
|
39
40
|
/**
|
|
40
41
|
* Get RSA public key for authorization setup
|
|
41
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.controller.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.controller.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"proof.controller.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.controller.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAiB,eAAe,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,qBAIa,eAAe;IAaxB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAb9B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAE3D;;;;;OAKG;gBAEgB,qBAAqB,EAAE,qBAAqB,EAC5C,WAAW,EAAE,WAAW;IAG3C;;;;;OAKG;IAMG,QAAQ,CAAS,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC;IAOtE;;;;;OAKG;IAMG,KAAK,CAAS,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IAOvD;;;OAGG;IAMG,MAAM,CAAS,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC;IAOhE;;;;OAIG;IAKG,YAAY,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAMjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.controller.js","sourceRoot":"","sources":["../../../ts/proof/proof.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"proof.controller.js","sourceRoot":"","sources":["../../../ts/proof/proof.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAMjD,IAAM,eAAe,uBAArB,MAAM,eAAe;IAaP;IACA;IAbnB;;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,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;IACvG,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;IACvE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;IAC1E,IAAI,CAAC,QAAQ,CAAC;IACD,WAAA,IAAI,EAAE,CAAA;;qCAAO,eAAe;;6CAKzC;AAWK;IAJL,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;IAC3F,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;IAC1E,MAAM,EAAE;IACR,GAAG,CAAC,WAAW,CAAC;;;;mDAMhB;AAnFU,eAAe;IAJ3B,OAAO,CAAC,UAAU,CAAC;IACnB,aAAa,EAAE;IACf,UAAU,CAAC,UAAU,CAAC;IACtB,SAAS,CAAC,qBAAqB,CAAC;qCAcW,qBAAqB;QAC/B,WAAW;GAdhC,eAAe,CAoF3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IGenerateProofsOptions } from "@maci-protocol/sdk";
|
|
2
|
-
import { IProof } from "@maci-protocol/sdk";
|
|
2
|
+
import { IProof, ITallyData } from "@maci-protocol/sdk";
|
|
3
3
|
import type { IGenerateArgs, IGenerateData, IMergeArgs, ISubmitProofsArgs } from "./types";
|
|
4
4
|
import { CryptoService } from "../crypto/crypto.service";
|
|
5
5
|
import { FileService } from "../file/file.service";
|
|
@@ -36,7 +36,7 @@ export declare class ProofGeneratorService {
|
|
|
36
36
|
* @param args - generate proofs arguments
|
|
37
37
|
* @returns - generated proofs for message processing and tally
|
|
38
38
|
*/
|
|
39
|
-
generate({ poll, maciContractAddress,
|
|
39
|
+
generate({ approval, sessionKeyAddress, chain, poll, maciContractAddress, useQuadraticVoting, encryptedCoordinatorPrivateKey, startBlock, endBlock, blocksPerBatch, }: IGenerateArgs, options?: IGenerateProofsOptions): Promise<IGenerateData>;
|
|
40
40
|
/**
|
|
41
41
|
* Merge state and message trees
|
|
42
42
|
*
|
|
@@ -49,6 +49,6 @@ export declare class ProofGeneratorService {
|
|
|
49
49
|
*
|
|
50
50
|
* @param args - submit proofs on-chain arguments
|
|
51
51
|
*/
|
|
52
|
-
submit({ maciContractAddress, pollId, chain }: ISubmitProofsArgs): Promise<
|
|
52
|
+
submit({ maciContractAddress, pollId, sessionKeyAddress, approval, chain, }: ISubmitProofsArgs): Promise<ITallyData>;
|
|
53
53
|
}
|
|
54
54
|
//# sourceMappingURL=proof.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.service.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"proof.service.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,sBAAsB,EAG5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAgC,MAAM,oBAAoB,CAAC;AAOtF,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG3F,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE;;GAEG;AACH,qBACa,qBAAqB;IAe9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAhBrC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;gBAEgB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,kBAAkB;IAOzD;;;;;OAKG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAY9E;;;;;OAKG;IACG,QAAQ,CACZ,EACE,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,IAAI,EACJ,mBAAmB,EACnB,kBAAkB,EAClB,8BAA8B,EAC9B,UAAU,EACV,QAAQ,EACR,cAAc,GACf,EAAE,aAAa,EAChB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,aAAa,CAAC;IAmEzB;;;;;OAKG;IACG,KAAK,CAAC,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IAY9G;;;;OAIG;IACG,MAAM,CAAC,EACX,mBAAmB,EACnB,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;CAiB3C"}
|
|
@@ -8,15 +8,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
var ProofGeneratorService_1;
|
|
11
|
-
import { Keypair,
|
|
12
|
-
import { Deployment, EContracts,
|
|
11
|
+
import { Keypair, PrivateKey, PublicKey } from "@maci-protocol/domainobjs";
|
|
12
|
+
import { Deployment, EContracts, getPoll, mergeSignups, } from "@maci-protocol/sdk";
|
|
13
|
+
import { generateProofs, proveOnChain } from "@maci-protocol/sdk";
|
|
13
14
|
import { Logger, Injectable } from "@nestjs/common";
|
|
14
|
-
import { ZeroAddress } from "ethers";
|
|
15
15
|
import hre from "hardhat";
|
|
16
16
|
import fs from "fs";
|
|
17
17
|
import path from "path";
|
|
18
18
|
import { ErrorCodes } from "../common";
|
|
19
|
-
import { getPublicClient } from "../common/accountAbstraction";
|
|
20
19
|
import { CryptoService } from "../crypto/crypto.service";
|
|
21
20
|
import { FileService } from "../file/file.service";
|
|
22
21
|
import { SessionKeysService } from "../sessionKeys/sessionKeys.service";
|
|
@@ -65,13 +64,9 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
65
64
|
* @param args - generate proofs arguments
|
|
66
65
|
* @returns - generated proofs for message processing and tally
|
|
67
66
|
*/
|
|
68
|
-
async generate({ poll, maciContractAddress,
|
|
67
|
+
async generate({ approval, sessionKeyAddress, chain, poll, maciContractAddress, useQuadraticVoting, encryptedCoordinatorPrivateKey, startBlock, endBlock, blocksPerBatch, }, options) {
|
|
69
68
|
try {
|
|
70
|
-
const
|
|
71
|
-
name: EContracts.MACI,
|
|
72
|
-
address: maciContractAddress,
|
|
73
|
-
});
|
|
74
|
-
const signer = await this.deployment.getDeployer();
|
|
69
|
+
const signer = await this.sessionKeysService.getCoordinatorSigner(chain, sessionKeyAddress, approval);
|
|
75
70
|
const pollData = await getPoll({
|
|
76
71
|
maciAddress: maciContractAddress,
|
|
77
72
|
pollId: poll,
|
|
@@ -81,58 +76,39 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
81
76
|
name: EContracts.Poll,
|
|
82
77
|
address: pollData.address,
|
|
83
78
|
});
|
|
84
|
-
const
|
|
85
|
-
pollContract.coordinatorPubKey(),
|
|
86
|
-
pollContract.stateMerged(),
|
|
87
|
-
]);
|
|
88
|
-
if (!isStateAqMerged) {
|
|
89
|
-
this.logger.error(`Error: ${ErrorCodes.NOT_MERGED_STATE_TREE}, state tree is not merged`);
|
|
90
|
-
throw new Error(ErrorCodes.NOT_MERGED_STATE_TREE.toString());
|
|
91
|
-
}
|
|
79
|
+
const coordinatorPublicKey = await pollContract.coordinatorPublicKey();
|
|
92
80
|
const { privateKey } = await this.fileService.getPrivateKey();
|
|
93
|
-
const maciPrivateKey =
|
|
81
|
+
const maciPrivateKey = PrivateKey.deserialize(this.cryptoService.decrypt(privateKey, encryptedCoordinatorPrivateKey));
|
|
94
82
|
const coordinatorKeypair = new Keypair(maciPrivateKey);
|
|
95
|
-
const publicKey = new
|
|
83
|
+
const publicKey = new PublicKey([
|
|
96
84
|
BigInt(coordinatorPublicKey.x.toString()),
|
|
97
85
|
BigInt(coordinatorPublicKey.y.toString()),
|
|
98
86
|
]);
|
|
99
|
-
if (!coordinatorKeypair.
|
|
87
|
+
if (!coordinatorKeypair.publicKey.equals(publicKey)) {
|
|
100
88
|
this.logger.error(`Error: ${ErrorCodes.PRIVATE_KEY_MISMATCH}, wrong private key`);
|
|
101
89
|
throw new Error(ErrorCodes.PRIVATE_KEY_MISMATCH.toString());
|
|
102
90
|
}
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
maciPrivateKey,
|
|
108
|
-
coordinatorKeypair,
|
|
109
|
-
pollId: poll,
|
|
91
|
+
const tally = this.fileService.getZkeyFilePaths(process.env.COORDINATOR_TALLY_ZKEY_NAME, useQuadraticVoting);
|
|
92
|
+
const messageProcessor = this.fileService.getZkeyFilePaths(process.env.COORDINATOR_MESSAGE_PROCESS_ZKEY_NAME, useQuadraticVoting);
|
|
93
|
+
const { processProofs, tallyProofs, tallyData } = await generateProofs({
|
|
94
|
+
outputDir: path.resolve("./proofs"),
|
|
95
|
+
coordinatorPrivateKey: maciPrivateKey.serialize(),
|
|
110
96
|
signer,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
const foundPoll = maciState.polls.get(BigInt(poll));
|
|
119
|
-
if (!foundPoll) {
|
|
120
|
-
this.logger.error(`Error: ${ErrorCodes.POLL_NOT_FOUND}, Poll ${poll} not found in maci state`);
|
|
121
|
-
throw new Error(ErrorCodes.POLL_NOT_FOUND.toString());
|
|
122
|
-
}
|
|
123
|
-
const proofGenerator = new ProofGenerator({
|
|
124
|
-
poll: foundPoll,
|
|
125
|
-
maciContractAddress,
|
|
126
|
-
tallyContractAddress,
|
|
127
|
-
tally: this.fileService.getZkeyFilePaths(process.env.COORDINATOR_TALLY_ZKEY_NAME, useQuadraticVoting),
|
|
128
|
-
mp: this.fileService.getZkeyFilePaths(process.env.COORDINATOR_MESSAGE_PROCESS_ZKEY_NAME, useQuadraticVoting),
|
|
97
|
+
maciAddress: maciContractAddress,
|
|
98
|
+
pollId: BigInt(poll),
|
|
99
|
+
startBlock,
|
|
100
|
+
endBlock,
|
|
101
|
+
blocksPerBatch,
|
|
129
102
|
rapidsnark: process.env.COORDINATOR_RAPIDSNARK_EXE,
|
|
130
|
-
outputDir,
|
|
131
|
-
tallyOutputFile: path.resolve("./tally.json"),
|
|
132
103
|
useQuadraticVoting,
|
|
104
|
+
tallyZkey: tally.zkey,
|
|
105
|
+
tallyWitgen: tally.witgen,
|
|
106
|
+
tallyWasm: tally.wasm,
|
|
107
|
+
processZkey: messageProcessor.zkey,
|
|
108
|
+
processWitgen: messageProcessor.witgen,
|
|
109
|
+
processWasm: messageProcessor.wasm,
|
|
110
|
+
tallyFile: path.resolve("./tally.json"),
|
|
133
111
|
});
|
|
134
|
-
const processProofs = await proofGenerator.generateMpProofs(options);
|
|
135
|
-
const { proofs: tallyProofs, tallyData } = await proofGenerator.generateTallyProofs(hre.network.name, String(hre.network.config.chainId || 1), options);
|
|
136
112
|
return {
|
|
137
113
|
processProofs,
|
|
138
114
|
tallyProofs,
|
|
@@ -151,9 +127,7 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
151
127
|
* @returns whether the proofs were successfully merged
|
|
152
128
|
*/
|
|
153
129
|
async merge({ maciContractAddress, pollId, approval, sessionKeyAddress, chain }) {
|
|
154
|
-
|
|
155
|
-
const kernelClient = await this.sessionKeysService.generateClientFromSessionKey(sessionKeyAddress, approval, chain);
|
|
156
|
-
const signer = await this.sessionKeysService.getKernelClientSigner(kernelClient);
|
|
130
|
+
const signer = await this.sessionKeysService.getCoordinatorSigner(chain, sessionKeyAddress, approval);
|
|
157
131
|
await mergeSignups({
|
|
158
132
|
maciAddress: maciContractAddress,
|
|
159
133
|
pollId: BigInt(pollId),
|
|
@@ -166,74 +140,19 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
166
140
|
*
|
|
167
141
|
* @param args - submit proofs on-chain arguments
|
|
168
142
|
*/
|
|
169
|
-
async submit({ maciContractAddress, pollId, chain }) {
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
const pollAddress = pollContracts.poll;
|
|
179
|
-
if (pollAddress.toLowerCase() === ZeroAddress.toLowerCase()) {
|
|
180
|
-
this.logger.error(`Error: ${ErrorCodes.POLL_NOT_FOUND}, Poll ${pollId} not found`);
|
|
181
|
-
throw new Error(ErrorCodes.POLL_NOT_FOUND.toString());
|
|
182
|
-
}
|
|
183
|
-
// check if state tree has been merged
|
|
184
|
-
const isStateMerged = await publicClient.readContract({
|
|
185
|
-
address: pollAddress,
|
|
186
|
-
abi: PollFactory.abi,
|
|
187
|
-
functionName: "stateMerged",
|
|
143
|
+
async submit({ maciContractAddress, pollId, sessionKeyAddress, approval, chain, }) {
|
|
144
|
+
const signer = await this.sessionKeysService.getCoordinatorSigner(chain, sessionKeyAddress, approval);
|
|
145
|
+
const tallyData = await proveOnChain({
|
|
146
|
+
pollId: BigInt(pollId),
|
|
147
|
+
maciAddress: maciContractAddress,
|
|
148
|
+
proofDir: "./proofs",
|
|
149
|
+
tallyFile: "./tally.json",
|
|
150
|
+
signer,
|
|
188
151
|
});
|
|
189
|
-
if (!
|
|
190
|
-
|
|
191
|
-
throw new Error(ErrorCodes.NOT_MERGED_STATE_TREE.toString());
|
|
152
|
+
if (!tallyData) {
|
|
153
|
+
throw new Error("Tally data is undefined");
|
|
192
154
|
}
|
|
193
|
-
|
|
194
|
-
this.deployment.getContract({
|
|
195
|
-
name: EContracts.MACI,
|
|
196
|
-
address: maciContractAddress,
|
|
197
|
-
}),
|
|
198
|
-
this.deployment.getContract({
|
|
199
|
-
name: EContracts.MessageProcessor,
|
|
200
|
-
address: pollContracts.messageProcessor,
|
|
201
|
-
}),
|
|
202
|
-
this.deployment.getContract({
|
|
203
|
-
name: EContracts.Poll,
|
|
204
|
-
address: pollContracts.poll,
|
|
205
|
-
}),
|
|
206
|
-
this.deployment.getContract({
|
|
207
|
-
name: EContracts.Tally,
|
|
208
|
-
address: pollContracts.tally,
|
|
209
|
-
}),
|
|
210
|
-
this.deployment.getContract({ name: EContracts.VkRegistry }),
|
|
211
|
-
this.deployment.getContract({ name: EContracts.Verifier }),
|
|
212
|
-
]);
|
|
213
|
-
const prover = new Prover({
|
|
214
|
-
maciContract,
|
|
215
|
-
mpContract,
|
|
216
|
-
pollContract,
|
|
217
|
-
tallyContract,
|
|
218
|
-
vkRegistryContract,
|
|
219
|
-
verifierContract,
|
|
220
|
-
});
|
|
221
|
-
const data = {
|
|
222
|
-
processProofs: await this.readProofs(path.resolve("./proofs"), "process"),
|
|
223
|
-
tallyProofs: await this.readProofs(path.resolve("./proofs"), "tally"),
|
|
224
|
-
};
|
|
225
|
-
// prove message processing
|
|
226
|
-
await prover.proveMessageProcessing(data.processProofs);
|
|
227
|
-
// read tally data
|
|
228
|
-
const tallyData = await fs.promises
|
|
229
|
-
.readFile("./tally.json", "utf8")
|
|
230
|
-
.then((result) => JSON.parse(result));
|
|
231
|
-
// prove tally
|
|
232
|
-
await prover.proveTally(data.tallyProofs);
|
|
233
|
-
// submit results
|
|
234
|
-
const voteOptions = Number(await pollContract.voteOptions());
|
|
235
|
-
await prover.submitResults(tallyData, voteOptions);
|
|
236
|
-
return true;
|
|
155
|
+
return tallyData;
|
|
237
156
|
}
|
|
238
157
|
};
|
|
239
158
|
ProofGeneratorService = ProofGeneratorService_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.service.js","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"proof.service.js","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,UAAU,EACV,UAAU,EAGV,OAAO,EACP,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAsB,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,GAAG,MAAM,SAAS,CAAC;AAE1B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE;;GAEG;AAEI,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAeb;IACA;IACA;IAhBnB;;OAEG;IACc,UAAU,CAAa;IAExC;;OAEG;IACc,MAAM,CAAS;I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,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAEtG,MAAM,YAAY,CAAC;YACjB,WAAW,EAAE,mBAAmB;YAChC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;YACtB,MAAM;SACP,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,EACX,mBAAmB,EACnB,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACa;QAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAEtG,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC;YACnC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,cAAc;YACzB,MAAM;SACP,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAA;AA/KY,qBAAqB;IADjC,UAAU,EAAE;qCAgBuB,aAAa;QACf,WAAW;QACJ,kBAAkB;GAjB9C,qBAAqB,CA+KjC"}
|
|
@@ -24,6 +24,18 @@ export interface IReadProofsResults {
|
|
|
24
24
|
* Interface that represents generate proofs arguments
|
|
25
25
|
*/
|
|
26
26
|
export interface IGenerateArgs {
|
|
27
|
+
/**
|
|
28
|
+
* Approval for the session key
|
|
29
|
+
*/
|
|
30
|
+
approval?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Session key address
|
|
33
|
+
*/
|
|
34
|
+
sessionKeyAddress?: Hex;
|
|
35
|
+
/**
|
|
36
|
+
* Chain
|
|
37
|
+
*/
|
|
38
|
+
chain: ESupportedNetworks;
|
|
27
39
|
/**
|
|
28
40
|
* Poll id
|
|
29
41
|
*/
|
|
@@ -32,10 +44,6 @@ export interface IGenerateArgs {
|
|
|
32
44
|
* Maci contract address
|
|
33
45
|
*/
|
|
34
46
|
maciContractAddress: string;
|
|
35
|
-
/**
|
|
36
|
-
* Tally contract address
|
|
37
|
-
*/
|
|
38
|
-
tallyContractAddress: string;
|
|
39
47
|
/**
|
|
40
48
|
* Whether to use Qv or NonQv
|
|
41
49
|
*/
|
|
@@ -102,11 +110,11 @@ export interface IMergeArgs {
|
|
|
102
110
|
/**
|
|
103
111
|
* Approval for the session key
|
|
104
112
|
*/
|
|
105
|
-
approval
|
|
113
|
+
approval?: string;
|
|
106
114
|
/**
|
|
107
115
|
* Session key address
|
|
108
116
|
*/
|
|
109
|
-
sessionKeyAddress
|
|
117
|
+
sessionKeyAddress?: Hex;
|
|
110
118
|
/**
|
|
111
119
|
* Chain
|
|
112
120
|
*/
|
|
@@ -127,11 +135,11 @@ export interface ISubmitProofsArgs {
|
|
|
127
135
|
/**
|
|
128
136
|
* Approval for the session key
|
|
129
137
|
*/
|
|
130
|
-
approval
|
|
138
|
+
approval?: string;
|
|
131
139
|
/**
|
|
132
140
|
* Session key address
|
|
133
141
|
*/
|
|
134
|
-
sessionKeyAddress
|
|
142
|
+
sessionKeyAddress?: Hex;
|
|
135
143
|
/**
|
|
136
144
|
* Chain
|
|
137
145
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../ts/proof/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,oBAAY,sBAAsB;IAChC,KAAK,qBAAqB;IAC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H,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IAExB;;OAEG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,GAAG,CAAC;IAExB;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,GAAG,CAAC;IAExB;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC;CAC3B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { KernelAccountClient } from "@zerodev/sdk";
|
|
2
|
+
import { encodeFunctionData } from "viem";
|
|
3
|
+
import { EventEmitter } from "events";
|
|
4
|
+
import type { EIP1193Parameters, EIP1193RequestFn, Hex } from "viem";
|
|
5
|
+
export declare const SafeCreateCallAbi: readonly [{
|
|
6
|
+
readonly name: "performCreate";
|
|
7
|
+
readonly type: "function";
|
|
8
|
+
readonly stateMutability: "nonpayable";
|
|
9
|
+
readonly inputs: readonly [{
|
|
10
|
+
readonly type: "uint256";
|
|
11
|
+
readonly name: "value";
|
|
12
|
+
}, {
|
|
13
|
+
readonly type: "bytes";
|
|
14
|
+
readonly name: "deploymentData";
|
|
15
|
+
}];
|
|
16
|
+
readonly outputs: readonly [{
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
readonly name: "newContract";
|
|
19
|
+
}];
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "performCreate2";
|
|
22
|
+
readonly type: "function";
|
|
23
|
+
readonly stateMutability: "nonpayable";
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly type: "uint256";
|
|
26
|
+
readonly name: "value";
|
|
27
|
+
}, {
|
|
28
|
+
readonly type: "bytes";
|
|
29
|
+
readonly name: "deploymentData";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "bytes32";
|
|
32
|
+
readonly name: "salt";
|
|
33
|
+
}];
|
|
34
|
+
readonly outputs: readonly [{
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
readonly name: "newContract";
|
|
37
|
+
}];
|
|
38
|
+
}];
|
|
39
|
+
type EncodeExecuteDelegateCallArgs = Parameters<typeof encodeFunctionData<typeof SafeCreateCallAbi, "performCreate">>[0]["args"];
|
|
40
|
+
export declare const encodeSafeCreateCall: (args: EncodeExecuteDelegateCallArgs) => Hex;
|
|
41
|
+
export declare class KernelEIP1193Provider extends EventEmitter {
|
|
42
|
+
private kernelClient;
|
|
43
|
+
constructor(kernelClient: KernelAccountClient);
|
|
44
|
+
request({ method, params }: EIP1193Parameters): ReturnType<EIP1193RequestFn>;
|
|
45
|
+
private handleEthRequestAccounts;
|
|
46
|
+
private handleEthAccounts;
|
|
47
|
+
private handleEthSendTransaction;
|
|
48
|
+
private handleEthSign;
|
|
49
|
+
private handlePersonalSign;
|
|
50
|
+
private handleEthSignTypedDataV4;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=KernelEIP1193Provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelEIP1193Provider.d.ts","sourceRoot":"","sources":["../../../../ts/sessionKeys/provider/KernelEIP1193Provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAY,MAAM,MAAM,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAQ,GAAG,EAA8C,MAAM,MAAM,CAAC;AAEvH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG5B,CAAC;AAEH,KAAK,6BAA6B,GAAG,UAAU,CAC7C,OAAO,kBAAkB,CAAC,OAAO,iBAAiB,EAAE,eAAe,CAAC,CACrE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEb,eAAO,MAAM,oBAAoB,GAAI,MAAM,6BAA6B,KAAG,GAKvE,CAAC;AAEL,qBAAa,qBAAsB,SAAQ,YAAY;IACrD,OAAO,CAAC,YAAY,CAAsB;gBAE9B,YAAY,EAAE,mBAAmB;IAKvC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAW,EAAE,EAAE,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAoBvF,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,iBAAiB;YAQX,wBAAwB;YAexB,aAAa;YAiBb,kBAAkB;YAiBlB,wBAAwB;CA0BvC"}
|