@maci-protocol/coordinator 0.0.0-ci.00107eb
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/CHANGELOG.md +51 -0
- package/LICENSE +21 -0
- package/README.md +103 -0
- package/build/hardhat.config.cjs +39 -0
- package/build/hardhat.config.cjs.map +1 -0
- package/build/hardhat.config.d.cts +27 -0
- package/build/hardhat.config.d.cts.map +1 -0
- package/build/scripts/generateKeypair.d.ts +2 -0
- package/build/scripts/generateKeypair.d.ts.map +1 -0
- package/build/scripts/generateKeypair.js +25 -0
- package/build/scripts/generateKeypair.js.map +1 -0
- package/build/scripts/generateMaciKeyPair.d.ts +2 -0
- package/build/scripts/generateMaciKeyPair.d.ts.map +1 -0
- package/build/scripts/generateMaciKeyPair.js +3 -0
- package/build/scripts/generateMaciKeyPair.js.map +1 -0
- package/build/scripts/getAuthHeader.d.ts +2 -0
- package/build/scripts/getAuthHeader.d.ts.map +1 -0
- package/build/scripts/getAuthHeader.js +31 -0
- package/build/scripts/getAuthHeader.js.map +1 -0
- package/build/tests/constants.d.ts +7 -0
- package/build/tests/constants.d.ts.map +1 -0
- package/build/tests/constants.js +11 -0
- package/build/tests/constants.js.map +1 -0
- package/build/tests/e2e.deploy.test.d.ts +2 -0
- package/build/tests/e2e.deploy.test.d.ts.map +1 -0
- package/build/tests/e2e.deploy.test.js +264 -0
- package/build/tests/e2e.deploy.test.js.map +1 -0
- package/build/tests/e2e.redis.test.d.ts +2 -0
- package/build/tests/e2e.redis.test.d.ts.map +1 -0
- package/build/tests/e2e.redis.test.js +118 -0
- package/build/tests/e2e.redis.test.js.map +1 -0
- package/build/tests/utils.d.ts +20 -0
- package/build/tests/utils.d.ts.map +1 -0
- package/build/tests/utils.js +55 -0
- package/build/tests/utils.js.map +1 -0
- package/build/ts/app.module.d.ts +3 -0
- package/build/ts/app.module.d.ts.map +1 -0
- package/build/ts/app.module.js +42 -0
- package/build/ts/app.module.js.map +1 -0
- package/build/ts/auth/AccountSignatureGuard.service.d.ts +44 -0
- package/build/ts/auth/AccountSignatureGuard.service.d.ts.map +1 -0
- package/build/ts/auth/AccountSignatureGuard.service.js +96 -0
- package/build/ts/auth/AccountSignatureGuard.service.js.map +1 -0
- package/build/ts/auth/__tests__/AccountSignatureGuard.test.d.ts +2 -0
- package/build/ts/auth/__tests__/AccountSignatureGuard.test.d.ts.map +1 -0
- package/build/ts/auth/__tests__/AccountSignatureGuard.test.js +113 -0
- package/build/ts/auth/__tests__/AccountSignatureGuard.test.js.map +1 -0
- package/build/ts/common/__tests__/common.test.d.ts +2 -0
- package/build/ts/common/__tests__/common.test.d.ts.map +1 -0
- package/build/ts/common/__tests__/common.test.js +77 -0
- package/build/ts/common/__tests__/common.test.js.map +1 -0
- package/build/ts/common/accountAbstraction.d.ts +38 -0
- package/build/ts/common/accountAbstraction.d.ts.map +1 -0
- package/build/ts/common/accountAbstraction.js +83 -0
- package/build/ts/common/accountAbstraction.js.map +1 -0
- package/build/ts/common/chain.d.ts +22 -0
- package/build/ts/common/chain.d.ts.map +1 -0
- package/build/ts/common/chain.js +37 -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 +36 -0
- package/build/ts/common/errors.d.ts.map +1 -0
- package/build/ts/common/errors.js +37 -0
- package/build/ts/common/errors.js.map +1 -0
- package/build/ts/common/http.d.ts +6 -0
- package/build/ts/common/http.d.ts.map +1 -0
- package/build/ts/common/http.js +49 -0
- package/build/ts/common/http.js.map +1 -0
- package/build/ts/common/index.d.ts +6 -0
- package/build/ts/common/index.d.ts.map +1 -0
- package/build/ts/common/index.js +6 -0
- package/build/ts/common/index.js.map +1 -0
- package/build/ts/common/networks.d.ts +10 -0
- package/build/ts/common/networks.d.ts.map +1 -0
- package/build/ts/common/networks.js +61 -0
- package/build/ts/common/networks.js.map +1 -0
- package/build/ts/common/types.d.ts +8 -0
- package/build/ts/common/types.d.ts.map +1 -0
- package/build/ts/common/types.js +2 -0
- package/build/ts/common/types.js.map +1 -0
- package/build/ts/crypto/__tests__/crypto.service.test.d.ts +2 -0
- package/build/ts/crypto/__tests__/crypto.service.test.d.ts.map +1 -0
- package/build/ts/crypto/__tests__/crypto.service.test.js +26 -0
- package/build/ts/crypto/__tests__/crypto.service.test.js.map +1 -0
- package/build/ts/crypto/crypto.module.d.ts +3 -0
- package/build/ts/crypto/crypto.module.d.ts.map +1 -0
- package/build/ts/crypto/crypto.module.js +18 -0
- package/build/ts/crypto/crypto.module.js.map +1 -0
- package/build/ts/crypto/crypto.service.d.ts +31 -0
- package/build/ts/crypto/crypto.service.d.ts.map +1 -0
- package/build/ts/crypto/crypto.service.js +68 -0
- package/build/ts/crypto/crypto.service.js.map +1 -0
- package/build/ts/deployer/__tests__/deployer.controller.test.d.ts +2 -0
- package/build/ts/deployer/__tests__/deployer.controller.test.d.ts.map +1 -0
- package/build/ts/deployer/__tests__/deployer.controller.test.js +82 -0
- package/build/ts/deployer/__tests__/deployer.controller.test.js.map +1 -0
- package/build/ts/deployer/__tests__/deployer.service.test.d.ts +2 -0
- package/build/ts/deployer/__tests__/deployer.service.test.d.ts.map +1 -0
- package/build/ts/deployer/__tests__/deployer.service.test.js +272 -0
- package/build/ts/deployer/__tests__/deployer.service.test.js.map +1 -0
- package/build/ts/deployer/__tests__/utils.d.ts +61 -0
- package/build/ts/deployer/__tests__/utils.d.ts.map +1 -0
- package/build/ts/deployer/__tests__/utils.js +122 -0
- package/build/ts/deployer/__tests__/utils.js.map +1 -0
- package/build/ts/deployer/constants.d.ts +13 -0
- package/build/ts/deployer/constants.d.ts.map +1 -0
- package/build/ts/deployer/constants.js +13 -0
- package/build/ts/deployer/constants.js.map +1 -0
- package/build/ts/deployer/deployer.controller.d.ts +34 -0
- package/build/ts/deployer/deployer.controller.d.ts.map +1 -0
- package/build/ts/deployer/deployer.controller.js +102 -0
- package/build/ts/deployer/deployer.controller.js.map +1 -0
- package/build/ts/deployer/deployer.module.d.ts +3 -0
- package/build/ts/deployer/deployer.module.d.ts.map +1 -0
- package/build/ts/deployer/deployer.module.js +23 -0
- package/build/ts/deployer/deployer.module.js.map +1 -0
- package/build/ts/deployer/deployer.service.d.ts +85 -0
- package/build/ts/deployer/deployer.service.d.ts.map +1 -0
- package/build/ts/deployer/deployer.service.js +505 -0
- package/build/ts/deployer/deployer.service.js.map +1 -0
- package/build/ts/deployer/dto.d.ts +46 -0
- package/build/ts/deployer/dto.d.ts.map +1 -0
- package/build/ts/deployer/dto.js +125 -0
- package/build/ts/deployer/dto.js.map +1 -0
- package/build/ts/deployer/types.d.ts +351 -0
- package/build/ts/deployer/types.d.ts.map +1 -0
- package/build/ts/deployer/types.js +2 -0
- package/build/ts/deployer/types.js.map +1 -0
- package/build/ts/file/__tests__/file.service.test.d.ts +2 -0
- package/build/ts/file/__tests__/file.service.test.d.ts.map +1 -0
- package/build/ts/file/__tests__/file.service.test.js +77 -0
- package/build/ts/file/__tests__/file.service.test.js.map +1 -0
- package/build/ts/file/file.module.d.ts +3 -0
- package/build/ts/file/file.module.d.ts.map +1 -0
- package/build/ts/file/file.module.js +18 -0
- package/build/ts/file/file.module.js.map +1 -0
- package/build/ts/file/file.service.d.ts +63 -0
- package/build/ts/file/file.service.d.ts.map +1 -0
- package/build/ts/file/file.service.js +121 -0
- package/build/ts/file/file.service.js.map +1 -0
- package/build/ts/file/types.d.ts +36 -0
- package/build/ts/file/types.d.ts.map +1 -0
- package/build/ts/file/types.js +2 -0
- package/build/ts/file/types.js.map +1 -0
- package/build/ts/health/__tests__/health.controller.test.d.ts +2 -0
- package/build/ts/health/__tests__/health.controller.test.d.ts.map +1 -0
- package/build/ts/health/__tests__/health.controller.test.js +52 -0
- package/build/ts/health/__tests__/health.controller.test.js.map +1 -0
- package/build/ts/health/__tests__/health.service.test.d.ts +2 -0
- package/build/ts/health/__tests__/health.service.test.d.ts.map +1 -0
- package/build/ts/health/__tests__/health.service.test.js +101 -0
- package/build/ts/health/__tests__/health.service.test.js.map +1 -0
- package/build/ts/health/health.controller.d.ts +16 -0
- package/build/ts/health/health.controller.d.ts.map +1 -0
- package/build/ts/health/health.controller.js +43 -0
- package/build/ts/health/health.controller.js.map +1 -0
- package/build/ts/health/health.module.d.ts +3 -0
- package/build/ts/health/health.module.d.ts.map +1 -0
- package/build/ts/health/health.module.js +22 -0
- package/build/ts/health/health.module.js.map +1 -0
- package/build/ts/health/health.service.d.ts +42 -0
- package/build/ts/health/health.service.d.ts.map +1 -0
- package/build/ts/health/health.service.js +176 -0
- package/build/ts/health/health.service.js.map +1 -0
- package/build/ts/health/types.d.ts +87 -0
- package/build/ts/health/types.d.ts.map +1 -0
- package/build/ts/health/types.js +2 -0
- package/build/ts/health/types.js.map +1 -0
- package/build/ts/jest/__mocks__/@openzeppelin/merkle-tree.d.ts +11 -0
- package/build/ts/jest/__mocks__/@openzeppelin/merkle-tree.d.ts.map +1 -0
- package/build/ts/jest/__mocks__/@openzeppelin/merkle-tree.js +12 -0
- package/build/ts/jest/__mocks__/@openzeppelin/merkle-tree.js.map +1 -0
- package/build/ts/jest/setup.d.ts +8 -0
- package/build/ts/jest/setup.d.ts.map +1 -0
- package/build/ts/jest/setup.js +2 -0
- package/build/ts/jest/setup.js.map +1 -0
- package/build/ts/jest/transform.d.ts +8 -0
- package/build/ts/jest/transform.d.ts.map +1 -0
- package/build/ts/jest/transform.js +10 -0
- package/build/ts/jest/transform.js.map +1 -0
- package/build/ts/main.d.ts +2 -0
- package/build/ts/main.d.ts.map +1 -0
- package/build/ts/main.js +46 -0
- package/build/ts/main.js.map +1 -0
- package/build/ts/proof/__tests__/proof.controller.test.d.ts +2 -0
- package/build/ts/proof/__tests__/proof.controller.test.d.ts.map +1 -0
- package/build/ts/proof/__tests__/proof.controller.test.js +90 -0
- package/build/ts/proof/__tests__/proof.controller.test.js.map +1 -0
- package/build/ts/proof/__tests__/proof.gateway.test.d.ts +2 -0
- package/build/ts/proof/__tests__/proof.gateway.test.d.ts.map +1 -0
- package/build/ts/proof/__tests__/proof.gateway.test.js +63 -0
- package/build/ts/proof/__tests__/proof.gateway.test.js.map +1 -0
- package/build/ts/proof/__tests__/proof.service.test.d.ts +2 -0
- package/build/ts/proof/__tests__/proof.service.test.d.ts.map +1 -0
- package/build/ts/proof/__tests__/proof.service.test.js +84 -0
- package/build/ts/proof/__tests__/proof.service.test.js.map +1 -0
- package/build/ts/proof/dto.d.ts +70 -0
- package/build/ts/proof/dto.d.ts.map +1 -0
- package/build/ts/proof/dto.js +261 -0
- package/build/ts/proof/dto.js.map +1 -0
- package/build/ts/proof/proof.controller.d.ts +47 -0
- package/build/ts/proof/proof.controller.d.ts.map +1 -0
- package/build/ts/proof/proof.controller.js +158 -0
- package/build/ts/proof/proof.controller.js.map +1 -0
- package/build/ts/proof/proof.gateway.d.ts +35 -0
- package/build/ts/proof/proof.gateway.d.ts.map +1 -0
- package/build/ts/proof/proof.gateway.js +93 -0
- package/build/ts/proof/proof.gateway.js.map +1 -0
- package/build/ts/proof/proof.module.d.ts +3 -0
- package/build/ts/proof/proof.module.d.ts.map +1 -0
- package/build/ts/proof/proof.module.js +25 -0
- package/build/ts/proof/proof.module.js.map +1 -0
- package/build/ts/proof/proof.service.d.ts +52 -0
- package/build/ts/proof/proof.service.d.ts.map +1 -0
- package/build/ts/proof/proof.service.js +164 -0
- package/build/ts/proof/proof.service.js.map +1 -0
- package/build/ts/proof/types.d.ts +144 -0
- package/build/ts/proof/types.d.ts.map +1 -0
- package/build/ts/proof/types.js +11 -0
- package/build/ts/proof/types.js.map +1 -0
- package/build/ts/redis/__tests__/redis.service.test.d.ts +2 -0
- package/build/ts/redis/__tests__/redis.service.test.d.ts.map +1 -0
- package/build/ts/redis/__tests__/redis.service.test.js +148 -0
- package/build/ts/redis/__tests__/redis.service.test.js.map +1 -0
- package/build/ts/redis/redis.module.d.ts +3 -0
- package/build/ts/redis/redis.module.d.ts.map +1 -0
- package/build/ts/redis/redis.module.js +18 -0
- package/build/ts/redis/redis.module.js.map +1 -0
- package/build/ts/redis/redis.service.d.ts +53 -0
- package/build/ts/redis/redis.service.d.ts.map +1 -0
- package/build/ts/redis/redis.service.js +99 -0
- package/build/ts/redis/redis.service.js.map +1 -0
- package/build/ts/redis/types.d.ts +66 -0
- package/build/ts/redis/types.d.ts.map +1 -0
- package/build/ts/redis/types.js +2 -0
- package/build/ts/redis/types.js.map +1 -0
- package/build/ts/redis/utils.d.ts +20 -0
- package/build/ts/redis/utils.d.ts.map +1 -0
- package/build/ts/redis/utils.js +27 -0
- package/build/ts/redis/utils.js.map +1 -0
- package/build/ts/scheduler/__tests__/scheduler.controller.test.d.ts +2 -0
- package/build/ts/scheduler/__tests__/scheduler.controller.test.d.ts.map +1 -0
- package/build/ts/scheduler/__tests__/scheduler.controller.test.js +62 -0
- package/build/ts/scheduler/__tests__/scheduler.controller.test.js.map +1 -0
- package/build/ts/scheduler/__tests__/scheduler.service.test.d.ts +2 -0
- package/build/ts/scheduler/__tests__/scheduler.service.test.d.ts.map +1 -0
- package/build/ts/scheduler/__tests__/scheduler.service.test.js +369 -0
- package/build/ts/scheduler/__tests__/scheduler.service.test.js.map +1 -0
- package/build/ts/scheduler/dto.d.ts +41 -0
- package/build/ts/scheduler/dto.d.ts.map +1 -0
- package/build/ts/scheduler/dto.js +115 -0
- package/build/ts/scheduler/dto.js.map +1 -0
- package/build/ts/scheduler/scheduler.controller.d.ts +32 -0
- package/build/ts/scheduler/scheduler.controller.d.ts.map +1 -0
- package/build/ts/scheduler/scheduler.controller.js +118 -0
- package/build/ts/scheduler/scheduler.controller.js.map +1 -0
- package/build/ts/scheduler/scheduler.module.d.ts +3 -0
- package/build/ts/scheduler/scheduler.module.d.ts.map +1 -0
- package/build/ts/scheduler/scheduler.module.js +24 -0
- package/build/ts/scheduler/scheduler.module.js.map +1 -0
- package/build/ts/scheduler/scheduler.service.d.ts +71 -0
- package/build/ts/scheduler/scheduler.service.d.ts.map +1 -0
- package/build/ts/scheduler/scheduler.service.js +297 -0
- package/build/ts/scheduler/scheduler.service.js.map +1 -0
- package/build/ts/scheduler/types.d.ts +65 -0
- package/build/ts/scheduler/types.d.ts.map +1 -0
- package/build/ts/scheduler/types.js +2 -0
- package/build/ts/scheduler/types.js.map +1 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.controller.test.d.ts +2 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.controller.test.d.ts.map +1 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.controller.test.js +44 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.controller.test.js.map +1 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.service.test.d.ts +2 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.service.test.d.ts.map +1 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.service.test.js +76 -0
- package/build/ts/sessionKeys/__tests__/sessionKeys.service.test.js.map +1 -0
- package/build/ts/sessionKeys/__tests__/utils.d.ts +25 -0
- package/build/ts/sessionKeys/__tests__/utils.d.ts.map +1 -0
- package/build/ts/sessionKeys/__tests__/utils.js +65 -0
- package/build/ts/sessionKeys/__tests__/utils.js.map +1 -0
- package/build/ts/sessionKeys/dto.d.ts +11 -0
- package/build/ts/sessionKeys/dto.d.ts.map +1 -0
- package/build/ts/sessionKeys/dto.js +29 -0
- package/build/ts/sessionKeys/dto.js.map +1 -0
- 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.controller.d.ts +26 -0
- package/build/ts/sessionKeys/sessionKeys.controller.d.ts.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.controller.js +74 -0
- package/build/ts/sessionKeys/sessionKeys.controller.js.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.module.d.ts +3 -0
- package/build/ts/sessionKeys/sessionKeys.module.d.ts.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.module.js +23 -0
- package/build/ts/sessionKeys/sessionKeys.module.js.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.service.d.ts +62 -0
- package/build/ts/sessionKeys/sessionKeys.service.d.ts.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.service.js +121 -0
- package/build/ts/sessionKeys/sessionKeys.service.js.map +1 -0
- package/build/ts/sessionKeys/types.d.ts +11 -0
- package/build/ts/sessionKeys/types.d.ts.map +1 -0
- package/build/ts/sessionKeys/types.js +2 -0
- package/build/ts/sessionKeys/types.js.map +1 -0
- package/build/ts/subgraph/__tests__/subgraph.controller.test.d.ts +2 -0
- package/build/ts/subgraph/__tests__/subgraph.controller.test.d.ts.map +1 -0
- package/build/ts/subgraph/__tests__/subgraph.controller.test.js +50 -0
- package/build/ts/subgraph/__tests__/subgraph.controller.test.js.map +1 -0
- package/build/ts/subgraph/__tests__/subgraph.gateway.test.d.ts +2 -0
- package/build/ts/subgraph/__tests__/subgraph.gateway.test.d.ts.map +1 -0
- package/build/ts/subgraph/__tests__/subgraph.gateway.test.js +83 -0
- package/build/ts/subgraph/__tests__/subgraph.gateway.test.js.map +1 -0
- package/build/ts/subgraph/__tests__/subgraph.service.test.d.ts +2 -0
- package/build/ts/subgraph/__tests__/subgraph.service.test.d.ts.map +1 -0
- package/build/ts/subgraph/__tests__/subgraph.service.test.js +58 -0
- package/build/ts/subgraph/__tests__/subgraph.service.test.js.map +1 -0
- package/build/ts/subgraph/dto.d.ts +27 -0
- package/build/ts/subgraph/dto.d.ts.map +1 -0
- package/build/ts/subgraph/dto.js +83 -0
- package/build/ts/subgraph/dto.js.map +1 -0
- package/build/ts/subgraph/subgraph.controller.d.ts +24 -0
- package/build/ts/subgraph/subgraph.controller.d.ts.map +1 -0
- package/build/ts/subgraph/subgraph.controller.js +71 -0
- package/build/ts/subgraph/subgraph.controller.js.map +1 -0
- package/build/ts/subgraph/subgraph.gateway.d.ts +35 -0
- package/build/ts/subgraph/subgraph.gateway.d.ts.map +1 -0
- package/build/ts/subgraph/subgraph.gateway.js +93 -0
- package/build/ts/subgraph/subgraph.gateway.js.map +1 -0
- package/build/ts/subgraph/subgraph.module.d.ts +3 -0
- package/build/ts/subgraph/subgraph.module.d.ts.map +1 -0
- package/build/ts/subgraph/subgraph.module.js +23 -0
- package/build/ts/subgraph/subgraph.module.js.map +1 -0
- package/build/ts/subgraph/subgraph.service.d.ts +24 -0
- package/build/ts/subgraph/subgraph.service.d.ts.map +1 -0
- package/build/ts/subgraph/subgraph.service.js +119 -0
- package/build/ts/subgraph/subgraph.service.js.map +1 -0
- package/build/ts/subgraph/types.d.ts +93 -0
- package/build/ts/subgraph/types.d.ts.map +1 -0
- package/build/ts/subgraph/types.js +24 -0
- package/build/ts/subgraph/types.js.map +1 -0
- package/build/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +131 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [3.0.0](https://github.com/privacy-scaling-explorations/maci/compare/v2.5.0...v3.0.0) (2025-03-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **contracts:** add checker and deployment for proxy gatekeepers ([87f6d3b](https://github.com/privacy-scaling-explorations/maci/commit/87f6d3b7f32bf8dddcbf99b855dbe4b7b6c2a58e))
|
|
12
|
+
* **contracts:** add eas gatekeeper checker ([6e90591](https://github.com/privacy-scaling-explorations/maci/commit/6e90591923f8104c06558a8c8a4a5f26d16e63c1))
|
|
13
|
+
* **contracts:** add hats gatekeeper checker ([8ba97ae](https://github.com/privacy-scaling-explorations/maci/commit/8ba97ae09de1cc738df04a7b868d97c74027de3c))
|
|
14
|
+
* **contracts:** integrate excubiae for gatekeepers ([fae260b](https://github.com/privacy-scaling-explorations/maci/commit/fae260bbdd4d6b7a8749f61c0310526448a6c030))
|
|
15
|
+
* **deployer:** add service in maci repo ([3cbf167](https://github.com/privacy-scaling-explorations/maci/commit/3cbf167c31714d98a56ed4806225323c86b69240))
|
|
16
|
+
* use excubiae policies instead of gatekeepers ([a2319b1](https://github.com/privacy-scaling-explorations/maci/commit/a2319b19e473e683a301bd79b3ab2b06e83f9452))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Code Refactoring
|
|
20
|
+
|
|
21
|
+
* test suite cleanup ([#2233](https://github.com/privacy-scaling-explorations/maci/issues/2233)) ([#2232](https://github.com/privacy-scaling-explorations/maci/issues/2232)) ([0d42bb0](https://github.com/privacy-scaling-explorations/maci/commit/0d42bb09da9025d0481c45def982d155fda79b76))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Miscellaneous
|
|
25
|
+
|
|
26
|
+
* **deps-dev:** bump @nestjs/cli from 11.0.4 to 11.0.5 ([159c4d3](https://github.com/privacy-scaling-explorations/maci/commit/159c4d3fa06228710317cc416a3dd8d10cce2f42))
|
|
27
|
+
* **deps-dev:** bump @nestjs/schematics from 11.0.1 to 11.0.2 ([25d7e15](https://github.com/privacy-scaling-explorations/maci/commit/25d7e15b635b2df67c4db6985fffc483e20f80ef))
|
|
28
|
+
* **deps-dev:** bump @nestjs/testing from 10.4.15 to 11.0.11 ([63bb589](https://github.com/privacy-scaling-explorations/maci/commit/63bb5898a9f66c07c32874b532fa9cbdb4ca29de))
|
|
29
|
+
* **deps-dev:** bump @types/express from 4.17.21 to 5.0.0 ([8b2d43a](https://github.com/privacy-scaling-explorations/maci/commit/8b2d43a30e6aa118367aee2f6d32113a38639f50))
|
|
30
|
+
* **deps-dev:** bump @types/node from 20.17.19 to 22.13.9 ([aa7c356](https://github.com/privacy-scaling-explorations/maci/commit/aa7c356469592547f3d60c05077268267d7ea186))
|
|
31
|
+
* **deps-dev:** bump @types/node from 22.13.9 to 22.13.10 ([#2241](https://github.com/privacy-scaling-explorations/maci/issues/2241)) ([3f50bb6](https://github.com/privacy-scaling-explorations/maci/commit/3f50bb65db4cd83b5ebe9d4fb1b7a6d650bb1c51))
|
|
32
|
+
* **deps-dev:** bump fast-check from 3.23.2 to 4.0.0 ([266738d](https://github.com/privacy-scaling-explorations/maci/commit/266738ddf289c22f7e16ceba5a2fb09b836d7323))
|
|
33
|
+
* **deps-dev:** bump ts-jest from 29.2.5 to 29.2.6 ([aaf7978](https://github.com/privacy-scaling-explorations/maci/commit/aaf797861177b92cb1395048e32898367cd65bd5))
|
|
34
|
+
* **deps-dev:** bump typescript from 5.7.3 to 5.8.2 ([e37f1bf](https://github.com/privacy-scaling-explorations/maci/commit/e37f1bffd8193de316e748d0406cfb606455cb46))
|
|
35
|
+
* **deps:** bump @graphprotocol/graph-cli from 0.79.2 to 0.96.0 ([b782da5](https://github.com/privacy-scaling-explorations/maci/commit/b782da5f9171d65f3bd5b4579fdec0895cce0254))
|
|
36
|
+
* **deps:** bump @nestjs/common from 10.4.15 to 11.0.11 ([1a1256d](https://github.com/privacy-scaling-explorations/maci/commit/1a1256de14fb14ae527eb17ad428cdaa9b11cfee))
|
|
37
|
+
* **deps:** bump @nestjs/core from 10.4.15 to 11.0.11 ([061c778](https://github.com/privacy-scaling-explorations/maci/commit/061c77839f88712f816dfe467e848b52f1d0c566))
|
|
38
|
+
* **deps:** bump @nestjs/platform-express from 10.4.15 to 11.0.11 ([12fb1d4](https://github.com/privacy-scaling-explorations/maci/commit/12fb1d425ba5f141c2d8bbf4d14d11a9d6add000))
|
|
39
|
+
* **deps:** bump @nestjs/platform-socket.io from 10.4.15 to 11.0.11 ([23ff1f2](https://github.com/privacy-scaling-explorations/maci/commit/23ff1f23374090d83a221d964149b274dd021e2d))
|
|
40
|
+
* **deps:** bump @nestjs/swagger from 8.1.1 to 11.0.6 ([4e8aca9](https://github.com/privacy-scaling-explorations/maci/commit/4e8aca9fe1b19f299119d070d0de27090652d58e))
|
|
41
|
+
* **deps:** bump @vercel/blob from 0.27.1 to 0.27.2 ([67a6ab8](https://github.com/privacy-scaling-explorations/maci/commit/67a6ab822cac004cf43f04adf29dbd434f070ec1))
|
|
42
|
+
* **deps:** bump @zerodev/permissions from 5.5.2 to 5.5.3 ([bff258f](https://github.com/privacy-scaling-explorations/maci/commit/bff258faef093766511e7602bbf2e72d2cd12b15))
|
|
43
|
+
* **deps:** bump hardhat from 2.22.18 to 2.22.19 ([49af291](https://github.com/privacy-scaling-explorations/maci/commit/49af2919e353d322808c12ca0d5a77575c73e044))
|
|
44
|
+
* **deps:** bump helmet from 8.0.0 to 8.1.0 ([9e544e2](https://github.com/privacy-scaling-explorations/maci/commit/9e544e2eec454fd0423d517ef8358e7edd9ae3fd))
|
|
45
|
+
* **deps:** bump rxjs from 7.8.1 to 7.8.2 ([e683e9e](https://github.com/privacy-scaling-explorations/maci/commit/e683e9ef81afe88c215c1767f4f34f7364a558b0))
|
|
46
|
+
* **deps:** bump viem from 2.23.2 to 2.23.5 ([d19cb50](https://github.com/privacy-scaling-explorations/maci/commit/d19cb50dadf9de791852c67ecbf15ae8d28f0634))
|
|
47
|
+
* **deps:** bump viem from 2.23.5 to 2.23.6 ([63d15a0](https://github.com/privacy-scaling-explorations/maci/commit/63d15a0ee2d97c99513cf0b782434f85e29028c9))
|
|
48
|
+
* **deps:** bump viem from 2.23.6 to 2.23.9 ([#2239](https://github.com/privacy-scaling-explorations/maci/issues/2239)) ([64eb1e0](https://github.com/privacy-scaling-explorations/maci/commit/64eb1e07112e52fd7caf486a70ccebe6222614c7))
|
|
49
|
+
* **deps:** bump viem from 2.23.9 to 2.23.12 ([d055307](https://github.com/privacy-scaling-explorations/maci/commit/d0553074c92a7d8703ccb14ce7a54e509f412578))
|
|
50
|
+
* sync nestjs dependencies versions ([9c66b33](https://github.com/privacy-scaling-explorations/maci/commit/9c66b330664598cf9c0377d2078a946e34ad0004))
|
|
51
|
+
* update the readme ([#2242](https://github.com/privacy-scaling-explorations/maci/issues/2242)) ([ffdceee](https://github.com/privacy-scaling-explorations/maci/commit/ffdceee3074446f81deae5ef4e3df67f98aaada7))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ethereum Foundation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Coordinator service
|
|
2
|
+
|
|
3
|
+
Please refer to [Offchain relayer service documentation](https://maci.pse.dev/docs/category/offchain-relayer) for more information.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
1. [Node.js](https://nodejs.org/en) version 20.0.0.
|
|
8
|
+
2. [pnpm](https://pnpm.io/installation) package manager.
|
|
9
|
+
3. [rapidsnark](https://github.com/iden3/rapidsnark) program.
|
|
10
|
+
4. (Optional) [Redis](https://redis.io/docs/latest/operate/oss_and_stack/install/archive/install-redis/) database if you want to use the scheduler module.
|
|
11
|
+
|
|
12
|
+
- Please note that the build process might fail in a Windows environment. If you are using Windows, it is recommended to use Windows Subsystem for Linux (WSL) or a virtual machine with a Linux distribution.
|
|
13
|
+
|
|
14
|
+
## Install and build it from source
|
|
15
|
+
|
|
16
|
+
1. Install dependencies and build the project
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm install
|
|
20
|
+
pnpm run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
2. Install Redis database (if the scheduler module is going to be used) using [the official guide](https://redis.io/docs/latest/operate/oss_and_stack/install/archive/install-redis/)
|
|
24
|
+
|
|
25
|
+
3. Download the zkeys
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm run download-zkeys:test
|
|
29
|
+
# for production zkeys
|
|
30
|
+
# pnpm run download-zkeys:ceremony
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. Move to the coordinator service directory
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd apps/coordinator
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
5. Generate the RSA key pair to encrypt values throughout the communication workflow
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm run generate-keypair
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
6. Setup .env file (see `.env.example` for reference)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cp .env.example .env
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
7. Run the NestJS application
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm run start
|
|
55
|
+
# or
|
|
56
|
+
pnpm run start:prod
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Docker
|
|
60
|
+
|
|
61
|
+
Remember to run it from the monorepo root directory.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Build docker
|
|
65
|
+
docker compose -f apps/coordinator/docker-compose.yml build
|
|
66
|
+
|
|
67
|
+
# Run container detached
|
|
68
|
+
docker compose -f apps/coordinator/docker-compose.yml up -d
|
|
69
|
+
|
|
70
|
+
# Enter the container
|
|
71
|
+
docker compose -f apps/coordinator/docker-compose.yml exec coordinator-service /bin/sh
|
|
72
|
+
|
|
73
|
+
# Stop container
|
|
74
|
+
docker compose -f apps/coordinator/docker-compose.yml down
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Subgraph deployment
|
|
78
|
+
|
|
79
|
+
It is possible to deploy subgraph using coordinator service.
|
|
80
|
+
|
|
81
|
+
First, you need to setup subgraph and create a project. [Subgraph dashboard](https://thegraph.com/studio/).
|
|
82
|
+
|
|
83
|
+
Then, set env variables:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
# Subgraph name
|
|
87
|
+
SUBGRAPH_NAME="maci-subgraph"
|
|
88
|
+
|
|
89
|
+
# Subgraph provider url
|
|
90
|
+
SUBGRAPH_PROVIDER_URL=https://api.studio.thegraph.com/deploy/
|
|
91
|
+
|
|
92
|
+
# Subgraph deploy key
|
|
93
|
+
SUBGRAPH_DEPLOY_KEY=*******
|
|
94
|
+
|
|
95
|
+
# Subgraph project folder
|
|
96
|
+
SUBGRAPH_FOLDER=../subgraph
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
After deployment, subgraph url will be available in studio dashboard and you can use this type of url to get latest deployed version in your application:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
https://api.studio.thegraph.com/.../{SUBGRAPH_NAME}/version/latest
|
|
103
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
require("@nomicfoundation/hardhat-toolbox");
|
|
4
|
+
const dotenv = require("dotenv");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
dotenv.config();
|
|
7
|
+
const parentDir = __dirname.includes("build") ? ".." : "";
|
|
8
|
+
const TEST_MNEMONIC = "test test test test test test test test test test test junk";
|
|
9
|
+
module.exports = {
|
|
10
|
+
defaultNetwork: "localhost",
|
|
11
|
+
networks: {
|
|
12
|
+
localhost: {
|
|
13
|
+
url: process.env.COORDINATOR_RPC_URL || "http://localhost:8545",
|
|
14
|
+
accounts: process.env.PRIVATE_KEY
|
|
15
|
+
? [process.env.PRIVATE_KEY]
|
|
16
|
+
: {
|
|
17
|
+
mnemonic: process.env.MNEMONIC || TEST_MNEMONIC,
|
|
18
|
+
path: "m/44'/60'/0'/0",
|
|
19
|
+
initialIndex: process.env.INITIAL_INDEX ? Number(process.env.INITIAL_INDEX) : 0,
|
|
20
|
+
count: 20,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
hardhat: {
|
|
24
|
+
loggingEnabled: false,
|
|
25
|
+
mining: {
|
|
26
|
+
auto: false,
|
|
27
|
+
interval: 5000,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
solidity: {
|
|
32
|
+
version: "0.8.28",
|
|
33
|
+
},
|
|
34
|
+
paths: {
|
|
35
|
+
sources: path.resolve(__dirname, parentDir, "./node_modules/@maci-protocol/sdk/node_modules/@maci-protocol/contracts/contracts"),
|
|
36
|
+
artifacts: path.resolve(__dirname, parentDir, "./node_modules/@maci-protocol/sdk/node_modules/@maci-protocol/contracts/artifacts"),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=hardhat.config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardhat.config.cjs","sourceRoot":"","sources":["../hardhat.config.cjs"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1D,MAAM,aAAa,GAAG,6DAA6D,CAAC;AAEpF,MAAM,CAAC,OAAO,GAAG;IACf,cAAc,EAAE,WAAW;IAC3B,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,uBAAuB;YAC/D,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;gBAC/B,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;gBAC3B,CAAC,CAAC;oBACE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa;oBAC/C,IAAI,EAAE,gBAAgB;oBACtB,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC/E,KAAK,EAAE,EAAE;iBACV;SACN;QACD,OAAO,EAAE;YACP,cAAc,EAAE,KAAK;YACrB,MAAM,EAAE;gBACN,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,QAAQ;KAClB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,IAAI,CAAC,OAAO,CACnB,SAAS,EACT,SAAS,EACT,mFAAmF,CACpF;QACD,SAAS,EAAE,IAAI,CAAC,OAAO,CACrB,SAAS,EACT,SAAS,EACT,mFAAmF,CACpF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export let defaultNetwork: string;
|
|
2
|
+
export namespace networks {
|
|
3
|
+
namespace localhost {
|
|
4
|
+
let url: string;
|
|
5
|
+
let accounts: string[] | {
|
|
6
|
+
mnemonic: string;
|
|
7
|
+
path: string;
|
|
8
|
+
initialIndex: number;
|
|
9
|
+
count: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
namespace hardhat {
|
|
13
|
+
let loggingEnabled: boolean;
|
|
14
|
+
namespace mining {
|
|
15
|
+
let auto: boolean;
|
|
16
|
+
let interval: number;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export namespace solidity {
|
|
21
|
+
let version: string;
|
|
22
|
+
}
|
|
23
|
+
export namespace paths {
|
|
24
|
+
let sources: string;
|
|
25
|
+
let artifacts: string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=hardhat.config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardhat.config.d.cts","sourceRoot":"","sources":["../hardhat.config.cjs"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateKeypair.d.ts","sourceRoot":"","sources":["../../scripts/generateKeypair.ts"],"names":[],"mappings":"AAiBA,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAYxD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import dotenv from "dotenv";
|
|
2
|
+
import { generateKeyPairSync } from "crypto";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import url from "url";
|
|
6
|
+
/* eslint-disable no-underscore-dangle */
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
8
|
+
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
9
|
+
/* eslint-enable no-underscore-dangle */
|
|
10
|
+
/* eslint-enable @typescript-eslint/no-shadow */
|
|
11
|
+
dotenv.config({ path: [path.resolve(__dirname, "../.env"), path.resolve(__dirname, "../.env.example")] });
|
|
12
|
+
const MODULUS_LENGTH = 4096;
|
|
13
|
+
export async function generateRsaKeypair() {
|
|
14
|
+
const keypair = generateKeyPairSync("rsa", {
|
|
15
|
+
modulusLength: MODULUS_LENGTH,
|
|
16
|
+
});
|
|
17
|
+
const publicKey = keypair.publicKey.export({ type: "pkcs1", format: "pem" });
|
|
18
|
+
const privateKey = keypair.privateKey.export({ type: "pkcs1", format: "pem" });
|
|
19
|
+
await Promise.all([
|
|
20
|
+
fs.promises.writeFile(path.resolve(process.env.COORDINATOR_PUBLIC_KEY_PATH || "./public.key"), publicKey),
|
|
21
|
+
fs.promises.writeFile(path.resolve(process.env.COORDINATOR_PRIVATE_KEY_PATH || "./private.key"), privateKey),
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
generateRsaKeypair();
|
|
25
|
+
//# sourceMappingURL=generateKeypair.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateKeypair.js","sourceRoot":"","sources":["../../scripts/generateKeypair.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,yCAAyC;AACzC,iDAAiD;AACjD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,wCAAwC;AACxC,gDAAgD;AAEhD,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;AAE1G,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,EAAE;QACzC,aAAa,EAAE,cAAc;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE/E,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,cAAc,CAAC,EAAE,SAAS,CAAC;QACzG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,eAAe,CAAC,EAAE,UAAU,CAAC;KAC7G,CAAC,CAAC;AACL,CAAC;AAED,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateMaciKeyPair.d.ts","sourceRoot":"","sources":["../../scripts/generateMaciKeyPair.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateMaciKeyPair.js","sourceRoot":"","sources":["../../scripts/generateMaciKeyPair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAuthHeader.d.ts","sourceRoot":"","sources":["../../scripts/getAuthHeader.ts"],"names":[],"mappings":"AAiBA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAkBnD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import dotenv from "dotenv";
|
|
2
|
+
import { Wallet } from "ethers";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import * as readline from "readline";
|
|
5
|
+
import url from "url";
|
|
6
|
+
import { getAuthorizationHeader } from "../tests/utils";
|
|
7
|
+
/* eslint-disable no-underscore-dangle */
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
9
|
+
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
10
|
+
/* eslint-enable no-underscore-dangle */
|
|
11
|
+
/* eslint-enable @typescript-eslint/no-shadow */
|
|
12
|
+
dotenv.config({ path: [path.resolve(__dirname, "../.env"), path.resolve(__dirname, "../.env.example")] });
|
|
13
|
+
export async function getAuthHeader() {
|
|
14
|
+
const rl = readline.createInterface({
|
|
15
|
+
input: process.stdin,
|
|
16
|
+
output: process.stdout,
|
|
17
|
+
});
|
|
18
|
+
const askPrivateKey = () => new Promise((resolve) => {
|
|
19
|
+
rl.question("Enter your private key to sign (only test keys): ", (answer) => {
|
|
20
|
+
resolve(answer);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const privateKey = await askPrivateKey();
|
|
24
|
+
const wallet = new Wallet(privateKey);
|
|
25
|
+
rl.close();
|
|
26
|
+
const token = await getAuthorizationHeader(wallet);
|
|
27
|
+
// eslint-disable-next-line no-console
|
|
28
|
+
console.log(token);
|
|
29
|
+
}
|
|
30
|
+
getAuthHeader();
|
|
31
|
+
//# sourceMappingURL=getAuthHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAuthHeader.js","sourceRoot":"","sources":["../../scripts/getAuthHeader.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,yCAAyC;AACzC,iDAAiD;AACjD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,wCAAwC;AACxC,gDAAgD;AAEhD,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;AAE1G,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,GAAG,EAAE,CACzB,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;QAC9B,EAAE,CAAC,QAAQ,CAAC,mDAAmD,EAAE,CAAC,MAAM,EAAE,EAAE;YAC1E,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACL,MAAM,UAAU,GAAG,MAAM,aAAa,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IACtC,EAAE,CAAC,KAAK,EAAE,CAAC;IAEX,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACnD,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC;AAED,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const pollJoiningTestZkeyPath: string;
|
|
2
|
+
export declare const testPollJoiningWasmPath: string;
|
|
3
|
+
export declare const testPollJoiningWitnessPath: string;
|
|
4
|
+
export declare const testRapidsnarkPath: string;
|
|
5
|
+
export declare const zeroUint256Encoded: string;
|
|
6
|
+
export declare const oneUint256Encoded: string;
|
|
7
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../tests/constants.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB,QAA+E,CAAC;AACpH,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AACF,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AACF,eAAO,MAAM,kBAAkB,QAAyC,CAAC;AAEzE,eAAO,MAAM,kBAAkB,QAAsD,CAAC;AACtF,eAAO,MAAM,iBAAiB,QAAsD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbiCoder } from "ethers";
|
|
2
|
+
import { homedir } from "os";
|
|
3
|
+
import path from "path";
|
|
4
|
+
const root = path.resolve(__dirname, "../../..");
|
|
5
|
+
export const pollJoiningTestZkeyPath = path.resolve(root, "./zkeys/PollJoining_10_test/PollJoining_10_test.0.zkey");
|
|
6
|
+
export const testPollJoiningWasmPath = path.resolve(root, "./zkeys/PollJoining_10_test/PollJoining_10_test_js/PollJoining_10_test.wasm");
|
|
7
|
+
export const testPollJoiningWitnessPath = path.resolve(root, "./zkeys/PollJoining_10_test/PollJoining_10_test_cpp/PollJoining_10_test");
|
|
8
|
+
export const testRapidsnarkPath = `${homedir()}/rapidsnark/build/prover`;
|
|
9
|
+
export const zeroUint256Encoded = AbiCoder.defaultAbiCoder().encode(["uint256"], [0]);
|
|
10
|
+
export const oneUint256Encoded = AbiCoder.defaultAbiCoder().encode(["uint256"], [1]);
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../tests/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,wDAAwD,CAAC,CAAC;AACpH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,OAAO,CACjD,IAAI,EACJ,6EAA6E,CAC9E,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,OAAO,CACpD,IAAI,EACJ,yEAAyE,CAC1E,CAAC;AACF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,OAAO,EAAE,0BAA0B,CAAC;AAEzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2e.deploy.test.d.ts","sourceRoot":"","sources":["../../tests/e2e.deploy.test.ts"],"names":[],"mappings":""}
|