@maci-protocol/coordinator 0.0.0-ci.d969539 → 0.0.0-ci.da13fbb
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 +31 -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 +18 -25
- package/build/tests/e2e.aa.test.js.map +1 -1
- package/build/tests/e2e.deploy.test.js +127 -82
- 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 +9 -13
- 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 +15 -44
- 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 +32 -0
- package/build/ts/common/chain.js.map +1 -0
- package/build/ts/common/coordinatorKeypair.d.ts +7 -0
- package/build/ts/common/coordinatorKeypair.d.ts.map +1 -0
- package/build/ts/common/coordinatorKeypair.js +14 -0
- package/build/ts/common/coordinatorKeypair.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 +27 -1
- package/build/ts/deployer/__tests__/utils.d.ts.map +1 -1
- package/build/ts/deployer/__tests__/utils.js +40 -11
- 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 +176 -462
- 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 +53 -26
- package/build/ts/deployer/types.d.ts.map +1 -1
- package/build/ts/file/__tests__/file.service.test.js +12 -11
- package/build/ts/file/__tests__/file.service.test.js.map +1 -1
- package/build/ts/file/file.service.d.ts +4 -3
- package/build/ts/file/file.service.d.ts.map +1 -1
- package/build/ts/file/file.service.js +14 -9
- package/build/ts/file/file.service.js.map +1 -1
- package/build/ts/file/types.d.ts +2 -2
- package/build/ts/file/types.d.ts.map +1 -1
- package/build/ts/proof/__tests__/proof.controller.test.js +5 -3
- package/build/ts/proof/__tests__/proof.controller.test.js.map +1 -1
- package/build/ts/proof/__tests__/proof.gateway.test.js +6 -3
- package/build/ts/proof/__tests__/proof.gateway.test.js.map +1 -1
- package/build/ts/proof/__tests__/proof.service.test.js +18 -31
- package/build/ts/proof/__tests__/proof.service.test.js.map +1 -1
- package/build/ts/proof/dto.d.ts +13 -15
- package/build/ts/proof/dto.d.ts.map +1 -1
- package/build/ts/proof/dto.js +51 -44
- 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 +1 -4
- package/build/ts/proof/proof.controller.js.map +1 -1
- package/build/ts/proof/proof.service.d.ts +4 -6
- package/build/ts/proof/proof.service.d.ts.map +1 -1
- package/build/ts/proof/proof.service.js +48 -130
- package/build/ts/proof/proof.service.js.map +1 -1
- package/build/ts/proof/types.d.ts +19 -14
- 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 +32 -32
- 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
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { EPolicies,
|
|
1
|
+
import { EPolicies, EInitialVoiceCreditProxies, EMode, ISetVerifyingKeysArgs, BasePolicy, ConstantInitialVoiceCreditProxy } from "@maci-protocol/sdk";
|
|
2
2
|
import { Signer } from "ethers";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ESupportedNetworks, KernelClientType, BundlerClientType, PublicClientType } from "../common";
|
|
3
|
+
import { type Hex } from "viem";
|
|
4
|
+
import { ESupportedNetworks } from "../common";
|
|
6
5
|
import { FileService } from "../file/file.service";
|
|
7
6
|
import { SessionKeysService } from "../sessionKeys/sessionKeys.service";
|
|
8
|
-
import {
|
|
7
|
+
import { IDeployMaciArgs, IDeployPollArgs, IPolicyArgs, IInitialVoiceCreditProxyArgs, IVerifyingKeysRegistryArgs } from "./types";
|
|
9
8
|
/**
|
|
10
9
|
* DeployerService is responsible for deploying contracts.
|
|
11
10
|
*/
|
|
12
11
|
export declare class DeployerService {
|
|
13
12
|
private readonly sessionKeysService;
|
|
14
13
|
private readonly fileService;
|
|
15
|
-
/**
|
|
16
|
-
* Logger
|
|
17
|
-
*/
|
|
18
|
-
private readonly logger;
|
|
19
14
|
/**
|
|
20
15
|
* Contract storage instance
|
|
21
16
|
*/
|
|
@@ -27,67 +22,36 @@ export declare class DeployerService {
|
|
|
27
22
|
*/
|
|
28
23
|
constructor(sessionKeysService: SessionKeysService, fileService: FileService);
|
|
29
24
|
/**
|
|
30
|
-
* Get the policy
|
|
31
|
-
*
|
|
25
|
+
* Get the policy contract object
|
|
26
|
+
* always deploy and save it
|
|
32
27
|
*
|
|
28
|
+
* @param signer - the signer
|
|
33
29
|
* @param policyType - the policy type
|
|
34
30
|
* @param network - the network
|
|
35
31
|
* @param args - the policy args
|
|
36
|
-
* @returns - the policy
|
|
32
|
+
* @returns - the policy contract
|
|
37
33
|
*/
|
|
38
|
-
|
|
34
|
+
deployAndSavePolicy(signer: Signer, policyType: EPolicies, network: ESupportedNetworks, args?: IPolicyArgs): Promise<BasePolicy>;
|
|
39
35
|
/**
|
|
40
|
-
* Get the voice credit proxy
|
|
41
|
-
*
|
|
36
|
+
* Get the voice credit proxy contract object
|
|
37
|
+
* always deploy and save it
|
|
42
38
|
*
|
|
39
|
+
* @param signer - the signer
|
|
43
40
|
* @param voiceCreditProxyType - the voice credit proxy type
|
|
44
41
|
* @param network - the network
|
|
45
|
-
* @param args - the voice credit proxy args
|
|
46
|
-
* @returns - the voice credit proxy abi and bytecode
|
|
47
|
-
*/
|
|
48
|
-
getVoiceCreditProxyData(voiceCreditProxyType: EInitialVoiceCreditProxies, network: ESupportedNetworks, args: IInitialVoiceCreditProxyArgs): IContractData;
|
|
49
|
-
/**
|
|
50
|
-
* @param abi - the abi
|
|
51
|
-
* @param bytecode - the bytecode
|
|
52
|
-
* @param args - the args
|
|
53
|
-
* @param publicClient - the public client
|
|
54
|
-
* @returns - the address
|
|
55
|
-
*/
|
|
56
|
-
deployAndGetAddress(kernelClient: KernelClientType, abi: Abi, bytecode: Hex, args: unknown[], bundlerClient: BundlerClientType, publicClient: PublicClientType): Promise<string | undefined>;
|
|
57
|
-
/**
|
|
58
|
-
* Deploy a contract and store the address
|
|
59
|
-
*
|
|
60
|
-
* @param contract - the contract to deploy
|
|
61
|
-
* @param args - the args
|
|
62
|
-
* @param abi - the abi
|
|
63
|
-
* @param bytecode - the bytecode
|
|
64
|
-
* @param kernelClient - the kernel client
|
|
65
|
-
* @param publicClient - the public client
|
|
66
|
-
* @param chain - the chain
|
|
67
|
-
* @returns - the address of the deployed contract
|
|
68
|
-
*/
|
|
69
|
-
deployAndStore(contract: EContracts, args: unknown[], abi: Abi, bytecode: Hex, kernelClient: KernelClientType, bundlerClient: BundlerClientType, publicClient: PublicClientType, chain: ESupportedNetworks): Promise<Hex>;
|
|
70
|
-
/**
|
|
71
|
-
* Estimate gas, add a bit extra and send the user operation (aka. transaction)
|
|
72
|
-
* @param to - the to address of the user operation
|
|
73
|
-
* @param value - the value of the user operation
|
|
74
|
-
* @param abi - the abi
|
|
75
|
-
* @param functionName - the function name
|
|
76
42
|
* @param args - the args
|
|
77
|
-
* @
|
|
78
|
-
* @param kernelClient - the kernel client
|
|
79
|
-
* @param bundlerClient - the bundler client
|
|
43
|
+
* @returns - the voice credit proxy contract
|
|
80
44
|
*/
|
|
81
|
-
|
|
45
|
+
deployAndSaveVoiceCreditProxy(signer: Signer, voiceCreditProxyType: EInitialVoiceCreditProxies, network: ESupportedNetworks, args?: IInitialVoiceCreditProxyArgs): Promise<ConstantInitialVoiceCreditProxy>;
|
|
82
46
|
/**
|
|
83
47
|
* Get verifying keys arguments (specially zkey paths)
|
|
84
48
|
* @param signer - the signer
|
|
85
|
-
* @param
|
|
86
|
-
* @param
|
|
49
|
+
* @param verifyingKeysRegistryContract - the deployed verifyingKey registry contract
|
|
50
|
+
* @param verifyingKeysRegistryArgs - the arguments send to the endpoint
|
|
87
51
|
* @param mode - use QV or NON_QV
|
|
88
52
|
* @returns SetVerifyingKeysArgs
|
|
89
53
|
*/
|
|
90
|
-
getVerifyingKeysArgs(signer: Signer,
|
|
54
|
+
getVerifyingKeysArgs(signer: Signer, verifyingKeysRegistryAddress: Hex, verifyingKeysRegistryArgs: IVerifyingKeysRegistryArgs, mode: EMode): Promise<ISetVerifyingKeysArgs>;
|
|
91
55
|
/**
|
|
92
56
|
* Deploy MACI contracts
|
|
93
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployer.service.d.ts","sourceRoot":"","sources":["../../../ts/deployer/deployer.service.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"deployer.service.d.ts","sourceRoot":"","sources":["../../../ts/deployer/deployer.service.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,SAAS,EAOT,0BAA0B,EAC1B,KAAK,EAEL,qBAAqB,EAarB,UAAU,EAIV,+BAA+B,EAEhC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAgB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAIhC,OAAO,EAAc,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EACL,eAAe,EACf,eAAe,EACf,WAAW,EACX,4BAA4B,EAU5B,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBACa,eAAe;IAYxB,OAAO,CAAC,QAAQ,CAAC,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