@maci-protocol/website 0.0.0-ci.2653bc0

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 (415) hide show
  1. package/.eslintrc.js +157 -0
  2. package/CHANGELOG.md +566 -0
  3. package/LICENSE +22 -0
  4. package/README.md +58 -0
  5. package/babel.config.js +3 -0
  6. package/blog/2021-10-12-maci-v1.md +100 -0
  7. package/blog/2022-09-22-maci-v1-technical-introduction.md +180 -0
  8. package/blog/2023-01-18-maci-v1.1.1.md +121 -0
  9. package/blog/2024-01-18-roadmap.md +106 -0
  10. package/blog/2024-02-28-maci-v1.2.0.md +121 -0
  11. package/blog/2024-04-10-roadmap-q2.md +96 -0
  12. package/blog/2024-05-08-ethdam.md +169 -0
  13. package/blog/2024-05-22-the-origins-of-maci.md +38 -0
  14. package/blog/2024-05-28-upcoming-grants.md +85 -0
  15. package/blog/2024-06-17-understanding-maci.md +63 -0
  16. package/blog/2024-06-21-deciphering-maci.md +48 -0
  17. package/blog/2024-06-28-revolusioning-public-goods-funding.md +32 -0
  18. package/blog/2024-07-23-q2-review.md +72 -0
  19. package/blog/2024-07-30-roadmap-q3.md +61 -0
  20. package/blog/2024-08-10-maci-v2.md +102 -0
  21. package/blog/2024-08-29-anonymous-poll-joining.md +47 -0
  22. package/blog/2024-10-29-q3-review.md +63 -0
  23. package/blog/2024-11-20-maci-platform.md +93 -0
  24. package/blog/2024-12-01-maci-getting-started.md +294 -0
  25. package/blog/2025-03-21-roadmap-2025.md +112 -0
  26. package/blog/assets/MACI_Bob_SignUp_1.png +0 -0
  27. package/blog/assets/MACI_Bob_SignUp_2.png +0 -0
  28. package/blog/assets/MACI_Complex_Message.png +0 -0
  29. package/blog/assets/MACI_Contracts.png +0 -0
  30. package/blog/assets/MACI_Sign_Up.png +0 -0
  31. package/blog/assets/MACI_Simple_Message.png +0 -0
  32. package/blog/assets/MACI_Verifier_1.png +0 -0
  33. package/blog/authors.yml +5 -0
  34. package/docusaurus.config.ts +213 -0
  35. package/package.json +65 -0
  36. package/src/components/ActionCard/index.tsx +30 -0
  37. package/src/components/ActionCard/styles.module.css +96 -0
  38. package/src/components/HomepageFeatures/index.tsx +91 -0
  39. package/src/components/HomepageFeatures/styles.module.css +17 -0
  40. package/src/components/ProjectCard/index.tsx +74 -0
  41. package/src/components/ProjectCard/styles.module.css +77 -0
  42. package/src/components/ProjectList/index.tsx +218 -0
  43. package/src/components/ProjectList/styles.module.css +180 -0
  44. package/src/content/projects.json +294 -0
  45. package/src/css/card.module.css +130 -0
  46. package/src/css/custom.css +91 -0
  47. package/src/icons/IconDiscord.tsx +16 -0
  48. package/src/icons/IconGithub.tsx +16 -0
  49. package/src/icons/IconWebsite.tsx +16 -0
  50. package/src/pages/blogs.tsx +58 -0
  51. package/src/pages/index.module.css +152 -0
  52. package/src/pages/index.tsx +66 -0
  53. package/src/pages/projects.tsx +44 -0
  54. package/src/pages/roadmap.md +150 -0
  55. package/src/pages/typedoc.tsx +11 -0
  56. package/src/plugins/blog-plugin/index.ts +86 -0
  57. package/src/react-app-env.d.ts +1 -0
  58. package/src/scripts/setupSolidityDocs.ts +67 -0
  59. package/src/scripts/setupTypedoc.ts +112 -0
  60. package/src/scripts/utils.ts +115 -0
  61. package/src/utils/getProjectsByFilter.ts +40 -0
  62. package/static/.nojekyll +0 -0
  63. package/static/audit_reports/20210922_Hashcloak_audit_report.pdf +0 -0
  64. package/static/audit_reports/202220930_Hashcloak_audit_report.pdf +0 -0
  65. package/static/audit_reports/20240223_PSE_Audit_audit_report.pdf +0 -0
  66. package/static/audit_reports/20240731_PSE_Audit_audit_report.pdf +0 -0
  67. package/static/fonts/DM_Sans.woff2 +0 -0
  68. package/static/fonts/Share_Tech_Mono.woff2 +0 -0
  69. package/static/img/box.png +0 -0
  70. package/static/img/box_dark.png +0 -0
  71. package/static/img/chain.png +0 -0
  72. package/static/img/chain_dark.png +0 -0
  73. package/static/img/chart.png +0 -0
  74. package/static/img/chart_dark.png +0 -0
  75. package/static/img/circuits/MACI-Circuits.excalidraw +39652 -0
  76. package/static/img/circuits/calculateTotal.svg +21 -0
  77. package/static/img/circuits/ecdh.svg +21 -0
  78. package/static/img/circuits/messageToCommand.svg +21 -0
  79. package/static/img/circuits/messageValidator.svg +21 -0
  80. package/static/img/circuits/poseidonHasher13.svg +21 -0
  81. package/static/img/circuits/privToPubkey.svg +21 -0
  82. package/static/img/circuits/processMessages.svg +21 -0
  83. package/static/img/circuits/processMessagesInputHasher.svg +21 -0
  84. package/static/img/circuits/processMessages_2_0.svg +21 -0
  85. package/static/img/circuits/processOne.svg +21 -0
  86. package/static/img/circuits/processTopup.svg +21 -0
  87. package/static/img/circuits/processingAfterPollEnds.svg +21 -0
  88. package/static/img/circuits/quinBatchLeavesExists.svg +21 -0
  89. package/static/img/circuits/quinCheckRoot.svg +21 -0
  90. package/static/img/circuits/quinGeneratePathIndices.svg +21 -0
  91. package/static/img/circuits/quinSelector.svg +21 -0
  92. package/static/img/circuits/resultsCommitmentVerifier.svg +21 -0
  93. package/static/img/circuits/splicer.svg +21 -0
  94. package/static/img/circuits/tallyInputHasher.svg +21 -0
  95. package/static/img/circuits/tallyVotes.svg +21 -0
  96. package/static/img/circuits/unpackElement.svg +21 -0
  97. package/static/img/circuits/verifySignature.svg +21 -0
  98. package/static/img/completingAPoll.svg +4 -0
  99. package/static/img/contracts.svg +16 -0
  100. package/static/img/coordinatorComponents.svg +21 -0
  101. package/static/img/favicon.ico +0 -0
  102. package/static/img/generateProofs.svg +4 -0
  103. package/static/img/hero.svg +9 -0
  104. package/static/img/maci-card.png +0 -0
  105. package/static/img/maci-rpgf-design.jpg +0 -0
  106. package/static/img/messageProcessingLocal.svg +21 -0
  107. package/static/img/offlineProcessing.svg +21 -0
  108. package/static/img/pse-logo-round.png +0 -0
  109. package/static/img/relayer-diagram.png +0 -0
  110. package/static/img/tallyCommitments.svg +4 -0
  111. package/static/img/voteTallyingLocal.svg +21 -0
  112. package/tsconfig.json +34 -0
  113. package/versioned_docs/version-v0.x/circuits.md +22 -0
  114. package/versioned_docs/version-v0.x/contract.md +186 -0
  115. package/versioned_docs/version-v0.x/faq.md +67 -0
  116. package/versioned_docs/version-v0.x/introduction.md +119 -0
  117. package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +138 -0
  118. package/versioned_docs/version-v0.x/state-root-transition-circuit.md +230 -0
  119. package/versioned_docs/version-v1.2/audit.md +160 -0
  120. package/versioned_docs/version-v1.2/ci-pipeline.md +38 -0
  121. package/versioned_docs/version-v1.2/circuits.md +508 -0
  122. package/versioned_docs/version-v1.2/cli.md +689 -0
  123. package/versioned_docs/version-v1.2/contracts.md +445 -0
  124. package/versioned_docs/version-v1.2/contributing/code-of-conduct.md +91 -0
  125. package/versioned_docs/version-v1.2/contributing/contributing.md +129 -0
  126. package/versioned_docs/version-v1.2/coordinator-processing.md +46 -0
  127. package/versioned_docs/version-v1.2/deployment.md +122 -0
  128. package/versioned_docs/version-v1.2/installation.md +175 -0
  129. package/versioned_docs/version-v1.2/integrating.md +200 -0
  130. package/versioned_docs/version-v1.2/introduction.md +94 -0
  131. package/versioned_docs/version-v1.2/key-change.md +182 -0
  132. package/versioned_docs/version-v1.2/overview.md +47 -0
  133. package/versioned_docs/version-v1.2/poll-types.md +68 -0
  134. package/versioned_docs/version-v1.2/primitives.md +216 -0
  135. package/versioned_docs/version-v1.2/project-ideas.md +14 -0
  136. package/versioned_docs/version-v1.2/purpose.md +62 -0
  137. package/versioned_docs/version-v1.2/solidity-docs/MACI.md +345 -0
  138. package/versioned_docs/version-v1.2/solidity-docs/MessageProcessor.md +266 -0
  139. package/versioned_docs/version-v1.2/solidity-docs/MessageProcessorFactory.md +26 -0
  140. package/versioned_docs/version-v1.2/solidity-docs/Poll.md +381 -0
  141. package/versioned_docs/version-v1.2/solidity-docs/PollFactory.md +50 -0
  142. package/versioned_docs/version-v1.2/solidity-docs/SignUpToken.md +27 -0
  143. package/versioned_docs/version-v1.2/solidity-docs/Subsidy.md +218 -0
  144. package/versioned_docs/version-v1.2/solidity-docs/SubsidyFactory.md +27 -0
  145. package/versioned_docs/version-v1.2/solidity-docs/Tally.md +311 -0
  146. package/versioned_docs/version-v1.2/solidity-docs/TallyFactory.md +27 -0
  147. package/versioned_docs/version-v1.2/solidity-docs/TallyNonQv.md +296 -0
  148. package/versioned_docs/version-v1.2/solidity-docs/TallyNonQvFactory.md +27 -0
  149. package/versioned_docs/version-v1.2/solidity-docs/TopupCredit.md +61 -0
  150. package/versioned_docs/version-v1.2/solidity-docs/VkRegistry.md +457 -0
  151. package/versioned_docs/version-v1.2/solidity-docs/benchmarks/HasherBenchmarks.md +44 -0
  152. package/versioned_docs/version-v1.2/solidity-docs/crypto/Hasher.md +125 -0
  153. package/versioned_docs/version-v1.2/solidity-docs/crypto/IVerifier.md +11 -0
  154. package/versioned_docs/version-v1.2/solidity-docs/crypto/MockVerifier.md +17 -0
  155. package/versioned_docs/version-v1.2/solidity-docs/crypto/Pairing.md +85 -0
  156. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT3.md +9 -0
  157. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT4.md +9 -0
  158. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT5.md +9 -0
  159. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT6.md +9 -0
  160. package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkCommon.md +16 -0
  161. package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkConstants.md +40 -0
  162. package/versioned_docs/version-v1.2/solidity-docs/crypto/Verifier.md +61 -0
  163. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/EASGatekeeper.md +121 -0
  164. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/FreeForAllSignUpGatekeeper.md +40 -0
  165. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpGatekeeper.md +26 -0
  166. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpTokenGatekeeper.md +93 -0
  167. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md +79 -0
  168. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperMultiple.md +48 -0
  169. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperSingle.md +42 -0
  170. package/versioned_docs/version-v1.2/solidity-docs/index.md +4 -0
  171. package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.md +40 -0
  172. package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md +26 -0
  173. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IEAS.md +40 -0
  174. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IHats.md +103 -0
  175. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMPFactory.md +26 -0
  176. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMessageProcessor.md +31 -0
  177. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPoll.md +217 -0
  178. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPollFactory.md +29 -0
  179. package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallyFactory.md +28 -0
  180. package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallySubsidyFactory.md +27 -0
  181. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVerifier.md +25 -0
  182. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVkRegistry.md +70 -0
  183. package/versioned_docs/version-v1.2/solidity-docs/mocks/MockHatsProtocol.md +133 -0
  184. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueue.md +464 -0
  185. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary.md +60 -0
  186. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary0.md +40 -0
  187. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinaryMaci.md +34 -0
  188. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary.md +75 -0
  189. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary0.md +40 -0
  190. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryBlankSl.md +40 -0
  191. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryMaci.md +40 -0
  192. package/versioned_docs/version-v1.2/solidity-docs/trees/EmptyBallotRoots.md +13 -0
  193. package/versioned_docs/version-v1.2/solidity-docs/utilities/CommonUtilities.md +25 -0
  194. package/versioned_docs/version-v1.2/solidity-docs/utilities/DomainObjs.md +40 -0
  195. package/versioned_docs/version-v1.2/solidity-docs/utilities/Params.md +36 -0
  196. package/versioned_docs/version-v1.2/solidity-docs/utilities/Utilities.md +79 -0
  197. package/versioned_docs/version-v1.2/spec.md +944 -0
  198. package/versioned_docs/version-v1.2/testing-in-detail.md +209 -0
  199. package/versioned_docs/version-v1.2/testing.md +472 -0
  200. package/versioned_docs/version-v1.2/topup.md +43 -0
  201. package/versioned_docs/version-v1.2/troubleshooting.md +51 -0
  202. package/versioned_docs/version-v1.2/trusted-setup.md +76 -0
  203. package/versioned_docs/version-v1.2/typedoc/cli/.nojekyll +1 -0
  204. package/versioned_docs/version-v1.2/typedoc/cli/index.md +15 -0
  205. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/AirdropArgs.md +89 -0
  206. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployArgs.md +154 -0
  207. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployPollArgs.md +154 -0
  208. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployedContracts.md +130 -0
  209. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenLocalStateArgs.md +168 -0
  210. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenProofsArgs.md +388 -0
  211. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IGenKeypairArgs.md +37 -0
  212. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IRegisteredUserArgs.md +63 -0
  213. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeMessagesArgs.md +76 -0
  214. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeSignupsArgs.md +76 -0
  215. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PollContracts.md +53 -0
  216. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/ProveOnChainArgs.md +128 -0
  217. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PublishArgs.md +154 -0
  218. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SignupArgs.md +89 -0
  219. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SubsidyData.md +73 -0
  220. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TallyData.md +166 -0
  221. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TopupArgs.md +89 -0
  222. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/VerifyArgs.md +128 -0
  223. package/versioned_docs/version-v1.2/typedoc/cli/modules.md +556 -0
  224. package/versioned_docs/version-v1.2/typedoc/core/.nojekyll +1 -0
  225. package/versioned_docs/version-v1.2/typedoc/core/classes/MaciState.md +295 -0
  226. package/versioned_docs/version-v1.2/typedoc/core/classes/Poll.md +1098 -0
  227. package/versioned_docs/version-v1.2/typedoc/core/index.md +110 -0
  228. package/versioned_docs/version-v1.2/typedoc/core/interfaces/BatchSizes.md +50 -0
  229. package/versioned_docs/version-v1.2/typedoc/core/interfaces/IJsonMaciState.md +77 -0
  230. package/versioned_docs/version-v1.2/typedoc/core/interfaces/IProcessMessagesCircuitInputs.md +242 -0
  231. package/versioned_docs/version-v1.2/typedoc/core/interfaces/ISubsidyCircuitInputs.md +198 -0
  232. package/versioned_docs/version-v1.2/typedoc/core/interfaces/ITallyCircuitInputs.md +231 -0
  233. package/versioned_docs/version-v1.2/typedoc/core/interfaces/MaxValues.md +37 -0
  234. package/versioned_docs/version-v1.2/typedoc/core/interfaces/TreeDepths.md +63 -0
  235. package/versioned_docs/version-v1.2/typedoc/core/modules.md +289 -0
  236. package/versioned_docs/version-v1.2/typedoc/crypto/.nojekyll +1 -0
  237. package/versioned_docs/version-v1.2/typedoc/crypto/classes/AccQueue.md +770 -0
  238. package/versioned_docs/version-v1.2/typedoc/crypto/classes/G1Point.md +115 -0
  239. package/versioned_docs/version-v1.2/typedoc/crypto/classes/G2Point.md +140 -0
  240. package/versioned_docs/version-v1.2/typedoc/crypto/classes/IncrementalQuinTree.md +470 -0
  241. package/versioned_docs/version-v1.2/typedoc/crypto/index.md +44 -0
  242. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Keypair.md +33 -0
  243. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/PoseidonFuncs.md +115 -0
  244. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Queue.md +33 -0
  245. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Signature.md +37 -0
  246. package/versioned_docs/version-v1.2/typedoc/crypto/modules.md +913 -0
  247. package/versioned_docs/version-v1.2/typedoc/domainobjs/.nojekyll +1 -0
  248. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Ballot.md +274 -0
  249. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Keypair.md +181 -0
  250. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Message.md +244 -0
  251. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PCommand.md +409 -0
  252. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PrivKey.md +206 -0
  253. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PubKey.md +289 -0
  254. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/StateLeaf.md +340 -0
  255. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/TCommand.md +200 -0
  256. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/VerifyingKey.md +240 -0
  257. package/versioned_docs/version-v1.2/typedoc/domainobjs/index.md +81 -0
  258. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/ICommand.md +104 -0
  259. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG1ContractParams.md +31 -0
  260. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG2ContractParams.md +31 -0
  261. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonBallot.md +42 -0
  262. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonCommand.md +32 -0
  263. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonKeyPair.md +31 -0
  264. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonPCommand.md +111 -0
  265. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonStateLeaf.md +42 -0
  266. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonTCommand.md +67 -0
  267. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IMessageContractParams.md +31 -0
  268. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeaf.md +39 -0
  269. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeafContractParams.md +42 -0
  270. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkContractParams.md +64 -0
  271. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkObjectParams.md +108 -0
  272. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/Proof.md +46 -0
  273. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/VoteOptionTreeLeaf.md +24 -0
  274. package/versioned_docs/version-v1.2/typedoc/domainobjs/modules.md +110 -0
  275. package/versioned_docs/version-v1.2/typedoc/index.md +4 -0
  276. package/versioned_docs/version-v1.2/versioning.md +94 -0
  277. package/versioned_docs/version-v1.2/workflow.md +142 -0
  278. package/versioned_docs/version-v2.x/case-studies.md +35 -0
  279. package/versioned_docs/version-v2.x/contributing/_category_.json +4 -0
  280. package/versioned_docs/version-v2.x/contributing/code-of-conduct.md +92 -0
  281. package/versioned_docs/version-v2.x/contributing/contributing.md +149 -0
  282. package/versioned_docs/version-v2.x/contributing/project-ideas.md +78 -0
  283. package/versioned_docs/version-v2.x/core-concepts/_category_.json +4 -0
  284. package/versioned_docs/version-v2.x/core-concepts/ballot.md +19 -0
  285. package/versioned_docs/version-v2.x/core-concepts/coordinator-processing.md +46 -0
  286. package/versioned_docs/version-v2.x/core-concepts/hashing-and-encryption.md +45 -0
  287. package/versioned_docs/version-v2.x/core-concepts/key-change.md +179 -0
  288. package/versioned_docs/version-v2.x/core-concepts/maci-keys.md +84 -0
  289. package/versioned_docs/version-v2.x/core-concepts/maci-messages.md +44 -0
  290. package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +23 -0
  291. package/versioned_docs/version-v2.x/core-concepts/poll-types.md +106 -0
  292. package/versioned_docs/version-v2.x/core-concepts/spec.md +883 -0
  293. package/versioned_docs/version-v2.x/core-concepts/state-leaf.md +42 -0
  294. package/versioned_docs/version-v2.x/core-concepts/workflow.md +142 -0
  295. package/versioned_docs/version-v2.x/getting-started.md +313 -0
  296. package/versioned_docs/version-v2.x/guides/_category_.json +4 -0
  297. package/versioned_docs/version-v2.x/guides/compile-circuits.md +163 -0
  298. package/versioned_docs/version-v2.x/guides/frontend.md +99 -0
  299. package/versioned_docs/version-v2.x/guides/integrating.md +73 -0
  300. package/versioned_docs/version-v2.x/guides/maciWrapper.md +173 -0
  301. package/versioned_docs/version-v2.x/guides/subgraph.md +79 -0
  302. package/versioned_docs/version-v2.x/guides/testing/_category_.json +4 -0
  303. package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +203 -0
  304. package/versioned_docs/version-v2.x/guides/testing/testing.md +163 -0
  305. package/versioned_docs/version-v2.x/guides/troubleshooting.md +161 -0
  306. package/versioned_docs/version-v2.x/introduction.md +146 -0
  307. package/versioned_docs/version-v2.x/processes/_category_.json +4 -0
  308. package/versioned_docs/version-v2.x/processes/ci-pipeline.md +38 -0
  309. package/versioned_docs/version-v2.x/processes/versioning.md +94 -0
  310. package/versioned_docs/version-v2.x/resources.md +33 -0
  311. package/versioned_docs/version-v2.x/security/_category_.json +4 -0
  312. package/versioned_docs/version-v2.x/security/audit.md +167 -0
  313. package/versioned_docs/version-v2.x/security/trusted-setup.md +166 -0
  314. package/versioned_docs/version-v2.x/supported-networks/_category_.json +4 -0
  315. package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +1108 -0
  316. package/versioned_docs/version-v2.x/supported-networks/supported-networks.md +47 -0
  317. package/versioned_docs/version-v2.x/technical-references/_category_.json +4 -0
  318. package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +21 -0
  319. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Gatekeepers.md +40 -0
  320. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +152 -0
  321. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
  322. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +32 -0
  323. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +104 -0
  324. package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +43 -0
  325. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +45 -0
  326. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +57 -0
  327. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
  328. package/versioned_docs/version-v2.x/technical-references/smart-contracts/_category_.json +8 -0
  329. package/versioned_docs/version-v2.x/technical-references/technical-references.md +47 -0
  330. package/versioned_docs/version-v2.x/technical-references/typescript-code/_category_.json +4 -0
  331. package/versioned_docs/version-v2.x/technical-references/typescript-code/cli.md +699 -0
  332. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/_category_.json +4 -0
  333. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +107 -0
  334. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/setup.md +101 -0
  335. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
  336. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/utilities.md +131 -0
  337. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +37 -0
  338. package/versioned_docs/version-v2.x/use-cases/_category_.json +4 -0
  339. package/versioned_docs/version-v2.x/use-cases/governance.md +18 -0
  340. package/versioned_docs/version-v2.x/use-cases/polling.md +10 -0
  341. package/versioned_docs/version-v2.x/use-cases/public-goods.md +65 -0
  342. package/versioned_docs/version-v3.x/case-studies.md +35 -0
  343. package/versioned_docs/version-v3.x/contributing/_category_.json +4 -0
  344. package/versioned_docs/version-v3.x/contributing/code-of-conduct.md +92 -0
  345. package/versioned_docs/version-v3.x/contributing/contributing.md +149 -0
  346. package/versioned_docs/version-v3.x/contributing/project-ideas.md +78 -0
  347. package/versioned_docs/version-v3.x/core-concepts/_category_.json +4 -0
  348. package/versioned_docs/version-v3.x/core-concepts/ballot.md +19 -0
  349. package/versioned_docs/version-v3.x/core-concepts/coordinator-processing.md +46 -0
  350. package/versioned_docs/version-v3.x/core-concepts/coordinator-service.md +16 -0
  351. package/versioned_docs/version-v3.x/core-concepts/hashing-and-encryption.md +45 -0
  352. package/versioned_docs/version-v3.x/core-concepts/key-change.md +179 -0
  353. package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +84 -0
  354. package/versioned_docs/version-v3.x/core-concepts/maci-messages.md +44 -0
  355. package/versioned_docs/version-v3.x/core-concepts/merkle-trees.md +16 -0
  356. package/versioned_docs/version-v3.x/core-concepts/offchain-voting.md +14 -0
  357. package/versioned_docs/version-v3.x/core-concepts/poll-types.md +58 -0
  358. package/versioned_docs/version-v3.x/core-concepts/polls.md +81 -0
  359. package/versioned_docs/version-v3.x/core-concepts/spec.md +883 -0
  360. package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +42 -0
  361. package/versioned_docs/version-v3.x/core-concepts/workflow.md +149 -0
  362. package/versioned_docs/version-v3.x/guides/_category_.json +4 -0
  363. package/versioned_docs/version-v3.x/guides/compile-circuits.md +175 -0
  364. package/versioned_docs/version-v3.x/guides/integrating.md +137 -0
  365. package/versioned_docs/version-v3.x/guides/subgraph.md +79 -0
  366. package/versioned_docs/version-v3.x/guides/testing/_category_.json +4 -0
  367. package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +191 -0
  368. package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +158 -0
  369. package/versioned_docs/version-v3.x/guides/troubleshooting.md +161 -0
  370. package/versioned_docs/version-v3.x/introduction.md +153 -0
  371. package/versioned_docs/version-v3.x/processes/_category_.json +4 -0
  372. package/versioned_docs/version-v3.x/processes/ci-pipeline.md +38 -0
  373. package/versioned_docs/version-v3.x/processes/versioning.md +94 -0
  374. package/versioned_docs/version-v3.x/quick-start.md +318 -0
  375. package/versioned_docs/version-v3.x/resources.md +33 -0
  376. package/versioned_docs/version-v3.x/security/_category_.json +4 -0
  377. package/versioned_docs/version-v3.x/security/audit.md +167 -0
  378. package/versioned_docs/version-v3.x/security/trusted-setup.md +172 -0
  379. package/versioned_docs/version-v3.x/supported-networks/_category_.json +4 -0
  380. package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +112 -0
  381. package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +53 -0
  382. package/versioned_docs/version-v3.x/technical-references/_category_.json +4 -0
  383. package/versioned_docs/version-v3.x/technical-references/coordinator-service/_category_.json +8 -0
  384. package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +10 -0
  385. package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +43 -0
  386. package/versioned_docs/version-v3.x/technical-references/offchain-relayer/_category_.json +8 -0
  387. package/versioned_docs/version-v3.x/technical-references/offchain-relayer/index.md +51 -0
  388. package/versioned_docs/version-v3.x/technical-references/offchain-relayer/installation.md +109 -0
  389. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +160 -0
  390. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
  391. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +33 -0
  392. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +39 -0
  393. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +170 -0
  394. package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +33 -0
  395. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +43 -0
  396. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +62 -0
  397. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
  398. package/versioned_docs/version-v3.x/technical-references/smart-contracts/_category_.json +8 -0
  399. package/versioned_docs/version-v3.x/technical-references/technical-references.md +48 -0
  400. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/_category_.json +4 -0
  401. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +53 -0
  402. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +106 -0
  403. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +96 -0
  404. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
  405. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +131 -0
  406. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +42 -0
  407. package/versioned_docs/version-v3.x/use-cases/_category_.json +4 -0
  408. package/versioned_docs/version-v3.x/use-cases/governance.md +18 -0
  409. package/versioned_docs/version-v3.x/use-cases/polling.md +10 -0
  410. package/versioned_docs/version-v3.x/use-cases/public-goods.md +65 -0
  411. package/versioned_sidebars/version-v0.x-sidebars.json +8 -0
  412. package/versioned_sidebars/version-v1.2-sidebars.json +8 -0
  413. package/versioned_sidebars/version-v2.x-sidebars.json +8 -0
  414. package/versioned_sidebars/version-v3.x-sidebars.json +8 -0
  415. package/versions.json +1 -0
