@maci-protocol/sdk 0.0.0-ci.1e276ed

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/LICENSE +22 -0
  3. package/README.md +12 -0
  4. package/build/package.json +56 -0
  5. package/build/ts/browser/index.d.ts +15 -0
  6. package/build/ts/browser/index.d.ts.map +1 -0
  7. package/build/ts/browser/index.js +43 -0
  8. package/build/ts/browser/index.js.map +1 -0
  9. package/build/ts/deploy/index.d.ts +6 -0
  10. package/build/ts/deploy/index.d.ts.map +1 -0
  11. package/build/ts/deploy/index.js +12 -0
  12. package/build/ts/deploy/index.js.map +1 -0
  13. package/build/ts/deploy/maci.d.ts +8 -0
  14. package/build/ts/deploy/maci.d.ts.map +1 -0
  15. package/build/ts/deploy/maci.js +87 -0
  16. package/build/ts/deploy/maci.js.map +1 -0
  17. package/build/ts/deploy/poll.d.ts +8 -0
  18. package/build/ts/deploy/poll.d.ts.map +1 -0
  19. package/build/ts/deploy/poll.js +107 -0
  20. package/build/ts/deploy/poll.js.map +1 -0
  21. package/build/ts/deploy/types.d.ts +204 -0
  22. package/build/ts/deploy/types.d.ts.map +1 -0
  23. package/build/ts/deploy/types.js +3 -0
  24. package/build/ts/deploy/types.js.map +1 -0
  25. package/build/ts/deploy/utils.d.ts +11 -0
  26. package/build/ts/deploy/utils.d.ts.map +1 -0
  27. package/build/ts/deploy/utils.js +22 -0
  28. package/build/ts/deploy/utils.js.map +1 -0
  29. package/build/ts/deploy/vkRegistry.d.ts +7 -0
  30. package/build/ts/deploy/vkRegistry.d.ts.map +1 -0
  31. package/build/ts/deploy/vkRegistry.js +14 -0
  32. package/build/ts/deploy/vkRegistry.js.map +1 -0
  33. package/build/ts/index.d.ts +16 -0
  34. package/build/ts/index.d.ts.map +1 -0
  35. package/build/ts/index.js +82 -0
  36. package/build/ts/index.js.map +1 -0
  37. package/build/ts/maci/index.d.ts +6 -0
  38. package/build/ts/maci/index.d.ts.map +1 -0
  39. package/build/ts/maci/index.js +17 -0
  40. package/build/ts/maci/index.js.map +1 -0
  41. package/build/ts/maci/merge.d.ts +9 -0
  42. package/build/ts/maci/merge.d.ts.map +1 -0
  43. package/build/ts/maci/merge.js +29 -0
  44. package/build/ts/maci/merge.js.map +1 -0
  45. package/build/ts/maci/policy.d.ts +41 -0
  46. package/build/ts/maci/policy.d.ts.map +1 -0
  47. package/build/ts/maci/policy.js +127 -0
  48. package/build/ts/maci/policy.js.map +1 -0
  49. package/build/ts/maci/state.d.ts +8 -0
  50. package/build/ts/maci/state.d.ts.map +1 -0
  51. package/build/ts/maci/state.js +82 -0
  52. package/build/ts/maci/state.js.map +1 -0
  53. package/build/ts/maci/types.d.ts +176 -0
  54. package/build/ts/maci/types.d.ts.map +1 -0
  55. package/build/ts/maci/types.js +18 -0
  56. package/build/ts/maci/types.js.map +1 -0
  57. package/build/ts/maciKeys/__tests__/keypair.test.d.ts +2 -0
  58. package/build/ts/maciKeys/__tests__/keypair.test.d.ts.map +1 -0
  59. package/build/ts/maciKeys/__tests__/keypair.test.js +24 -0
  60. package/build/ts/maciKeys/__tests__/keypair.test.js.map +1 -0
  61. package/build/ts/maciKeys/__tests__/publicKeys.test.d.ts +2 -0
  62. package/build/ts/maciKeys/__tests__/publicKeys.test.d.ts.map +1 -0
  63. package/build/ts/maciKeys/__tests__/publicKeys.test.js +22 -0
  64. package/build/ts/maciKeys/__tests__/publicKeys.test.js.map +1 -0
  65. package/build/ts/maciKeys/index.d.ts +4 -0
  66. package/build/ts/maciKeys/index.d.ts.map +1 -0
  67. package/build/ts/maciKeys/index.js +8 -0
  68. package/build/ts/maciKeys/index.js.map +1 -0
  69. package/build/ts/maciKeys/keypair.d.ts +9 -0
  70. package/build/ts/maciKeys/keypair.d.ts.map +1 -0
  71. package/build/ts/maciKeys/keypair.js +20 -0
  72. package/build/ts/maciKeys/keypair.js.map +1 -0
  73. package/build/ts/maciKeys/publicKeys.d.ts +8 -0
  74. package/build/ts/maciKeys/publicKeys.d.ts.map +1 -0
  75. package/build/ts/maciKeys/publicKeys.js +23 -0
  76. package/build/ts/maciKeys/publicKeys.js.map +1 -0
  77. package/build/ts/maciKeys/types.d.ts +23 -0
  78. package/build/ts/maciKeys/types.d.ts.map +1 -0
  79. package/build/ts/maciKeys/types.js +3 -0
  80. package/build/ts/maciKeys/types.js.map +1 -0
  81. package/build/ts/poll/index.d.ts +4 -0
  82. package/build/ts/poll/index.d.ts.map +1 -0
  83. package/build/ts/poll/index.js +9 -0
  84. package/build/ts/poll/index.js.map +1 -0
  85. package/build/ts/poll/poll.d.ts +14 -0
  86. package/build/ts/poll/poll.d.ts.map +1 -0
  87. package/build/ts/poll/poll.js +62 -0
  88. package/build/ts/poll/poll.js.map +1 -0
  89. package/build/ts/poll/types.d.ts +152 -0
  90. package/build/ts/poll/types.d.ts.map +1 -0
  91. package/build/ts/poll/types.js +3 -0
  92. package/build/ts/poll/types.js.map +1 -0
  93. package/build/ts/poll/utils.d.ts +9 -0
  94. package/build/ts/poll/utils.d.ts.map +1 -0
  95. package/build/ts/poll/utils.js +43 -0
  96. package/build/ts/poll/utils.js.map +1 -0
  97. package/build/ts/proof/__tests__/download.test.d.ts +2 -0
  98. package/build/ts/proof/__tests__/download.test.d.ts.map +1 -0
  99. package/build/ts/proof/__tests__/download.test.js +50 -0
  100. package/build/ts/proof/__tests__/download.test.js.map +1 -0
  101. package/build/ts/proof/constants.d.ts +17 -0
  102. package/build/ts/proof/constants.d.ts.map +1 -0
  103. package/build/ts/proof/constants.js +20 -0
  104. package/build/ts/proof/constants.js.map +1 -0
  105. package/build/ts/proof/download.d.ts +9 -0
  106. package/build/ts/proof/download.d.ts.map +1 -0
  107. package/build/ts/proof/download.js +49 -0
  108. package/build/ts/proof/download.js.map +1 -0
  109. package/build/ts/proof/generate.d.ts +8 -0
  110. package/build/ts/proof/generate.d.ts.map +1 -0
  111. package/build/ts/proof/generate.js +127 -0
  112. package/build/ts/proof/generate.js.map +1 -0
  113. package/build/ts/proof/index.d.ts +4 -0
  114. package/build/ts/proof/index.d.ts.map +1 -0
  115. package/build/ts/proof/index.js +8 -0
  116. package/build/ts/proof/index.js.map +1 -0
  117. package/build/ts/proof/prove.d.ts +8 -0
  118. package/build/ts/proof/prove.d.ts.map +1 -0
  119. package/build/ts/proof/prove.js +81 -0
  120. package/build/ts/proof/prove.js.map +1 -0
  121. package/build/ts/proof/types.d.ts +175 -0
  122. package/build/ts/proof/types.d.ts.map +1 -0
  123. package/build/ts/proof/types.js +3 -0
  124. package/build/ts/proof/types.js.map +1 -0
  125. package/build/ts/relayer/__tests__/messages.test.d.ts +2 -0
  126. package/build/ts/relayer/__tests__/messages.test.d.ts.map +1 -0
  127. package/build/ts/relayer/__tests__/messages.test.js +76 -0
  128. package/build/ts/relayer/__tests__/messages.test.js.map +1 -0
  129. package/build/ts/relayer/__tests__/utils.test.d.ts +2 -0
  130. package/build/ts/relayer/__tests__/utils.test.d.ts.map +1 -0
  131. package/build/ts/relayer/__tests__/utils.test.js +73 -0
  132. package/build/ts/relayer/__tests__/utils.test.js.map +1 -0
  133. package/build/ts/relayer/index.d.ts +3 -0
  134. package/build/ts/relayer/index.d.ts.map +1 -0
  135. package/build/ts/relayer/index.js +8 -0
  136. package/build/ts/relayer/index.js.map +1 -0
  137. package/build/ts/relayer/messages.d.ts +23 -0
  138. package/build/ts/relayer/messages.d.ts.map +1 -0
  139. package/build/ts/relayer/messages.js +66 -0
  140. package/build/ts/relayer/messages.js.map +1 -0
  141. package/build/ts/relayer/types.d.ts +168 -0
  142. package/build/ts/relayer/types.d.ts.map +1 -0
  143. package/build/ts/relayer/types.js +3 -0
  144. package/build/ts/relayer/types.js.map +1 -0
  145. package/build/ts/relayer/utils.d.ts +12 -0
  146. package/build/ts/relayer/utils.d.ts.map +1 -0
  147. package/build/ts/relayer/utils.js +37 -0
  148. package/build/ts/relayer/utils.js.map +1 -0
  149. package/build/ts/tally/commitments.d.ts +9 -0
  150. package/build/ts/tally/commitments.d.ts.map +1 -0
  151. package/build/ts/tally/commitments.js +42 -0
  152. package/build/ts/tally/commitments.js.map +1 -0
  153. package/build/ts/tally/index.d.ts +4 -0
  154. package/build/ts/tally/index.d.ts.map +1 -0
  155. package/build/ts/tally/index.js +8 -0
  156. package/build/ts/tally/index.js.map +1 -0
  157. package/build/ts/tally/types.d.ts +179 -0
  158. package/build/ts/tally/types.d.ts.map +1 -0
  159. package/build/ts/tally/types.js +3 -0
  160. package/build/ts/tally/types.js.map +1 -0
  161. package/build/ts/tally/utils.d.ts +24 -0
  162. package/build/ts/tally/utils.d.ts.map +1 -0
  163. package/build/ts/tally/utils.js +50 -0
  164. package/build/ts/tally/utils.js.map +1 -0
  165. package/build/ts/tally/verification.d.ts +7 -0
  166. package/build/ts/tally/verification.d.ts.map +1 -0
  167. package/build/ts/tally/verification.js +62 -0
  168. package/build/ts/tally/verification.js.map +1 -0
  169. package/build/ts/trees/index.d.ts +3 -0
  170. package/build/ts/trees/index.d.ts.map +1 -0
  171. package/build/ts/trees/index.js +6 -0
  172. package/build/ts/trees/index.js.map +1 -0
  173. package/build/ts/trees/stateTree.d.ts +13 -0
  174. package/build/ts/trees/stateTree.d.ts.map +1 -0
  175. package/build/ts/trees/stateTree.js +53 -0
  176. package/build/ts/trees/stateTree.js.map +1 -0
  177. package/build/ts/trees/types.d.ts +46 -0
  178. package/build/ts/trees/types.d.ts.map +1 -0
  179. package/build/ts/trees/types.js +3 -0
  180. package/build/ts/trees/types.js.map +1 -0
  181. package/build/ts/user/index.d.ts +3 -0
  182. package/build/ts/user/index.d.ts.map +1 -0
  183. package/build/ts/user/index.js +11 -0
  184. package/build/ts/user/index.js.map +1 -0
  185. package/build/ts/user/types.d.ts +424 -0
  186. package/build/ts/user/types.d.ts.map +1 -0
  187. package/build/ts/user/types.js +3 -0
  188. package/build/ts/user/types.js.map +1 -0
  189. package/build/ts/user/user.d.ts +42 -0
  190. package/build/ts/user/user.d.ts.map +1 -0
  191. package/build/ts/user/user.js +192 -0
  192. package/build/ts/user/user.js.map +1 -0
  193. package/build/ts/user/utils.d.ts +52 -0
  194. package/build/ts/user/utils.d.ts.map +1 -0
  195. package/build/ts/user/utils.js +186 -0
  196. package/build/ts/user/utils.js.map +1 -0
  197. package/build/ts/utils/cid.d.ts +23 -0
  198. package/build/ts/utils/cid.d.ts.map +1 -0
  199. package/build/ts/utils/cid.js +72 -0
  200. package/build/ts/utils/cid.js.map +1 -0
  201. package/build/ts/utils/constants.d.ts +2 -0
  202. package/build/ts/utils/constants.d.ts.map +1 -0
  203. package/build/ts/utils/constants.js +5 -0
  204. package/build/ts/utils/constants.js.map +1 -0
  205. package/build/ts/utils/contracts.d.ts +15 -0
  206. package/build/ts/utils/contracts.d.ts.map +1 -0
  207. package/build/ts/utils/contracts.js +26 -0
  208. package/build/ts/utils/contracts.js.map +1 -0
  209. package/build/ts/utils/files.d.ts +9 -0
  210. package/build/ts/utils/files.d.ts.map +1 -0
  211. package/build/ts/utils/files.js +20 -0
  212. package/build/ts/utils/files.js.map +1 -0
  213. package/build/ts/utils/formatting.d.ts +8 -0
  214. package/build/ts/utils/formatting.d.ts.map +1 -0
  215. package/build/ts/utils/formatting.js +11 -0
  216. package/build/ts/utils/formatting.js.map +1 -0
  217. package/build/ts/utils/fundWallet.d.ts +7 -0
  218. package/build/ts/utils/fundWallet.d.ts.map +1 -0
  219. package/build/ts/utils/fundWallet.js +20 -0
  220. package/build/ts/utils/fundWallet.js.map +1 -0
  221. package/build/ts/utils/index.d.ts +12 -0
  222. package/build/ts/utils/index.d.ts.map +1 -0
  223. package/build/ts/utils/index.js +28 -0
  224. package/build/ts/utils/index.js.map +1 -0
  225. package/build/ts/utils/params.d.ts +7 -0
  226. package/build/ts/utils/params.d.ts.map +1 -0
  227. package/build/ts/utils/params.js +19 -0
  228. package/build/ts/utils/params.js.map +1 -0
  229. package/build/ts/utils/proofs.d.ts +13 -0
  230. package/build/ts/utils/proofs.d.ts.map +1 -0
  231. package/build/ts/utils/proofs.js +41 -0
  232. package/build/ts/utils/proofs.js.map +1 -0
  233. package/build/ts/utils/timeTravel.d.ts +7 -0
  234. package/build/ts/utils/timeTravel.d.ts.map +1 -0
  235. package/build/ts/utils/timeTravel.js +14 -0
  236. package/build/ts/utils/timeTravel.js.map +1 -0
  237. package/build/ts/utils/trees.d.ts +13 -0
  238. package/build/ts/utils/trees.d.ts.map +1 -0
  239. package/build/ts/utils/trees.js +30 -0
  240. package/build/ts/utils/trees.js.map +1 -0
  241. package/build/ts/utils/types.d.ts +71 -0
  242. package/build/ts/utils/types.d.ts.map +1 -0
  243. package/build/ts/utils/types.js +3 -0
  244. package/build/ts/utils/types.js.map +1 -0
  245. package/build/ts/utils/utils.d.ts +16 -0
  246. package/build/ts/utils/utils.d.ts.map +1 -0
  247. package/build/ts/utils/utils.js +36 -0
  248. package/build/ts/utils/utils.js.map +1 -0
  249. package/build/ts/verifyingKeys/checkVerifyingKeys.d.ts +10 -0
  250. package/build/ts/verifyingKeys/checkVerifyingKeys.d.ts.map +1 -0
  251. package/build/ts/verifyingKeys/checkVerifyingKeys.js +67 -0
  252. package/build/ts/verifyingKeys/checkVerifyingKeys.js.map +1 -0
  253. package/build/ts/verifyingKeys/index.d.ts +5 -0
  254. package/build/ts/verifyingKeys/index.d.ts.map +1 -0
  255. package/build/ts/verifyingKeys/index.js +13 -0
  256. package/build/ts/verifyingKeys/index.js.map +1 -0
  257. package/build/ts/verifyingKeys/setVerifyingKeys.d.ts +7 -0
  258. package/build/ts/verifyingKeys/setVerifyingKeys.d.ts.map +1 -0
  259. package/build/ts/verifyingKeys/setVerifyingKeys.js +73 -0
  260. package/build/ts/verifyingKeys/setVerifyingKeys.js.map +1 -0
  261. package/build/ts/verifyingKeys/types.d.ts +231 -0
  262. package/build/ts/verifyingKeys/types.d.ts.map +1 -0
  263. package/build/ts/verifyingKeys/types.js +3 -0
  264. package/build/ts/verifyingKeys/types.js.map +1 -0
  265. package/build/ts/verifyingKeys/utils.d.ts +29 -0
  266. package/build/ts/verifyingKeys/utils.d.ts.map +1 -0
  267. package/build/ts/verifyingKeys/utils.js +102 -0
  268. package/build/ts/verifyingKeys/utils.js.map +1 -0
  269. package/build/ts/vote/generate.d.ts +8 -0
  270. package/build/ts/vote/generate.d.ts.map +1 -0
  271. package/build/ts/vote/generate.js +46 -0
  272. package/build/ts/vote/generate.js.map +1 -0
  273. package/build/ts/vote/index.d.ts +6 -0
  274. package/build/ts/vote/index.d.ts.map +1 -0
  275. package/build/ts/vote/index.js +15 -0
  276. package/build/ts/vote/index.js.map +1 -0
  277. package/build/ts/vote/invalidate.d.ts +13 -0
  278. package/build/ts/vote/invalidate.d.ts.map +1 -0
  279. package/build/ts/vote/invalidate.js +44 -0
  280. package/build/ts/vote/invalidate.js.map +1 -0
  281. package/build/ts/vote/publish.d.ts +14 -0
  282. package/build/ts/vote/publish.d.ts.map +1 -0
  283. package/build/ts/vote/publish.js +88 -0
  284. package/build/ts/vote/publish.js.map +1 -0
  285. package/build/ts/vote/submit.d.ts +13 -0
  286. package/build/ts/vote/submit.d.ts.map +1 -0
  287. package/build/ts/vote/submit.js +36 -0
  288. package/build/ts/vote/submit.js.map +1 -0
  289. package/build/ts/vote/types.d.ts +238 -0
  290. package/build/ts/vote/types.d.ts.map +1 -0
  291. package/build/ts/vote/types.js +3 -0
  292. package/build/ts/vote/types.js.map +1 -0
  293. package/build/ts/vote/utils.d.ts +16 -0
  294. package/build/ts/vote/utils.d.ts.map +1 -0
  295. package/build/ts/vote/utils.js +26 -0
  296. package/build/ts/vote/utils.js.map +1 -0
  297. package/build/tsconfig.build.tsbuildinfo +1 -0
  298. package/package.json +57 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,80 @@
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
+ * add invalidate votes function ([#2219](https://github.com/privacy-scaling-explorations/maci/issues/2219)) ([6531fee](https://github.com/privacy-scaling-explorations/maci/commit/6531feef1b2384180736c69a3b7bb307b922d085))
12
+ * add logs output option for debugging and auditing ([d638fb6](https://github.com/privacy-scaling-explorations/maci/commit/d638fb67348ce34c2f93222911b0c29c14a6b9b2))
13
+ * add start and end timestmap for poll ([cf67b53](https://github.com/privacy-scaling-explorations/maci/commit/cf67b539d7d5dfd8b83ba3e0becaa20d0292b410))
14
+ * allow to download artifacts on browser ([58a163f](https://github.com/privacy-scaling-explorations/maci/commit/58a163f82c65d440c05200ae3f00e22790d70a4e))
15
+ * check if a user is registered ([#2278](https://github.com/privacy-scaling-explorations/maci/issues/2278)) ([6c0a2d9](https://github.com/privacy-scaling-explorations/maci/commit/6c0a2d9829639fc2af6e8f2efcb1aa33af5037ce))
16
+ * **contracts:** add anon aadhaar gatekeeper checker ([13f14b0](https://github.com/privacy-scaling-explorations/maci/commit/13f14b07fd5fe8433d46b6fc6bab94216b06c97d))
17
+ * **contracts:** add checker and deployment for proxy gatekeepers ([87f6d3b](https://github.com/privacy-scaling-explorations/maci/commit/87f6d3b7f32bf8dddcbf99b855dbe4b7b6c2a58e))
18
+ * **contracts:** add eas gatekeeper checker ([6e90591](https://github.com/privacy-scaling-explorations/maci/commit/6e90591923f8104c06558a8c8a4a5f26d16e63c1))
19
+ * **contracts:** add hats gatekeeper checker ([8ba97ae](https://github.com/privacy-scaling-explorations/maci/commit/8ba97ae09de1cc738df04a7b868d97c74027de3c))
20
+ * **contracts:** add merkle proof gatekeeper checker ([e386f91](https://github.com/privacy-scaling-explorations/maci/commit/e386f914807a0d82140ae077cdcb866a4f9dc053))
21
+ * **contracts:** add semaphore gatekeeper checker ([b7419c9](https://github.com/privacy-scaling-explorations/maci/commit/b7419c9b53da2ca043696ef25f8902d8c0a736e2))
22
+ * **contracts:** add zupass gatekeeper checker ([d69702b](https://github.com/privacy-scaling-explorations/maci/commit/d69702b7962617aef6b48b7de1c9a2fe4c857676))
23
+ * **contracts:** integrate excubiae for gatekeepers ([fae260b](https://github.com/privacy-scaling-explorations/maci/commit/fae260bbdd4d6b7a8749f61c0310526448a6c030))
24
+ * **sdk:** add relayer functions ([6273ef8](https://github.com/privacy-scaling-explorations/maci/commit/6273ef8c07675aaebe6d1d73d2c1e51de1ccfc56))
25
+ * **sdk:** return processProofs, tallyProofs and tallyData in generateProofs ([#2193](https://github.com/privacy-scaling-explorations/maci/issues/2193)) ([dfbc410](https://github.com/privacy-scaling-explorations/maci/commit/dfbc410d4267fb6e3d327aa3b645792d7380aff7))
26
+ * use excubiae policies instead of gatekeepers ([a2319b1](https://github.com/privacy-scaling-explorations/maci/commit/a2319b19e473e683a301bd79b3ab2b06e83f9452))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * add export without deploy functions ([#2284](https://github.com/privacy-scaling-explorations/maci/issues/2284)) ([2252806](https://github.com/privacy-scaling-explorations/maci/commit/2252806497eb10d0e57f5d081dd446d47ff29b73))
32
+
33
+
34
+ ### Code Refactoring
35
+
36
+ * **cli:** cleanup signup command ([601269c](https://github.com/privacy-scaling-explorations/maci/commit/601269c8c5c508289e3f95ac6b55603c73d19779))
37
+ * **cli:** move deploy vk registry and testing commands to sdk ([bcd8d12](https://github.com/privacy-scaling-explorations/maci/commit/bcd8d12980067a5d1618fe43c8d3a9b5c5d5be84))
38
+ * **cli:** move key generation commands to sdk ([08634a1](https://github.com/privacy-scaling-explorations/maci/commit/08634a150bc8ca2428069a741a5ebda7a197dc8d))
39
+ * **cli:** move maci state generation to sdk ([f922298](https://github.com/privacy-scaling-explorations/maci/commit/f92229850ad4c6416274dcab64fd981de070a491))
40
+ * **cli:** move proof generation and poll deploy to sdk ([31922b2](https://github.com/privacy-scaling-explorations/maci/commit/31922b2f816ecdd254d761e49b25081f5c9fa9a3))
41
+ * **cli:** move prove onchain to sdk ([452a68a](https://github.com/privacy-scaling-explorations/maci/commit/452a68a452ac33f9186ecf735e8d5df852a5c5e1))
42
+ * **cli:** move publish commands to sdk ([aa16343](https://github.com/privacy-scaling-explorations/maci/commit/aa1634325c2617f3a8a95e3013adc60758b996ae))
43
+ * **cli:** move signups merging to sdk ([36a8d6d](https://github.com/privacy-scaling-explorations/maci/commit/36a8d6de45ae2dc8e9fb49fb2a1092b31216ed66))
44
+ * **cli:** move vk commands to sdk ([1f2a81e](https://github.com/privacy-scaling-explorations/maci/commit/1f2a81e67ccdea1ca6136dd71005cb7f91ae02fb))
45
+ * **cli:** use contract storage for cli ([b417ee7](https://github.com/privacy-scaling-explorations/maci/commit/b417ee7de9c54fb875c363ca38c1c41eb34d8e8e))
46
+ * contract imports and proofs ([#2074](https://github.com/privacy-scaling-explorations/maci/issues/2074)) ([66dfab7](https://github.com/privacy-scaling-explorations/maci/commit/66dfab7e0916f5891f47ae1448b89f7b0fd0ed27))
47
+ * deploy maci command ([3eb6915](https://github.com/privacy-scaling-explorations/maci/commit/3eb691568a01e94cbbdb2f4f806efae002b19328))
48
+ * gen proofs ([7bba1c5](https://github.com/privacy-scaling-explorations/maci/commit/7bba1c5ab0abfb0d518400cefbc00a3cd75dadd2))
49
+ * join poll sdk ([52607a7](https://github.com/privacy-scaling-explorations/maci/commit/52607a7df7c73f1b8371035f19fbd2433beab8b5))
50
+ * make separate testing package ([#2229](https://github.com/privacy-scaling-explorations/maci/issues/2229)) ([bd07a7f](https://github.com/privacy-scaling-explorations/maci/commit/bd07a7f0783b2efe2659bc18255f8f4ed2e3c0d3))
51
+ * poll deploy sdk ([#2189](https://github.com/privacy-scaling-explorations/maci/issues/2189)) ([da1b785](https://github.com/privacy-scaling-explorations/maci/commit/da1b7852cea94663a97ef7ceef1c3e9b8ca3eda8))
52
+ * remove redundant param ([#2161](https://github.com/privacy-scaling-explorations/maci/issues/2161)) ([2cc986f](https://github.com/privacy-scaling-explorations/maci/commit/2cc986fadd91283cd78f3f90bc8825d2aa44e2a5))
53
+ * **sdk:** change sdk package structure ([3255909](https://github.com/privacy-scaling-explorations/maci/commit/3255909f685e613446d2a499f3fb9caa89dc4f24))
54
+ * **sdk:** separate keys functions ([e22cb16](https://github.com/privacy-scaling-explorations/maci/commit/e22cb1657ee46477d6abb649d77bde07ea97bad0))
55
+ * setVerifyingKeys ([8ce195b](https://github.com/privacy-scaling-explorations/maci/commit/8ce195baa5191bce63fd807cd75f3f75e2ad0d76))
56
+ * 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))
57
+ * user sdk ([#2064](https://github.com/privacy-scaling-explorations/maci/issues/2064)) ([aac1ce7](https://github.com/privacy-scaling-explorations/maci/commit/aac1ce7d4db7141a6d57bf9c940751d0886b5d9e))
58
+ * verifying keys sdk ([#2070](https://github.com/privacy-scaling-explorations/maci/issues/2070)) ([44c9e1e](https://github.com/privacy-scaling-explorations/maci/commit/44c9e1e79f4d4c34c95fd46c33e4008be8cf4a07))
59
+ * vote sdk ([#2089](https://github.com/privacy-scaling-explorations/maci/issues/2089)) ([fed0e25](https://github.com/privacy-scaling-explorations/maci/commit/fed0e251bf09e1e34ec0a43ba58d89d3a95aa02c))
60
+ * vote submission ([a66da9e](https://github.com/privacy-scaling-explorations/maci/commit/a66da9e1725f9f458341c5f6f269bca0d2d6aa37))
61
+
62
+
63
+ ### Miscellaneous
64
+
65
+ * add logger for contract helpers ([a688400](https://github.com/privacy-scaling-explorations/maci/commit/a6884006427f91f46ee2804fc75bd7a51533cdd6))
66
+ * **deps-dev:** bump @types/node from 20.17.19 to 22.13.9 ([aa7c356](https://github.com/privacy-scaling-explorations/maci/commit/aa7c356469592547f3d60c05077268267d7ea186))
67
+ * **deps-dev:** bump @types/node from 22.10.7 to 22.12.0 ([#2073](https://github.com/privacy-scaling-explorations/maci/issues/2073)) ([1dcb28e](https://github.com/privacy-scaling-explorations/maci/commit/1dcb28e33699ee91f9691c1073d4da0293e406c0))
68
+ * **deps-dev:** bump @types/node from 22.12.0 to 22.13.1 ([5f06af0](https://github.com/privacy-scaling-explorations/maci/commit/5f06af0180f522f552519529c07d2bb660fdd586))
69
+ * **deps-dev:** bump @types/node from 22.13.1 to 22.13.4 ([dba94f4](https://github.com/privacy-scaling-explorations/maci/commit/dba94f4fe6d405eaca655dfdc8ca01d57664b99b))
70
+ * **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))
71
+ * **deps-dev:** bump mocha from 10.8.2 to 11.1.0 ([f524a07](https://github.com/privacy-scaling-explorations/maci/commit/f524a07f5a3b1e94eaf6f230ecf16476f4c6810d))
72
+ * **deps-dev:** bump ts-jest from 29.2.5 to 29.2.6 ([aaf7978](https://github.com/privacy-scaling-explorations/maci/commit/aaf797861177b92cb1395048e32898367cd65bd5))
73
+ * **deps-dev:** bump typescript from 5.7.3 to 5.8.2 ([e37f1bf](https://github.com/privacy-scaling-explorations/maci/commit/e37f1bffd8193de316e748d0406cfb606455cb46))
74
+ * **deps:** bump @zk-kit/lean-imt from 2.2.2 to 2.2.3 ([a269d5c](https://github.com/privacy-scaling-explorations/maci/commit/a269d5ce4e47145e02a58b30c793672ab43a9c30))
75
+ * **deps:** bump multiformats from 9.9.0 to 13.3.2 ([4a9853f](https://github.com/privacy-scaling-explorations/maci/commit/4a9853f0b72fdd54fb608864620a421a027ee255))
76
+ * fix multiformat version for sdk ([b765391](https://github.com/privacy-scaling-explorations/maci/commit/b765391dc3b3a52a0b20bfe8645ae15998323dfc))
77
+ * move tests over to testing package ([fad40c3](https://github.com/privacy-scaling-explorations/maci/commit/fad40c30323135483244cc6e3c89ffba51d5120b))
78
+ * **relayer:** add checks for onchain publishing ([a25f4bd](https://github.com/privacy-scaling-explorations/maci/commit/a25f4bdd4c106920f429a4dc0deb09fb3275b57e))
79
+ * **relayer:** add more e2e tests ([0cbfc40](https://github.com/privacy-scaling-explorations/maci/commit/0cbfc40b2915924cdc6b6fc7db4392868f6f8845))
80
+ * 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,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Barry WhiteHat, Kendrick Tan, Kobi Gurkan, Kirill Goncharov
4
+ Cory Dickson, Han Jian, Chih-Cheng Liang, and Koh Wei Jie
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # maci-sdk
2
+
3
+ [![NPM Package][sdk-npm-badge]][sdk-npm-link]
4
+ [![Actions Status][sdk-actions-badge]][sdk-actions-link]
5
+
6
+ Please refer to the [documentation for the
7
+ SDK](https://maci.pse.dev/docs/developers-references/typescript-code/sdk).
8
+
9
+ [sdk-npm-badge]: https://img.shields.io/npm/v/maci-sdk.svg
10
+ [sdk-actions-badge]: https://github.com/privacy-scaling-explorations/maci/actions/workflows/e2e.yml/badge.svg
11
+ [sdk-npm-link]: https://www.npmjs.com/package/maci-sdk
12
+ [sdk-actions-link]: https://github.com/privacy-scaling-explorations/maci/actions?query=workflow%3ACI
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@maci-protocol/sdk",
3
+ "version": "1.0.0",
4
+ "private": false,
5
+ "description": "MACI's SDK",
6
+ "main": "build/ts/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./build/ts/index.d.ts",
10
+ "default": "./build/ts/index.js"
11
+ },
12
+ "./browser": {
13
+ "types": "./build/ts/browser/index.d.ts",
14
+ "default": "./build/ts/browser/index.js"
15
+ }
16
+ },
17
+ "bin": {
18
+ "maci-sdk": "./build/ts/index.js"
19
+ },
20
+ "files": [
21
+ "build",
22
+ "CHANGELOG.md",
23
+ "README.md"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "scripts": {
29
+ "watch": "tsc --watch",
30
+ "build": "tsc -p tsconfig.build.json",
31
+ "postbuild": "cp package.json ./build && mkdir -p ./zkeys",
32
+ "types": "tsc -p tsconfig.json --noEmit",
33
+ "test": "jest",
34
+ "test:coverage": "pnpm run test --coverage",
35
+ "docs": "typedoc --plugin typedoc-plugin-markdown --options ./typedoc.json"
36
+ },
37
+ "dependencies": {
38
+ "@zk-kit/lean-imt": "^2.2.3",
39
+ "ethers": "^6.13.4",
40
+ "@maci-protocol/contracts": "^3.0.0",
41
+ "@maci-protocol/core": "^3.0.0",
42
+ "@maci-protocol/crypto": "^3.0.0",
43
+ "@maci-protocol/domainobjs": "^3.0.0",
44
+ "multiformats": "9.9.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/jest": "^29.5.2",
48
+ "@types/node": "^22.14.0",
49
+ "@types/snarkjs": "^0.7.9",
50
+ "jest": "^29.5.0",
51
+ "mocha": "^11.1.0",
52
+ "nyc": "^17.1.0",
53
+ "ts-jest": "^29.3.0",
54
+ "typescript": "^5.8.3"
55
+ }
56
+ }
@@ -0,0 +1,15 @@
1
+ export * from "../verifyingKeys";
2
+ export * from "../maci";
3
+ export * from "../relayer";
4
+ export * from "../poll";
5
+ export * from "../proof";
6
+ export * from "../tally";
7
+ export * from "../trees";
8
+ export * from "../vote";
9
+ export * from "../utils";
10
+ export * from "../user";
11
+ export * from "../maciKeys";
12
+ export { EMode, EContracts, EPolicies, EInitialVoiceCreditProxies, extractVk, genProofSnarkjs, formatProofForVerifierContract, verifyProof, cleanThreads, unlinkFile, getBlockTimestamp, genEmptyBallotRoots, } from "@maci-protocol/contracts";
13
+ export type { FullProveResult, IDeployParams, IMergeParams, IProveParams, IVerifyingKeyStruct, SnarkProof, IIpfsMessage, } from "@maci-protocol/contracts";
14
+ export * from "@maci-protocol/contracts/typechain-types";
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ts/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,KAAK,EACL,UAAU,EACV,SAAS,EACT,0BAA0B,EAC1B,SAAS,EACT,eAAe,EACf,8BAA8B,EAC9B,WAAW,EACX,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,YAAY,GACb,MAAM,0BAA0B,CAAC;AAElC,cAAc,0CAA0C,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.genEmptyBallotRoots = exports.getBlockTimestamp = exports.unlinkFile = exports.cleanThreads = exports.verifyProof = exports.formatProofForVerifierContract = exports.genProofSnarkjs = exports.extractVk = exports.EInitialVoiceCreditProxies = exports.EPolicies = exports.EContracts = exports.EMode = void 0;
18
+ __exportStar(require("../verifyingKeys"), exports);
19
+ __exportStar(require("../maci"), exports);
20
+ __exportStar(require("../relayer"), exports);
21
+ __exportStar(require("../poll"), exports);
22
+ __exportStar(require("../proof"), exports);
23
+ __exportStar(require("../tally"), exports);
24
+ __exportStar(require("../trees"), exports);
25
+ __exportStar(require("../vote"), exports);
26
+ __exportStar(require("../utils"), exports);
27
+ __exportStar(require("../user"), exports);
28
+ __exportStar(require("../maciKeys"), exports);
29
+ var contracts_1 = require("@maci-protocol/contracts");
30
+ Object.defineProperty(exports, "EMode", { enumerable: true, get: function () { return contracts_1.EMode; } });
31
+ Object.defineProperty(exports, "EContracts", { enumerable: true, get: function () { return contracts_1.EContracts; } });
32
+ Object.defineProperty(exports, "EPolicies", { enumerable: true, get: function () { return contracts_1.EPolicies; } });
33
+ Object.defineProperty(exports, "EInitialVoiceCreditProxies", { enumerable: true, get: function () { return contracts_1.EInitialVoiceCreditProxies; } });
34
+ Object.defineProperty(exports, "extractVk", { enumerable: true, get: function () { return contracts_1.extractVk; } });
35
+ Object.defineProperty(exports, "genProofSnarkjs", { enumerable: true, get: function () { return contracts_1.genProofSnarkjs; } });
36
+ Object.defineProperty(exports, "formatProofForVerifierContract", { enumerable: true, get: function () { return contracts_1.formatProofForVerifierContract; } });
37
+ Object.defineProperty(exports, "verifyProof", { enumerable: true, get: function () { return contracts_1.verifyProof; } });
38
+ Object.defineProperty(exports, "cleanThreads", { enumerable: true, get: function () { return contracts_1.cleanThreads; } });
39
+ Object.defineProperty(exports, "unlinkFile", { enumerable: true, get: function () { return contracts_1.unlinkFile; } });
40
+ Object.defineProperty(exports, "getBlockTimestamp", { enumerable: true, get: function () { return contracts_1.getBlockTimestamp; } });
41
+ Object.defineProperty(exports, "genEmptyBallotRoots", { enumerable: true, get: function () { return contracts_1.genEmptyBallotRoots; } });
42
+ __exportStar(require("@maci-protocol/contracts/typechain-types"), exports);
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../ts/browser/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,sDAakC;AAZhC,kGAAA,KAAK,OAAA;AACL,uGAAA,UAAU,OAAA;AACV,sGAAA,SAAS,OAAA;AACT,uHAAA,0BAA0B,OAAA;AAC1B,sGAAA,SAAS,OAAA;AACT,4GAAA,eAAe,OAAA;AACf,2HAAA,8BAA8B,OAAA;AAC9B,wGAAA,WAAW,OAAA;AACX,yGAAA,YAAY,OAAA;AACZ,uGAAA,UAAU,OAAA;AACV,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AAarB,2EAAyD"}
@@ -0,0 +1,6 @@
1
+ export { deployPoll } from "./poll";
2
+ export { deployVkRegistryContract } from "./vkRegistry";
3
+ export { deployMaci } from "./maci";
4
+ export { deployFactoryWithLinkedLibraries } from "./utils";
5
+ export type { IDeployPollArgs, IPollContractsData, IDeployMaciArgs, IMaciContracts, IDeployVkRegistryArgs, } from "./types";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ts/deploy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAE3D,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deployFactoryWithLinkedLibraries = exports.deployMaci = exports.deployVkRegistryContract = exports.deployPoll = void 0;
4
+ var poll_1 = require("./poll");
5
+ Object.defineProperty(exports, "deployPoll", { enumerable: true, get: function () { return poll_1.deployPoll; } });
6
+ var vkRegistry_1 = require("./vkRegistry");
7
+ Object.defineProperty(exports, "deployVkRegistryContract", { enumerable: true, get: function () { return vkRegistry_1.deployVkRegistryContract; } });
8
+ var maci_1 = require("./maci");
9
+ Object.defineProperty(exports, "deployMaci", { enumerable: true, get: function () { return maci_1.deployMaci; } });
10
+ var utils_1 = require("./utils");
11
+ Object.defineProperty(exports, "deployFactoryWithLinkedLibraries", { enumerable: true, get: function () { return utils_1.deployFactoryWithLinkedLibraries; } });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../ts/deploy/index.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,2CAAwD;AAA/C,sHAAA,wBAAwB,OAAA;AACjC,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,iCAA2D;AAAlD,yHAAA,gCAAgC,OAAA"}
@@ -0,0 +1,8 @@
1
+ import type { IDeployMaciArgs, IMaciContracts } from "./types";
2
+ /**
3
+ * Deploy the MACI contracts
4
+ * @param args - The arguments for the MACI contracts deployment
5
+ * @returns The deployed MACI contracts
6
+ */
7
+ export declare const deployMaci: ({ stateTreeDepth, signupPolicyAddress, pollFactoryAddress, messageProcessorFactoryAddress, tallyFactoryAddress, signer, poseidonAddresses, }: IDeployMaciArgs) => Promise<IMaciContracts>;
8
+ //# sourceMappingURL=maci.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maci.d.ts","sourceRoot":"","sources":["../../../ts/deploy/maci.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI/D;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAU,8IAQ9B,eAAe,KAAG,OAAO,CAAC,cAAc,CAmF1C,CAAC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deployMaci = void 0;
4
+ const contracts_1 = require("@maci-protocol/contracts");
5
+ const utils_1 = require("./utils");
6
+ /**
7
+ * Deploy the MACI contracts
8
+ * @param args - The arguments for the MACI contracts deployment
9
+ * @returns The deployed MACI contracts
10
+ */
11
+ const deployMaci = async ({ stateTreeDepth, signupPolicyAddress, pollFactoryAddress, messageProcessorFactoryAddress, tallyFactoryAddress, signer, poseidonAddresses, }) => {
12
+ const emptyBallotRoots = (0, contracts_1.genEmptyBallotRoots)(stateTreeDepth);
13
+ const { PoseidonT3Contract, PoseidonT4Contract, PoseidonT5Contract, PoseidonT6Contract } = await (0, contracts_1.deployPoseidonContracts)(signer, poseidonAddresses, true);
14
+ const poseidonAddrs = await Promise.all([
15
+ PoseidonT3Contract.getAddress(),
16
+ PoseidonT4Contract.getAddress(),
17
+ PoseidonT5Contract.getAddress(),
18
+ PoseidonT6Contract.getAddress(),
19
+ ]).then(([poseidonT3, poseidonT4, poseidonT5, poseidonT6]) => ({
20
+ poseidonT3,
21
+ poseidonT4,
22
+ poseidonT5,
23
+ poseidonT6,
24
+ }));
25
+ const pollFactoryContractAddress = await (0, utils_1.deployFactoryWithLinkedLibraries)({
26
+ address: pollFactoryAddress,
27
+ abi: contracts_1.PollFactory__factory.abi,
28
+ bytecode: contracts_1.PollFactory__factory.linkBytecode({
29
+ "contracts/crypto/PoseidonT3.sol:PoseidonT3": poseidonAddrs.poseidonT3,
30
+ "contracts/crypto/PoseidonT4.sol:PoseidonT4": poseidonAddrs.poseidonT4,
31
+ "contracts/crypto/PoseidonT5.sol:PoseidonT5": poseidonAddrs.poseidonT5,
32
+ "contracts/crypto/PoseidonT6.sol:PoseidonT6": poseidonAddrs.poseidonT6,
33
+ }),
34
+ signer,
35
+ });
36
+ const messageProcessorFactoryContractAddress = await (0, utils_1.deployFactoryWithLinkedLibraries)({
37
+ address: messageProcessorFactoryAddress,
38
+ abi: contracts_1.MessageProcessorFactory__factory.abi,
39
+ bytecode: contracts_1.MessageProcessorFactory__factory.linkBytecode({
40
+ "contracts/crypto/PoseidonT3.sol:PoseidonT3": poseidonAddrs.poseidonT3,
41
+ "contracts/crypto/PoseidonT4.sol:PoseidonT4": poseidonAddrs.poseidonT4,
42
+ "contracts/crypto/PoseidonT5.sol:PoseidonT5": poseidonAddrs.poseidonT5,
43
+ "contracts/crypto/PoseidonT6.sol:PoseidonT6": poseidonAddrs.poseidonT6,
44
+ }),
45
+ signer,
46
+ });
47
+ const tallyFactoryContractAddress = await (0, utils_1.deployFactoryWithLinkedLibraries)({
48
+ address: tallyFactoryAddress,
49
+ abi: contracts_1.TallyFactory__factory.abi,
50
+ bytecode: contracts_1.TallyFactory__factory.linkBytecode({
51
+ "contracts/crypto/PoseidonT3.sol:PoseidonT3": poseidonAddrs.poseidonT3,
52
+ "contracts/crypto/PoseidonT4.sol:PoseidonT4": poseidonAddrs.poseidonT4,
53
+ "contracts/crypto/PoseidonT5.sol:PoseidonT5": poseidonAddrs.poseidonT5,
54
+ "contracts/crypto/PoseidonT6.sol:PoseidonT6": poseidonAddrs.poseidonT6,
55
+ }),
56
+ signer,
57
+ });
58
+ const maciContractAddress = await (0, utils_1.deployFactoryWithLinkedLibraries)({
59
+ abi: contracts_1.MACI__factory.abi,
60
+ bytecode: contracts_1.MACI__factory.linkBytecode({
61
+ "contracts/crypto/PoseidonT3.sol:PoseidonT3": poseidonAddrs.poseidonT3,
62
+ "contracts/crypto/PoseidonT4.sol:PoseidonT4": poseidonAddrs.poseidonT4,
63
+ "contracts/crypto/PoseidonT5.sol:PoseidonT5": poseidonAddrs.poseidonT5,
64
+ "contracts/crypto/PoseidonT6.sol:PoseidonT6": poseidonAddrs.poseidonT6,
65
+ }),
66
+ signer,
67
+ args: [
68
+ pollFactoryContractAddress,
69
+ messageProcessorFactoryContractAddress,
70
+ tallyFactoryContractAddress,
71
+ signupPolicyAddress,
72
+ stateTreeDepth,
73
+ emptyBallotRoots,
74
+ ],
75
+ });
76
+ const policy = contracts_1.IBasePolicy__factory.connect(signupPolicyAddress, signer);
77
+ await policy.setTarget(maciContractAddress).then((tx) => tx.wait());
78
+ return {
79
+ maciContractAddress,
80
+ pollFactoryContractAddress,
81
+ messageProcessorFactoryContractAddress,
82
+ tallyFactoryContractAddress,
83
+ poseidonAddresses: poseidonAddrs,
84
+ };
85
+ };
86
+ exports.deployMaci = deployMaci;
87
+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C,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACxE,MAAM,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;IAEpE,OAAO;QACL,mBAAmB;QACnB,0BAA0B;QAC1B,sCAAsC;QACtC,2BAA2B;QAC3B,iBAAiB,EAAE,aAAa;KACjC,CAAC;AACJ,CAAC,CAAC;AA3FW,QAAA,UAAU,cA2FrB"}
@@ -0,0 +1,8 @@
1
+ import type { IDeployPollArgs, IPollContractsData } from "./types";
2
+ /**
3
+ * Deploy a poll
4
+ * @param args - The arguments for the deploy poll command
5
+ * @returns The addresses of the deployed contracts
6
+ */
7
+ export declare const deployPoll: ({ maciAddress, pollStartTimestamp, pollEndTimestamp, intStateTreeDepth, voteOptionTreeDepth, messageBatchSize, coordinatorPubKey, verifierContractAddress, vkRegistryContractAddress, mode, policyContractAddress, initialVoiceCreditProxyContractAddress, relayers, voteOptions, initialVoiceCredits, signer, }: IDeployPollArgs) => Promise<IPollContractsData>;
8
+ //# sourceMappingURL=poll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../../ts/deploy/poll.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMnE;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAU,kTAiB9B,eAAe,KAAG,OAAO,CAAC,kBAAkB,CAwH9C,CAAC"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deployPoll = void 0;
4
+ const contracts_1 = require("@maci-protocol/contracts");
5
+ const core_1 = require("@maci-protocol/core");
6
+ const domainobjs_1 = require("@maci-protocol/domainobjs");
7
+ const utils_1 = require("../utils");
8
+ const utils_2 = require("./utils");
9
+ /**
10
+ * Deploy a poll
11
+ * @param args - The arguments for the deploy poll command
12
+ * @returns The addresses of the deployed contracts
13
+ */
14
+ const deployPoll = async ({ maciAddress, pollStartTimestamp, pollEndTimestamp, intStateTreeDepth, voteOptionTreeDepth, messageBatchSize, coordinatorPubKey, verifierContractAddress, vkRegistryContractAddress, mode, policyContractAddress, initialVoiceCreditProxyContractAddress, relayers, voteOptions, initialVoiceCredits, signer, }) => {
15
+ if (!vkRegistryContractAddress) {
16
+ throw new Error("Please provide a VkRegistry contract address");
17
+ }
18
+ if (!maciAddress) {
19
+ throw new Error("Please provide a MACI contract address");
20
+ }
21
+ const isMaciExists = await (0, utils_1.contractExists)(signer.provider, maciAddress);
22
+ if (!isMaciExists) {
23
+ throw new Error("MACI contract does not exist");
24
+ }
25
+ const maciContract = contracts_1.MACI__factory.connect(maciAddress, signer);
26
+ // check if we have a signupPolicy already deployed or passed as arg
27
+ let signupPolicyContractAddress = policyContractAddress;
28
+ if (!signupPolicyContractAddress) {
29
+ const [contract] = await (0, contracts_1.deployFreeForAllSignUpPolicy)(signer, true);
30
+ signupPolicyContractAddress = await contract.getAddress();
31
+ }
32
+ let initialVoiceCreditProxyAddress = initialVoiceCreditProxyContractAddress;
33
+ if (!initialVoiceCreditProxyAddress) {
34
+ const [contract] = await (0, contracts_1.deployConstantInitialVoiceCreditProxy)({ amount: initialVoiceCredits ?? utils_2.DEFAULT_INITIAL_VOICE_CREDITS }, signer, undefined, true);
35
+ initialVoiceCreditProxyAddress = await contract.getAddress();
36
+ }
37
+ // required arg -> poll duration
38
+ if (pollStartTimestamp < Math.floor(Date.now() / 1000)) {
39
+ throw new Error("Start date cannot be in the past");
40
+ }
41
+ if (pollEndTimestamp <= pollStartTimestamp) {
42
+ throw new Error("End date cannot be before start date");
43
+ }
44
+ // required arg -> int state tree depth
45
+ if (intStateTreeDepth <= 0) {
46
+ throw new Error("Int state tree depth cannot be <= 0");
47
+ }
48
+ // required arg -> message tree depth
49
+ if (messageBatchSize <= 0) {
50
+ throw new Error("Message batch size cannot be <= 0");
51
+ }
52
+ // required arg -> vote option tree depth
53
+ if (voteOptionTreeDepth <= 0) {
54
+ throw new Error("Vote option tree depth cannot be <= 0");
55
+ }
56
+ // ensure the vote option parameter is valid (if passed)
57
+ if (voteOptions && voteOptions > core_1.VOTE_OPTION_TREE_ARITY ** voteOptionTreeDepth) {
58
+ throw new Error("Vote options cannot be greater than the number of leaves in the vote option tree");
59
+ }
60
+ // we check that the coordinator's public key is valid
61
+ if (!domainobjs_1.PubKey.isValidSerializedPubKey(coordinatorPubKey.serialize())) {
62
+ throw new Error("Invalid MACI public key");
63
+ }
64
+ const receipt = await maciContract
65
+ .deployPoll({
66
+ startDate: pollStartTimestamp,
67
+ endDate: pollEndTimestamp,
68
+ treeDepths: {
69
+ intStateTreeDepth,
70
+ voteOptionTreeDepth,
71
+ },
72
+ messageBatchSize,
73
+ coordinatorPubKey: coordinatorPubKey.asContractParam(),
74
+ verifier: verifierContractAddress,
75
+ vkRegistry: vkRegistryContractAddress,
76
+ mode,
77
+ policy: signupPolicyContractAddress,
78
+ initialVoiceCreditProxy: initialVoiceCreditProxyAddress,
79
+ relayers,
80
+ voteOptions,
81
+ })
82
+ .then((tx) => tx.wait());
83
+ if (receipt?.status !== 1) {
84
+ throw new Error("Deploy poll transaction is failed");
85
+ }
86
+ // parse DeployPoll log
87
+ const events = await maciContract.queryFilter(maciContract.filters.DeployPoll, receipt.blockNumber, receipt.blockNumber);
88
+ const log = events[events.length - 1];
89
+ // eslint-disable-next-line no-underscore-dangle
90
+ const pollId = log.args._pollId;
91
+ const pollContracts = await maciContract.getPoll(pollId);
92
+ const pollContractAddress = pollContracts.poll;
93
+ const messageProcessorContractAddress = pollContracts.messageProcessor;
94
+ const tallyContractAddress = pollContracts.tally;
95
+ const policyContract = contracts_1.IBasePolicy__factory.connect(signupPolicyContractAddress, signer);
96
+ await policyContract.setTarget(pollContractAddress).then((tx) => tx.wait());
97
+ return {
98
+ pollId,
99
+ pollContractAddress,
100
+ messageProcessorContractAddress,
101
+ tallyContractAddress,
102
+ policyContractAddress: signupPolicyContractAddress,
103
+ initialVoiceCreditProxyContractAddress: initialVoiceCreditProxyAddress,
104
+ };
105
+ };
106
+ exports.deployPoll = deployPoll;
107
+ //# sourceMappingURL=poll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poll.js","sourceRoot":"","sources":["../../../ts/deploy/poll.ts"],"names":[],"mappings":";;;AAAA,wDAKkC;AAClC,8CAA6D;AAC7D,0DAAmD;AAInD,oCAA0C;AAE1C,mCAAwD;AAExD;;;;GAIG;AACI,MAAM,UAAU,GAAG,KAAK,EAAE,EAC/B,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,IAAI,EACJ,qBAAqB,EACrB,sCAAsC,EACtC,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,MAAM,GACU,EAA+B,EAAE;IACjD,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,IAAA,sBAAc,EAAC,MAAM,CAAC,QAAS,EAAE,WAAW,CAAC,CAAC;IAEzE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,YAAY,GAAG,yBAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAE9D,oEAAoE;IACpE,IAAI,2BAA2B,GAAG,qBAAqB,CAAC;IAExD,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM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