@@ -0,0 +1,1098 @@
1
+ ---
2
+ title: Poll
3
+ sidebar_label: Poll
4
+ ---
5
+
6
+ A representation of the Poll contract.
7
+
8
+ ## Implements
9
+
10
+ - `IPoll`
11
+
12
+ ## Table of contents
13
+
14
+ ### Constructors
15
+
16
+ - [constructor](Poll.md#constructor)
17
+
18
+ ### Properties
19
+
20
+ - [MM](Poll.md#mm)
21
+ - [WW](Poll.md#ww)
22
+ - [ballotTree](Poll.md#ballottree)
23
+ - [ballots](Poll.md#ballots)
24
+ - [batchSizes](Poll.md#batchsizes)
25
+ - [cbi](Poll.md#cbi)
26
+ - [commands](Poll.md#commands)
27
+ - [coordinatorKeypair](Poll.md#coordinatorkeypair)
28
+ - [currentMessageBatchIndex](Poll.md#currentmessagebatchindex)
29
+ - [emptyBallot](Poll.md#emptyballot)
30
+ - [emptyBallotHash](Poll.md#emptyballothash)
31
+ - [encPubKeys](Poll.md#encpubkeys)
32
+ - [maciStateRef](Poll.md#macistateref)
33
+ - [maxValues](Poll.md#maxvalues)
34
+ - [messageTree](Poll.md#messagetree)
35
+ - [messages](Poll.md#messages)
36
+ - [numBatchesProcessed](Poll.md#numbatchesprocessed)
37
+ - [numBatchesTallied](Poll.md#numbatchestallied)
38
+ - [numSignups](Poll.md#numsignups)
39
+ - [perVOSpentVoiceCredits](Poll.md#pervospentvoicecredits)
40
+ - [pollEndTimestamp](Poll.md#pollendtimestamp)
41
+ - [pollId](Poll.md#pollid)
42
+ - [preVOSpentVoiceCreditsRootSalts](Poll.md#prevospentvoicecreditsrootsalts)
43
+ - [rbi](Poll.md#rbi)
44
+ - [resultRootSalts](Poll.md#resultrootsalts)
45
+ - [sbSalts](Poll.md#sbsalts)
46
+ - [spentVoiceCreditSubtotalSalts](Poll.md#spentvoicecreditsubtotalsalts)
47
+ - [stateCopied](Poll.md#statecopied)
48
+ - [stateLeaves](Poll.md#stateleaves)
49
+ - [stateTree](Poll.md#statetree)
50
+ - [stateTreeDepth](Poll.md#statetreedepth)
51
+ - [subsidy](Poll.md#subsidy)
52
+ - [subsidySalts](Poll.md#subsidysalts)
53
+ - [tallyResult](Poll.md#tallyresult)
54
+ - [totalSpentVoiceCredits](Poll.md#totalspentvoicecredits)
55
+ - [treeDepths](Poll.md#treedepths)
56
+
57
+ ### Methods
58
+
59
+ - [coefficientCalculation](Poll.md#coefficientcalculation)
60
+ - [copy](Poll.md#copy)
61
+ - [equals](Poll.md#equals)
62
+ - [genPerVOSpentVoiceCreditsCommitment](Poll.md#genpervospentvoicecreditscommitment)
63
+ - [genProcessMessagesCircuitInputsPartial](Poll.md#genprocessmessagescircuitinputspartial)
64
+ - [genSpentVoiceCreditSubtotalCommitment](Poll.md#genspentvoicecreditsubtotalcommitment)
65
+ - [getNumSignups](Poll.md#getnumsignups)
66
+ - [hasUnfinishedSubsidyCalculation](Poll.md#hasunfinishedsubsidycalculation)
67
+ - [hasUnprocessedMessages](Poll.md#hasunprocessedmessages)
68
+ - [hasUntalliedBallots](Poll.md#hasuntalliedballots)
69
+ - [increaseSubsidyIndex](Poll.md#increasesubsidyindex)
70
+ - [previousSubsidyIndexToString](Poll.md#previoussubsidyindextostring)
71
+ - [processAllMessages](Poll.md#processallmessages)
72
+ - [processMessage](Poll.md#processmessage)
73
+ - [processMessages](Poll.md#processmessages)
74
+ - [publishMessage](Poll.md#publishmessage)
75
+ - [setCoordinatorKeypair](Poll.md#setcoordinatorkeypair)
76
+ - [setNumSignups](Poll.md#setnumsignups)
77
+ - [subsidyCalculation](Poll.md#subsidycalculation)
78
+ - [subsidyPerBatch](Poll.md#subsidyperbatch)
79
+ - [tallyVotes](Poll.md#tallyvotes)
80
+ - [tallyVotesNonQv](Poll.md#tallyvotesnonqv)
81
+ - [toJSON](Poll.md#tojson)
82
+ - [topupMessage](Poll.md#topupmessage)
83
+ - [updatePoll](Poll.md#updatepoll)
84
+ - [fromJSON](Poll.md#fromjson)
85
+
86
+ ## Constructors
87
+
88
+ ### constructor
89
+
90
+ • **new Poll**(`pollEndTimestamp`, `coordinatorKeypair`, `treeDepths`, `batchSizes`, `maxValues`, `maciStateRef`): [`Poll`](Poll.md)
91
+
92
+ Constructs a new Poll object.
93
+
94
+ #### Parameters
95
+
96
+ | Name | Type | Description |
97
+ | :------------------- | :------------------------------------------ | :----------------------------------------------- |
98
+ | `pollEndTimestamp` | `bigint` | The Unix timestamp at which the poll ends. |
99
+ | `coordinatorKeypair` | `Keypair` | The keypair of the coordinator. |
100
+ | `treeDepths` | [`TreeDepths`](../interfaces/TreeDepths.md) | The depths of the trees used in the poll. |
101
+ | `batchSizes` | [`BatchSizes`](../interfaces/BatchSizes.md) | The sizes of the batches used in the poll. |
102
+ | `maxValues` | [`MaxValues`](../interfaces/MaxValues.md) | The maximum values the MACI circuits can accept. |
103
+ | `maciStateRef` | [`MaciState`](MaciState.md) | The reference to the MACI state. |
104
+
105
+ #### Returns
106
+
107
+ [`Poll`](Poll.md)
108
+
109
+ #### Defined in
110
+
111
+ [Poll.ts:146](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L146)
112
+
113
+ ## Properties
114
+
115
+ ### MM
116
+
117
+ • **MM**: `number` = `50`
118
+
119
+ #### Defined in
120
+
121
+ [Poll.ts:124](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L124)
122
+
123
+ ---
124
+
125
+ ### WW
126
+
127
+ • **WW**: `number` = `4`
128
+
129
+ #### Defined in
130
+
131
+ [Poll.ts:126](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L126)
132
+
133
+ ---
134
+
135
+ ### ballotTree
136
+
137
+ • `Optional` **ballotTree**: `IncrementalQuinTree`
138
+
139
+ #### Defined in
140
+
141
+ [Poll.ts:73](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L73)
142
+
143
+ ---
144
+
145
+ ### ballots
146
+
147
+ • **ballots**: `Ballot`[] = `[]`
148
+
149
+ #### Defined in
150
+
151
+ [Poll.ts:71](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L71)
152
+
153
+ ---
154
+
155
+ ### batchSizes
156
+
157
+ • **batchSizes**: [`BatchSizes`](../interfaces/BatchSizes.md)
158
+
159
+ #### Defined in
160
+
161
+ [Poll.ts:62](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L62)
162
+
163
+ ---
164
+
165
+ ### cbi
166
+
167
+ • **cbi**: `number` = `0`
168
+
169
+ #### Defined in
170
+
171
+ [Poll.ts:122](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L122)
172
+
173
+ ---
174
+
175
+ ### commands
176
+
177
+ • **commands**: `ICommand`[] = `[]`
178
+
179
+ #### Defined in
180
+
181
+ [Poll.ts:79](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L79)
182
+
183
+ ---
184
+
185
+ ### coordinatorKeypair
186
+
187
+ • **coordinatorKeypair**: `Keypair`
188
+
189
+ #### Defined in
190
+
191
+ [Poll.ts:58](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L58)
192
+
193
+ ---
194
+
195
+ ### currentMessageBatchIndex
196
+
197
+ • `Optional` **currentMessageBatchIndex**: `number`
198
+
199
+ #### Defined in
200
+
201
+ [Poll.ts:92](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L92)
202
+
203
+ ---
204
+
205
+ ### emptyBallot
206
+
207
+ • **emptyBallot**: `Ballot`
208
+
209
+ #### Defined in
210
+
211
+ [Poll.ts:130](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L130)
212
+
213
+ ---
214
+
215
+ ### emptyBallotHash
216
+
217
+ • `Optional` **emptyBallotHash**: `bigint`
218
+
219
+ #### Defined in
220
+
221
+ [Poll.ts:132](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L132)
222
+
223
+ ---
224
+
225
+ ### encPubKeys
226
+
227
+ • **encPubKeys**: `PubKey`[] = `[]`
228
+
229
+ #### Defined in
230
+
231
+ [Poll.ts:81](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L81)
232
+
233
+ ---
234
+
235
+ ### maciStateRef
236
+
237
+ • **maciStateRef**: [`MaciState`](MaciState.md)
238
+
239
+ #### Defined in
240
+
241
+ [Poll.ts:94](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L94)
242
+
243
+ ---
244
+
245
+ ### maxValues
246
+
247
+ • **maxValues**: [`MaxValues`](../interfaces/MaxValues.md)
248
+
249
+ #### Defined in
250
+
251
+ [Poll.ts:64](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L64)
252
+
253
+ ---
254
+
255
+ ### messageTree
256
+
257
+ • **messageTree**: `IncrementalQuinTree`
258
+
259
+ #### Defined in
260
+
261
+ [Poll.ts:77](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L77)
262
+
263
+ ---
264
+
265
+ ### messages
266
+
267
+ • **messages**: `Message`[] = `[]`
268
+
269
+ #### Defined in
270
+
271
+ [Poll.ts:75](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L75)
272
+
273
+ ---
274
+
275
+ ### numBatchesProcessed
276
+
277
+ • **numBatchesProcessed**: `number` = `0`
278
+
279
+ #### Defined in
280
+
281
+ [Poll.ts:90](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L90)
282
+
283
+ ---
284
+
285
+ ### numBatchesTallied
286
+
287
+ • **numBatchesTallied**: `number` = `0`
288
+
289
+ #### Defined in
290
+
291
+ [Poll.ts:111](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L111)
292
+
293
+ ---
294
+
295
+ ### numSignups
296
+
297
+ • `Private` **numSignups**: `bigint`
298
+
299
+ #### Defined in
300
+
301
+ [Poll.ts:135](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L135)
302
+
303
+ ---
304
+
305
+ ### perVOSpentVoiceCredits
306
+
307
+ • **perVOSpentVoiceCredits**: `bigint`[] = `[]`
308
+
309
+ #### Defined in
310
+
311
+ [Poll.ts:109](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L109)
312
+
313
+ ---
314
+
315
+ ### pollEndTimestamp
316
+
317
+ • **pollEndTimestamp**: `bigint`
318
+
319
+ #### Defined in
320
+
321
+ [Poll.ts:69](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L69)
322
+
323
+ ---
324
+
325
+ ### pollId
326
+
327
+ • **pollId**: `bigint`
328
+
329
+ #### Defined in
330
+
331
+ [Poll.ts:96](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L96)
332
+
333
+ ---
334
+
335
+ ### preVOSpentVoiceCreditsRootSalts
336
+
337
+ • **preVOSpentVoiceCreditsRootSalts**: `Record`\<`string` \| `number`, `bigint`\> = `{}`
338
+
339
+ #### Defined in
340
+
341
+ [Poll.ts:102](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L102)
342
+
343
+ ---
344
+
345
+ ### rbi
346
+
347
+ • **rbi**: `number` = `0`
348
+
349
+ #### Defined in
350
+
351
+ [Poll.ts:120](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L120)
352
+
353
+ ---
354
+
355
+ ### resultRootSalts
356
+
357
+ • **resultRootSalts**: `Record`\<`string` \| `number`, `bigint`\> = `{}`
358
+
359
+ #### Defined in
360
+
361
+ [Poll.ts:100](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L100)
362
+
363
+ ---
364
+
365
+ ### sbSalts
366
+
367
+ • **sbSalts**: `Record`\<`string` \| `number`, `bigint`\> = `{}`
368
+
369
+ #### Defined in
370
+
371
+ [Poll.ts:98](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L98)
372
+
373
+ ---
374
+
375
+ ### spentVoiceCreditSubtotalSalts
376
+
377
+ • **spentVoiceCreditSubtotalSalts**: `Record`\<`string` \| `number`, `bigint`\> = `{}`
378
+
379
+ #### Defined in
380
+
381
+ [Poll.ts:104](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L104)
382
+
383
+ ---
384
+
385
+ ### stateCopied
386
+
387
+ • **stateCopied**: `boolean` = `false`
388
+
389
+ #### Defined in
390
+
391
+ [Poll.ts:83](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L83)
392
+
393
+ ---
394
+
395
+ ### stateLeaves
396
+
397
+ • **stateLeaves**: `StateLeaf`[]
398
+
399
+ #### Defined in
400
+
401
+ [Poll.ts:85](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L85)
402
+
403
+ ---
404
+
405
+ ### stateTree
406
+
407
+ • `Optional` **stateTree**: `IncrementalQuinTree`
408
+
409
+ #### Defined in
410
+
411
+ [Poll.ts:87](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L87)
412
+
413
+ ---
414
+
415
+ ### stateTreeDepth
416
+
417
+ • **stateTreeDepth**: `number`
418
+
419
+ #### Defined in
420
+
421
+ [Poll.ts:67](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L67)
422
+
423
+ ---
424
+
425
+ ### subsidy
426
+
427
+ • **subsidy**: `bigint`[] = `[]`
428
+
429
+ #### Defined in
430
+
431
+ [Poll.ts:116](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L116)
432
+
433
+ ---
434
+
435
+ ### subsidySalts
436
+
437
+ • **subsidySalts**: `Record`\<`string` \| `number`, `bigint`\> = `{}`
438
+
439
+ #### Defined in
440
+
441
+ [Poll.ts:118](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L118)
442
+
443
+ ---
444
+
445
+ ### tallyResult
446
+
447
+ • **tallyResult**: `bigint`[] = `[]`
448
+
449
+ #### Defined in
450
+
451
+ [Poll.ts:107](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L107)
452
+
453
+ ---
454
+
455
+ ### totalSpentVoiceCredits
456
+
457
+ • **totalSpentVoiceCredits**: `bigint`
458
+
459
+ #### Defined in
460
+
461
+ [Poll.ts:113](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L113)
462
+
463
+ ---
464
+
465
+ ### treeDepths
466
+
467
+ • **treeDepths**: [`TreeDepths`](../interfaces/TreeDepths.md)
468
+
469
+ #### Defined in
470
+
471
+ [Poll.ts:60](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L60)
472
+
473
+ ## Methods
474
+
475
+ ### coefficientCalculation
476
+
477
+ ▸ **coefficientCalculation**(`rowBallot`, `colBallot`): `bigint`
478
+
479
+ This method calculates the coefficient for a pair of ballots.
480
+
481
+ #### Parameters
482
+
483
+ | Name | Type | Description |
484
+ | :---------- | :------- | :------------------------ |
485
+ | `rowBallot` | `Ballot` | The ballot in the row. |
486
+ | `colBallot` | `Ballot` | The ballot in the column. |
487
+
488
+ #### Returns
489
+
490
+ `bigint`
491
+
492
+ Returns the calculated coefficient.
493
+
494
+ #### Defined in
495
+
496
+ [Poll.ts:1025](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1025)
497
+
498
+ ---
499
+
500
+ ### copy
501
+
502
+ ▸ **copy**(): [`Poll`](Poll.md)
503
+
504
+ Create a deep copy of the Poll object.
505
+
506
+ #### Returns
507
+
508
+ [`Poll`](Poll.md)
509
+
510
+ A new instance of the Poll object with the same properties.
511
+
512
+ #### Implementation of
513
+
514
+ IPoll.copy
515
+
516
+ #### Defined in
517
+
518
+ [Poll.ts:1454](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1454)
519
+
520
+ ---
521
+
522
+ ### equals
523
+
524
+ ▸ **equals**(`p`): `boolean`
525
+
526
+ Check if the Poll object is equal to another Poll object.
527
+
528
+ #### Parameters
529
+
530
+ | Name | Type | Description |
531
+ | :--- | :---------------- | :-------------------------- |
532
+ | `p` | [`Poll`](Poll.md) | The Poll object to compare. |
533
+
534
+ #### Returns
535
+
536
+ `boolean`
537
+
538
+ True if the two Poll objects are equal, false otherwise.
539
+
540
+ #### Implementation of
541
+
542
+ IPoll.equals
543
+
544
+ #### Defined in
545
+
546
+ [Poll.ts:1540](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1540)
547
+
548
+ ---
549
+
550
+ ### genPerVOSpentVoiceCreditsCommitment
551
+
552
+ ▸ **genPerVOSpentVoiceCreditsCommitment**(`salt`, `numBallotsToCount`, `useQuadraticVoting?`): `bigint`
553
+
554
+ This method generates a commitment to the spent voice credits per vote option.
555
+
556
+ This is the hash of the Merkle root of the spent voice credits per vote option and a salt, computed as Poseidon([root, _salt]).
557
+
558
+ #### Parameters
559
+
560
+ | Name | Type | Default value | Description |
561
+ | :------------------- | :-------- | :------------ | :------------------------------------------------------- |
562
+ | `salt` | `bigint` | `undefined` | The salt used in the hash function. |
563
+ | `numBallotsToCount` | `number` | `undefined` | The number of ballots to count for the calculation. |
564
+ | `useQuadraticVoting` | `boolean` | `true` | Whether to use quadratic voting or not. Default is true. |
565
+
566
+ #### Returns
567
+
568
+ `bigint`
569
+
570
+ Returns the hash of the Merkle root of the spent voice credits per vote option and a salt, computed as Poseidon([root, _salt]).
571
+
572
+ #### Defined in
573
+
574
+ [Poll.ts:1428](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1428)
575
+
576
+ ---
577
+
578
+ ### genProcessMessagesCircuitInputsPartial
579
+
580
+ ▸ **genProcessMessagesCircuitInputsPartial**(`index`): [`CircuitInputs`](../modules.md#circuitinputs)
581
+
582
+ Generates partial circuit inputs for processing a batch of messages
583
+
584
+ #### Parameters
585
+
586
+ | Name | Type | Description |
587
+ | :------ | :------- | :------------------------------ |
588
+ | `index` | `number` | The index of the partial batch. |
589
+
590
+ #### Returns
591
+
592
+ [`CircuitInputs`](../modules.md#circuitinputs)
593
+
594
+ stringified partial circuit inputs
595
+
596
+ #### Defined in
597
+
598
+ [Poll.ts:776](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L776)
599
+
600
+ ---
601
+
602
+ ### genSpentVoiceCreditSubtotalCommitment
603
+
604
+ ▸ **genSpentVoiceCreditSubtotalCommitment**(`salt`, `numBallotsToCount`, `useQuadraticVoting?`): `bigint`
605
+
606
+ This method generates a commitment to the total spent voice credits.
607
+
608
+ This is the hash of the total spent voice credits and a salt, computed as Poseidon([totalCredits, _salt]).
609
+
610
+ #### Parameters
611
+
612
+ | Name | Type | Default value | Description |
613
+ | :------------------- | :-------- | :------------ | :------------------------------------------------------- |
614
+ | `salt` | `bigint` | `undefined` | The salt used in the hash function. |
615
+ | `numBallotsToCount` | `number` | `undefined` | The number of ballots to count for the calculation. |
616
+ | `useQuadraticVoting` | `boolean` | `true` | Whether to use quadratic voting or not. Default is true. |
617
+
618
+ #### Returns
619
+
620
+ `bigint`
621
+
622
+ Returns the hash of the total spent voice credits and a salt, computed as Poseidon([totalCredits, _salt]).
623
+
624
+ #### Defined in
625
+
626
+ [Poll.ts:1400](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1400)
627
+
628
+ ---
629
+
630
+ ### getNumSignups
631
+
632
+ ▸ **getNumSignups**(): `bigint`
633
+
634
+ Get the number of signups
635
+
636
+ #### Returns
637
+
638
+ `bigint`
639
+
640
+ The number of signups
641
+
642
+ #### Defined in
643
+
644
+ [Poll.ts:1665](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1665)
645
+
646
+ ---
647
+
648
+ ### hasUnfinishedSubsidyCalculation
649
+
650
+ ▸ **hasUnfinishedSubsidyCalculation**(): `boolean`
651
+
652
+ This method checks if there are any unfinished subsidy calculations.
653
+
654
+ #### Returns
655
+
656
+ `boolean`
657
+
658
+ Returns true if the product of the row batch index (rbi) and batch size or
659
+ the product of column batch index (cbi) and batch size is less than the length
660
+ of the ballots array, indicating that there are still ballots left to be processed.
661
+ Otherwise, it returns false.
662
+
663
+ #### Implementation of
664
+
665
+ IPoll.hasUnfinishedSubsidyCalculation
666
+
667
+ #### Defined in
668
+
669
+ [Poll.ts:906](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L906)
670
+
671
+ ---
672
+
673
+ ### hasUnprocessedMessages
674
+
675
+ ▸ **hasUnprocessedMessages**(): `boolean`
676
+
677
+ This method checks if there are any unprocessed messages in the Poll instance.
678
+
679
+ #### Returns
680
+
681
+ `boolean`
682
+
683
+ Returns true if the number of processed batches is
684
+ less than the total number of batches, false otherwise.
685
+
686
+ #### Implementation of
687
+
688
+ IPoll.hasUnprocessedMessages
689
+
690
+ #### Defined in
691
+
692
+ [Poll.ts:411](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L411)
693
+
694
+ ---
695
+
696
+ ### hasUntalliedBallots
697
+
698
+ ▸ **hasUntalliedBallots**(): `boolean`
699
+
700
+ Checks whether there are any untallied ballots.
701
+
702
+ #### Returns
703
+
704
+ `boolean`
705
+
706
+ Whether there are any untallied ballots
707
+
708
+ #### Implementation of
709
+
710
+ IPoll.hasUntalliedBallots
711
+
712
+ #### Defined in
713
+
714
+ [Poll.ts:897](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L897)
715
+
716
+ ---
717
+
718
+ ### increaseSubsidyIndex
719
+
720
+ ▸ **increaseSubsidyIndex**(): `void`
721
+
722
+ It increases the index for the subsidy calculation.
723
+
724
+ #### Returns
725
+
726
+ `void`
727
+
728
+ #### Defined in
729
+
730
+ [Poll.ts:980](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L980)
731
+
732
+ ---
733
+
734
+ ### previousSubsidyIndexToString
735
+
736
+ ▸ **previousSubsidyIndexToString**(): `string`
737
+
738
+ This method converts the previous subsidy index to a string.
739
+
740
+ #### Returns
741
+
742
+ `string`
743
+
744
+ Returns a string representation of the previous subsidy index.
745
+ The string is in the format "rbi-cbi", where rbi and cbi are
746
+ the previous row batch index and column batch index respectively.
747
+
748
+ #### Defined in
749
+
750
+ [Poll.ts:997](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L997)
751
+
752
+ ---
753
+
754
+ ### processAllMessages
755
+
756
+ ▸ **processAllMessages**(): `Object`
757
+
758
+ Process all messages. This function does not update the ballots or state
759
+ leaves; rather, it copies and then updates them. This makes it possible
760
+ to test the result of multiple processMessage() invocations.
761
+
762
+ #### Returns
763
+
764
+ `Object`
765
+
766
+ The state leaves and ballots of the poll
767
+
768
+ | Name | Type |
769
+ | :------------ | :------------ |
770
+ | `ballots` | `Ballot`[] |
771
+ | `stateLeaves` | `StateLeaf`[] |
772
+
773
+ #### Implementation of
774
+
775
+ IPoll.processAllMessages
776
+
777
+ #### Defined in
778
+
779
+ [Poll.ts:881](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L881)
780
+
781
+ ---
782
+
783
+ ### processMessage
784
+
785
+ ▸ **processMessage**(`message`, `encPubKey`, `qv?`): `IProcessMessagesOutput`
786
+
787
+ Process one message.
788
+
789
+ #### Parameters
790
+
791
+ | Name | Type | Default value | Description |
792
+ | :---------- | :-------- | :------------ | :--------------------------------------------------------- |
793
+ | `message` | `Message` | `undefined` | The message to process. |
794
+ | `encPubKey` | `PubKey` | `undefined` | The public key associated with the encryption private key. |
795
+ | `qv` | `boolean` | `true` | - |
796
+
797
+ #### Returns
798
+
799
+ `IProcessMessagesOutput`
800
+
801
+ A number of variables which will be used in the zk-SNARK circuit.
802
+
803
+ #### Defined in
804
+
805
+ [Poll.ts:225](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L225)
806
+
807
+ ---
808
+
809
+ ### processMessages
810
+
811
+ ▸ **processMessages**(`pollId`, `qv?`, `quiet?`): [`IProcessMessagesCircuitInputs`](../interfaces/IProcessMessagesCircuitInputs.md)
812
+
813
+ Process \_batchSize messages starting from the saved index. This
814
+ function will process messages even if the number of messages is not an
815
+ exact multiple of \_batchSize. e.g. if there are 10 messages, index is
816
+ 8, and \_batchSize is 4, this function will only process the last two
817
+ messages in this.messages, and finally update the zeroth state leaf.
818
+ Note that this function will only process as many state leaves as there
819
+ are ballots to prevent accidental inclusion of a new user after this
820
+ poll has concluded.
821
+
822
+ #### Parameters
823
+
824
+ | Name | Type | Default value | Description |
825
+ | :------- | :-------- | :------------ | :--------------------------------------------------------- |
826
+ | `pollId` | `bigint` | `undefined` | The ID of the poll associated with the messages to process |
827
+ | `qv` | `boolean` | `true` | - |
828
+ | `quiet` | `boolean` | `true` | Whether to log errors or not |
829
+
830
+ #### Returns
831
+
832
+ [`IProcessMessagesCircuitInputs`](../interfaces/IProcessMessagesCircuitInputs.md)
833
+
834
+ stringified circuit inputs
835
+
836
+ #### Implementation of
837
+
838
+ IPoll.processMessages
839
+
840
+ #### Defined in
841
+
842
+ [Poll.ts:437](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L437)
843
+
844
+ ---
845
+
846
+ ### publishMessage
847
+
848
+ ▸ **publishMessage**(`message`, `encPubKey`): `void`
849
+
850
+ Inserts a Message and the corresponding public key used to generate the
851
+ ECDH shared key which was used to encrypt said message.
852
+
853
+ #### Parameters
854
+
855
+ | Name | Type | Description |
856
+ | :---------- | :-------- | :----------------------------------------- |
857
+ | `message` | `Message` | The message to insert |
858
+ | `encPubKey` | `PubKey` | The public key used to encrypt the message |
859
+
860
+ #### Returns
861
+
862
+ `void`
863
+
864
+ #### Implementation of
865
+
866
+ IPoll.publishMessage
867
+
868
+ #### Defined in
869
+
870
+ [Poll.ts:372](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L372)
871
+
872
+ ---
873
+
874
+ ### setCoordinatorKeypair
875
+
876
+ ▸ **setCoordinatorKeypair**(`serializedPrivateKey`): `void`
877
+
878
+ Set the coordinator's keypair
879
+
880
+ #### Parameters
881
+
882
+ | Name | Type | Description |
883
+ | :--------------------- | :------- | :------------------------- |
884
+ | `serializedPrivateKey` | `string` | the serialized private key |
885
+
886
+ #### Returns
887
+
888
+ `void`
889
+
890
+ #### Implementation of
891
+
892
+ IPoll.setCoordinatorKeypair
893
+
894
+ #### Defined in
895
+
896
+ [Poll.ts:1649](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1649)
897
+
898
+ ---
899
+
900
+ ### setNumSignups
901
+
902
+ ▸ **setNumSignups**(`numSignups`): `void`
903
+
904
+ Set the number of signups to match the ones from the contract
905
+
906
+ #### Parameters
907
+
908
+ | Name | Type | Description |
909
+ | :----------- | :------- | :-------------------- |
910
+ | `numSignups` | `bigint` | the number of signups |
911
+
912
+ #### Returns
913
+
914
+ `void`
915
+
916
+ #### Defined in
917
+
918
+ [Poll.ts:1657](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1657)
919
+
920
+ ---
921
+
922
+ ### subsidyCalculation
923
+
924
+ ▸ **subsidyCalculation**(`rowStartIndex`, `colStartIndex`): `Ballot`[][]
925
+
926
+ This method calculates the subsidy for a batch of ballots.
927
+
928
+ #### Parameters
929
+
930
+ | Name | Type | Description |
931
+ | :-------------- | :------- | :----------------------------------------- |
932
+ | `rowStartIndex` | `number` | The starting index for the row ballots. |
933
+ | `colStartIndex` | `number` | The starting index for the column ballots. |
934
+
935
+ #### Returns
936
+
937
+ `Ballot`[][]
938
+
939
+ Returns a 2D array of ballots. The first array contains the row ballots and the second array contains the column ballots.
940
+
941
+ #### Defined in
942
+
943
+ [Poll.ts:1040](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1040)
944
+
945
+ ---
946
+
947
+ ### subsidyPerBatch
948
+
949
+ ▸ **subsidyPerBatch**(): [`ISubsidyCircuitInputs`](../interfaces/ISubsidyCircuitInputs.md)
950
+
951
+ This method calculates the subsidy per batch.
952
+
953
+ #### Returns
954
+
955
+ [`ISubsidyCircuitInputs`](../interfaces/ISubsidyCircuitInputs.md)
956
+
957
+ Returns an array of big integers which represent the circuit inputs for the subsidy calculation.
958
+
959
+ #### Implementation of
960
+
961
+ IPoll.subsidyPerBatch
962
+
963
+ #### Defined in
964
+
965
+ [Poll.ts:915](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L915)
966
+
967
+ ---
968
+
969
+ ### tallyVotes
970
+
971
+ ▸ **tallyVotes**(): [`ITallyCircuitInputs`](../interfaces/ITallyCircuitInputs.md)
972
+
973
+ This method tallies a ballots and updates the tally results.
974
+
975
+ #### Returns
976
+
977
+ [`ITallyCircuitInputs`](../interfaces/ITallyCircuitInputs.md)
978
+
979
+ the circuit inputs for the TallyVotes circuit.
980
+
981
+ #### Implementation of
982
+
983
+ IPoll.tallyVotes
984
+
985
+ #### Defined in
986
+
987
+ [Poll.ts:1079](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1079)
988
+
989
+ ---
990
+
991
+ ### tallyVotesNonQv
992
+
993
+ ▸ **tallyVotesNonQv**(): [`ITallyCircuitInputs`](../interfaces/ITallyCircuitInputs.md)
994
+
995
+ #### Returns
996
+
997
+ [`ITallyCircuitInputs`](../interfaces/ITallyCircuitInputs.md)
998
+
999
+ #### Defined in
1000
+
1001
+ [Poll.ts:1254](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1254)
1002
+
1003
+ ---
1004
+
1005
+ ### toJSON
1006
+
1007
+ ▸ **toJSON**(): `IJsonPoll`
1008
+
1009
+ Serialize the Poll object to a JSON object
1010
+
1011
+ #### Returns
1012
+
1013
+ `IJsonPoll`
1014
+
1015
+ a JSON object
1016
+
1017
+ #### Implementation of
1018
+
1019
+ IPoll.toJSON
1020
+
1021
+ #### Defined in
1022
+
1023
+ [Poll.ts:1576](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1576)
1024
+
1025
+ ---
1026
+
1027
+ ### topupMessage
1028
+
1029
+ ▸ **topupMessage**(`message`): `void`
1030
+
1031
+ Top up the voice credit balance of a user.
1032
+
1033
+ #### Parameters
1034
+
1035
+ | Name | Type | Description |
1036
+ | :-------- | :-------- | :--------------------------------------------- |
1037
+ | `message` | `Message` | The message to top up the voice credit balance |
1038
+
1039
+ #### Returns
1040
+
1041
+ `void`
1042
+
1043
+ #### Implementation of
1044
+
1045
+ IPoll.topupMessage
1046
+
1047
+ #### Defined in
1048
+
1049
+ [Poll.ts:342](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L342)
1050
+
1051
+ ---
1052
+
1053
+ ### updatePoll
1054
+
1055
+ ▸ **updatePoll**(`numSignups`): `void`
1056
+
1057
+ Update a Poll with data from MaciState.
1058
+ This is the step where we copy the state from the MaciState instance,
1059
+ and set the number of signups we have so far.
1060
+
1061
+ #### Parameters
1062
+
1063
+ | Name | Type |
1064
+ | :----------- | :------- |
1065
+ | `numSignups` | `bigint` |
1066
+
1067
+ #### Returns
1068
+
1069
+ `void`
1070
+
1071
+ #### Defined in
1072
+
1073
+ [Poll.ts:184](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L184)
1074
+
1075
+ ---
1076
+
1077
+ ### fromJSON
1078
+
1079
+ ▸ **fromJSON**(`json`, `maciState`): [`Poll`](Poll.md)
1080
+
1081
+ Deserialize a json object into a Poll instance
1082
+
1083
+ #### Parameters
1084
+
1085
+ | Name | Type | Description |
1086
+ | :---------- | :-------------------------- | :----------------------------------- |
1087
+ | `json` | `IJsonPoll` | the json object to deserialize |
1088
+ | `maciState` | [`MaciState`](MaciState.md) | the reference to the MaciState Class |
1089
+
1090
+ #### Returns
1091
+
1092
+ [`Poll`](Poll.md)
1093
+
1094
+ a new Poll instance
1095
+
1096
+ #### Defined in
1097
+
1098
+ [Poll.ts:1600](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/core/ts/Poll.ts#L1600)