@maci-protocol/core 0.0.0-ci.da13fbb → 0.0.0-ci.dbe8003

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,420 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 3.0.0 (2026-06-12)
7
+
8
+ * chore: add publishConfig (#2308) ([26f28d6](https://github.com/privacy-scaling-explorations/maci/commit/26f28d6)), closes [#2308](https://github.com/privacy-scaling-explorations/maci/issues/2308)
9
+ * chore: explicity define packages as not private ([1736fec](https://github.com/privacy-scaling-explorations/maci/commit/1736fec))
10
+ * chore: fix 404 status URL (#1949) ([38cbf66](https://github.com/privacy-scaling-explorations/maci/commit/38cbf66)), closes [#1949](https://github.com/privacy-scaling-explorations/maci/issues/1949)
11
+ * chore: move from dev to main branch ([df37bb1](https://github.com/privacy-scaling-explorations/maci/commit/df37bb1))
12
+ * chore: move packages to @maci org (#2286) ([7275509](https://github.com/privacy-scaling-explorations/maci/commit/7275509)), closes [#2286](https://github.com/privacy-scaling-explorations/maci/issues/2286)
13
+ * chore: update zkeys link ([1c8fa1b](https://github.com/privacy-scaling-explorations/maci/commit/1c8fa1b))
14
+ * chore: use type imports ([9da523a](https://github.com/privacy-scaling-explorations/maci/commit/9da523a))
15
+ * chore(deps-dev): bump @types/lodash from 4.17.16 to 4.17.17 ([c3de49f](https://github.com/privacy-scaling-explorations/maci/commit/c3de49f))
16
+ * chore(deps-dev): bump @types/lodash from 4.17.17 to 4.17.19 ([145179f](https://github.com/privacy-scaling-explorations/maci/commit/145179f))
17
+ * chore(deps-dev): bump @types/lodash from 4.17.19 to 4.17.20 (#2623) ([5201a1d](https://github.com/privacy-scaling-explorations/maci/commit/5201a1d)), closes [#2623](https://github.com/privacy-scaling-explorations/maci/issues/2623)
18
+ * chore(deps-dev): bump @types/mocha from 10.0.8 to 10.0.10 ([a8b029a](https://github.com/privacy-scaling-explorations/maci/commit/a8b029a))
19
+ * chore(deps-dev): bump @types/node from 20.17.19 to 22.13.9 ([aa7c356](https://github.com/privacy-scaling-explorations/maci/commit/aa7c356))
20
+ * chore(deps-dev): bump @types/node from 22.10.7 to 22.12.0 (#2073) ([1dcb28e](https://github.com/privacy-scaling-explorations/maci/commit/1dcb28e)), closes [#2073](https://github.com/privacy-scaling-explorations/maci/issues/2073)
21
+ * chore(deps-dev): bump @types/node from 22.12.0 to 22.13.1 ([5f06af0](https://github.com/privacy-scaling-explorations/maci/commit/5f06af0))
22
+ * chore(deps-dev): bump @types/node from 22.13.1 to 22.13.4 ([dba94f4](https://github.com/privacy-scaling-explorations/maci/commit/dba94f4))
23
+ * chore(deps-dev): bump @types/node from 22.13.17 to 22.14.0 ([3434168](https://github.com/privacy-scaling-explorations/maci/commit/3434168))
24
+ * chore(deps-dev): bump @types/node from 22.13.9 to 22.13.10 (#2241) ([3f50bb6](https://github.com/privacy-scaling-explorations/maci/commit/3f50bb6)), closes [#2241](https://github.com/privacy-scaling-explorations/maci/issues/2241)
25
+ * chore(deps-dev): bump @types/node from 22.14.0 to 22.14.1 ([38f0947](https://github.com/privacy-scaling-explorations/maci/commit/38f0947))
26
+ * chore(deps-dev): bump @types/node from 22.14.1 to 22.15.3 ([430d214](https://github.com/privacy-scaling-explorations/maci/commit/430d214))
27
+ * chore(deps-dev): bump @types/node from 22.15.17 to 24.0.1 ([33485a5](https://github.com/privacy-scaling-explorations/maci/commit/33485a5))
28
+ * chore(deps-dev): bump @types/node from 22.15.8 to 22.15.17 ([b144ca2](https://github.com/privacy-scaling-explorations/maci/commit/b144ca2))
29
+ * chore(deps-dev): bump @types/node from 22.9.0 to 22.10.7 ([3e4a5ae](https://github.com/privacy-scaling-explorations/maci/commit/3e4a5ae))
30
+ * chore(deps-dev): bump @types/node from 24.0.1 to 24.0.3 ([834943a](https://github.com/privacy-scaling-explorations/maci/commit/834943a))
31
+ * chore(deps-dev): bump @types/node from 24.0.12 to 24.0.13 ([f85b4b1](https://github.com/privacy-scaling-explorations/maci/commit/f85b4b1))
32
+ * chore(deps-dev): bump @types/node from 24.0.13 to 24.2.0 (#2697) ([35e2fb7](https://github.com/privacy-scaling-explorations/maci/commit/35e2fb7)), closes [#2697](https://github.com/privacy-scaling-explorations/maci/issues/2697)
33
+ * chore(deps-dev): bump @types/node from 24.0.3 to 24.0.4 ([a00ce55](https://github.com/privacy-scaling-explorations/maci/commit/a00ce55))
34
+ * chore(deps-dev): bump @types/node from 24.0.4 to 24.0.7 ([fbbe0a7](https://github.com/privacy-scaling-explorations/maci/commit/fbbe0a7))
35
+ * chore(deps-dev): bump @types/node from 24.0.7 to 24.0.12 (#2626) ([5975ca0](https://github.com/privacy-scaling-explorations/maci/commit/5975ca0)), closes [#2626](https://github.com/privacy-scaling-explorations/maci/issues/2626)
36
+ * chore(deps-dev): bump mocha from 10.7.3 to 11.0.1 ([457a504](https://github.com/privacy-scaling-explorations/maci/commit/457a504))
37
+ * chore(deps-dev): bump mocha from 10.8.2 to 11.1.0 ([f524a07](https://github.com/privacy-scaling-explorations/maci/commit/f524a07))
38
+ * chore(deps-dev): bump mocha from 11.1.0 to 11.2.2 ([044ad2e](https://github.com/privacy-scaling-explorations/maci/commit/044ad2e))
39
+ * chore(deps-dev): bump mocha from 11.2.2 to 11.4.0 ([09929d2](https://github.com/privacy-scaling-explorations/maci/commit/09929d2))
40
+ * chore(deps-dev): bump mocha from 11.4.0 to 11.6.0 (#2546) ([54823d2](https://github.com/privacy-scaling-explorations/maci/commit/54823d2)), closes [#2546](https://github.com/privacy-scaling-explorations/maci/issues/2546)
41
+ * chore(deps-dev): bump mocha from 11.6.0 to 11.7.0 ([739b4e5](https://github.com/privacy-scaling-explorations/maci/commit/739b4e5))
42
+ * chore(deps-dev): bump mocha from 11.7.1 to 11.7.2 ([5646026](https://github.com/privacy-scaling-explorations/maci/commit/5646026))
43
+ * chore(deps-dev): bump ts-mocha from 10.0.0 to 11.1.0 ([df84193](https://github.com/privacy-scaling-explorations/maci/commit/df84193))
44
+ * chore(deps-dev): bump typescript and typedoc ([4ee5de5](https://github.com/privacy-scaling-explorations/maci/commit/4ee5de5))
45
+ * chore(deps-dev): bump typescript from 5.7.3 to 5.8.2 ([e37f1bf](https://github.com/privacy-scaling-explorations/maci/commit/e37f1bf))
46
+ * chore(deps-dev): bump typescript from 5.8.2 to 5.8.3 ([048cefc](https://github.com/privacy-scaling-explorations/maci/commit/048cefc))
47
+ * chore(deps-dev): bump typescript from 5.8.3 to 5.9.2 ([17e4a70](https://github.com/privacy-scaling-explorations/maci/commit/17e4a70))
48
+ * chore(deps): bump @types/node to 24.11.0 ([36f727b](https://github.com/privacy-scaling-explorations/maci/commit/36f727b))
49
+ * chore(deps): bump @zk-kit/lean-imt from 2.2.1 to 2.2.2 ([73fddce](https://github.com/privacy-scaling-explorations/maci/commit/73fddce))
50
+ * chore(deps): bump @zk-kit/lean-imt from 2.2.2 to 2.2.3 ([a269d5c](https://github.com/privacy-scaling-explorations/maci/commit/a269d5c))
51
+ * chore(deps): bump @zk-kit/lean-imt from 2.2.3 to 2.2.4 ([cccd882](https://github.com/privacy-scaling-explorations/maci/commit/cccd882))
52
+ * fix: anon poll joining ([bc6d4c2](https://github.com/privacy-scaling-explorations/maci/commit/bc6d4c2))
53
+ * fix: remove max vote options param ([765ca42](https://github.com/privacy-scaling-explorations/maci/commit/765ca42))
54
+ * fix: under-constrained bug in BinaryMerkleRoot ([4fe3cec](https://github.com/privacy-scaling-explorations/maci/commit/4fe3cec))
55
+ * feat: add message processor for full voice credits mode ([d7f4240](https://github.com/privacy-scaling-explorations/maci/commit/d7f4240))
56
+ * feat: add number of valid vote options ([cdba5a3](https://github.com/privacy-scaling-explorations/maci/commit/cdba5a3))
57
+ * feat: add poll state tree depth ([3d74d4b](https://github.com/privacy-scaling-explorations/maci/commit/3d74d4b))
58
+ * feat: anonymous poll joining milestone 1 (#1625) ([5566cfe](https://github.com/privacy-scaling-explorations/maci/commit/5566cfe)), closes [#1625](https://github.com/privacy-scaling-explorations/maci/issues/1625)
59
+ * feat: anonymous poll joining milestone 2 and 3 (#1750) ([47d6937](https://github.com/privacy-scaling-explorations/maci/commit/47d6937)), closes [#1750](https://github.com/privacy-scaling-explorations/maci/issues/1750)
60
+ * feat: force the same key for each poll (#2063) ([11e5b8a](https://github.com/privacy-scaling-explorations/maci/commit/11e5b8a)), closes [#2063](https://github.com/privacy-scaling-explorations/maci/issues/2063)
61
+ * feat: make nullifier not leak identity between polls (#1974) ([c9e7efc](https://github.com/privacy-scaling-explorations/maci/commit/c9e7efc)), closes [#1974](https://github.com/privacy-scaling-explorations/maci/issues/1974)
62
+ * feat: rebase anon poll joining with dev ([c384a5b](https://github.com/privacy-scaling-explorations/maci/commit/c384a5b))
63
+ * feat: voice credits per poll (#1967) ([f59e9c3](https://github.com/privacy-scaling-explorations/maci/commit/f59e9c3)), closes [#1967](https://github.com/privacy-scaling-explorations/maci/issues/1967)
64
+ * feat(circuits): add partial support for full spent voting mode ([8c06abb](https://github.com/privacy-scaling-explorations/maci/commit/8c06abb))
65
+ * feat(circuits): add poll joined circuit ([30c4f6a](https://github.com/privacy-scaling-explorations/maci/commit/30c4f6a))
66
+ * feat(circuits): remove timestamp from state leaf ([831e00d](https://github.com/privacy-scaling-explorations/maci/commit/831e00d))
67
+ * feat(circuits): reuse tally non-qv for full spent mode (#2437) ([ae1d978](https://github.com/privacy-scaling-explorations/maci/commit/ae1d978)), closes [#2437](https://github.com/privacy-scaling-explorations/maci/issues/2437)
68
+ * feat(core): support individual vote counts circuit inputs (#2575) ([38c76f2](https://github.com/privacy-scaling-explorations/maci/commit/38c76f2)), closes [#2575](https://github.com/privacy-scaling-explorations/maci/issues/2575)
69
+ * feat(relayer): add auth guard for message publishing ([813bfc7](https://github.com/privacy-scaling-explorations/maci/commit/813bfc7))
70
+ * refactor: circuit structure (#2485) ([2cf83db](https://github.com/privacy-scaling-explorations/maci/commit/2cf83db)), closes [#2485](https://github.com/privacy-scaling-explorations/maci/issues/2485)
71
+ * refactor: expand shorthand variables to full names ([75547c0](https://github.com/privacy-scaling-explorations/maci/commit/75547c0))
72
+ * refactor: remove redundant param (#2161) ([2cc986f](https://github.com/privacy-scaling-explorations/maci/commit/2cc986f)), closes [#2161](https://github.com/privacy-scaling-explorations/maci/issues/2161)
73
+ * refactor: rename from short to full names ([120cffa](https://github.com/privacy-scaling-explorations/maci/commit/120cffa))
74
+ * refactor(circuits): rename circuits signal inputs and move templates ([c2f4e36](https://github.com/privacy-scaling-explorations/maci/commit/c2f4e36))
75
+ * docs: add full credits information ([e65476e](https://github.com/privacy-scaling-explorations/maci/commit/e65476e))
76
+ * test: e2e full spent voting mode ([2429ff4](https://github.com/privacy-scaling-explorations/maci/commit/2429ff4))
77
+ * test(relayer): add more e2e tests ([0cbfc40](https://github.com/privacy-scaling-explorations/maci/commit/0cbfc40))
78
+
79
+
80
+ ### BREAKING CHANGE
81
+
82
+ * message processing is changed
83
+
84
+ * fix(ipoll): add missing parameter
85
+
86
+ * fix(poll-tests): add missing parameter maxMessagebatchSize
87
+
88
+ * feat(poll.ts): add chain hash updating
89
+
90
+ * test(poll tests): add test for checking chain hash computation
91
+
92
+ * feat(poll.ts): add batch hashes array computation
93
+
94
+ * feat(poll.sol): pad zeroes to the maximum size of batch
95
+
96
+ * feat(messageprocessor): update process messages to use chain hash
97
+
98
+ * refactor(vkregistry): refactor function call
99
+
100
+ * feat(processmessages.circom): add chainHash feature in circuits and test for that
101
+
102
+ * test(processmessages): rearrange test for key-change
103
+
104
+ * refactor(mergemessages): refactor functions calls which include mergemessages
105
+
106
+ * refactor(mergemessages): add some more changes about functions call which include mergemessages
107
+
108
+ * test(all tests): fixing tests after refactoring code
109
+
110
+ * refactor(accqueue): remove all calls for accqueue
111
+
112
+ * fix(currentmessagebatchindex): fix message batch indexing
113
+
114
+ * refactor(circuit tests): refactor code for circuit testing
115
+
116
+ * test(ceremonyparams.test): correct constants for CeremonyParams test
117
+
118
+ * perf(processmessages.circom + contracts): optimize last batch padding, remove unused inputs
119
+
120
+ * docs(padlastbatch method): update doc comment
121
+
122
+ * docs(poll.ts): remove stale comments
123
+
124
+ * docs(test comments): fix typos
125
+
126
+ * ci(treedepths mock): modify interface for mocked function
127
+
128
+ * fix(ceremony params test): fix circuit inputs
129
+
130
+ * test(messagevalidator): fix function calls for messagevalidator circuit in tests
131
+
132
+ * chore(comments): fix unusefull comments
133
+
134
+ * refactor(poll.sol): replace external contracts with maci only
135
+
136
+ * perf(messageprocessor.sol): hardcode initialization for batchHashes array
137
+
138
+ * docs(comments): fix some more comments
139
+
140
+ * test(test for pr checks): correct some of tests for PR checks
141
+
142
+ * ci: 🎡 renamed old ProcessMessages_10-2-1-2_test
143
+
144
+ * ci: 🎡 correct rapidsnark/build/prover path
145
+
146
+ * style(reviews): solve some reviews for merging
147
+
148
+ * refactor(messageaqq): remove more message merging and message aqq
149
+
150
+ * style(messageaqq): remove more message merging and message aqq
151
+
152
+ * refactor(messageaqq): remove message aqq from subgraph
153
+
154
+ * test(coordinator): hide NOT_MERGED_MESSAGE_TREE error
155
+
156
+ * test(coordinator): fix test about message merging
157
+
158
+ * test(proveonchain): change chainHash calculation
159
+
160
+ * test(proveonchain): fix chainHashes declaration
161
+
162
+ * test(proveonchain): fix chainHash calculation
163
+
164
+ * test(proveonchain): fix chainHashes calculations
165
+
166
+ * test(proveonchain): fix chainHashes calculation
167
+
168
+ * test(proveonchain): fix loop limit
169
+
170
+ * style(review comments): resolve some of review comments
171
+
172
+ * style(review comments): resolve some of review comments
173
+
174
+ * test(lint:ts): fix e2e test because of lint:ts check
175
+
176
+ * docs(wrong changes): fix wrong changes about documentation that is not in our scope
177
+
178
+ * refactor(batchsizes): change batchSizes struct with messageBatchSize variable
179
+
180
+ * refactor(contracts): rollback to provide external contract references
181
+
182
+ * docs(messageprocessor.sol): fix typo
183
+
184
+ * refactor(messagebatchsize): chenge messageBatchSize location from Params.sol to Poll.sol
185
+
186
+ * refactor(maxmessages): remove maxMessages from maxValues
187
+
188
+ * refactor(sltimestemp): remove slTimestamp from circuits
189
+
190
+ * refactor(review comments): resolve more review comments
191
+
192
+ * fix(subgraph): fix bug about maxVoteOptions dunction call
193
+
194
+ * fix(sltimestamp): fix test for removing slTimestap signal
195
+
196
+ * refactor(promise.all): refactor promise.all for only one async call
197
+
198
+ * fix(subgraph): try to fix subgraph build
199
+
200
+ * revert(.nx folder): remove .nx folder from cli folder
201
+ * message processing is changed
202
+
203
+ * fix(ipoll): add missing parameter
204
+
205
+ * fix(poll-tests): add missing parameter maxMessagebatchSize
206
+
207
+ * feat(poll.ts): add chain hash updating
208
+
209
+ * test(poll tests): add test for checking chain hash computation
210
+
211
+ * feat(poll.ts): add batch hashes array computation
212
+
213
+ * feat(poll.sol): pad zeroes to the maximum size of batch
214
+
215
+ * feat(messageprocessor): update process messages to use chain hash
216
+
217
+ * refactor(vkregistry): refactor function call
218
+
219
+ * feat(processmessages.circom): add chainHash feature in circuits and test for that
220
+
221
+ * test(processmessages): rearrange test for key-change
222
+
223
+ * refactor(mergemessages): refactor functions calls which include mergemessages
224
+
225
+ * refactor(mergemessages): add some more changes about functions call which include mergemessages
226
+
227
+ * test(all tests): fixing tests after refactoring code
228
+
229
+ * refactor(accqueue): remove all calls for accqueue
230
+
231
+ * fix(currentmessagebatchindex): fix message batch indexing
232
+
233
+ * refactor(circuit tests): refactor code for circuit testing
234
+
235
+ * test(ceremonyparams.test): correct constants for CeremonyParams test
236
+
237
+ * perf(processmessages.circom + contracts): optimize last batch padding, remove unused inputs
238
+
239
+ * docs(padlastbatch method): update doc comment
240
+
241
+ * docs(poll.ts): remove stale comments
242
+
243
+ * docs(test comments): fix typos
244
+
245
+ * ci(treedepths mock): modify interface for mocked function
246
+
247
+ * fix(ceremony params test): fix circuit inputs
248
+
249
+ * test(messagevalidator): fix function calls for messagevalidator circuit in tests
250
+
251
+ * chore(comments): fix unusefull comments
252
+
253
+ * refactor(poll.sol): replace external contracts with maci only
254
+
255
+ * perf(messageprocessor.sol): hardcode initialization for batchHashes array
256
+
257
+ * docs(comments): fix some more comments
258
+
259
+ * test(test for pr checks): correct some of tests for PR checks
260
+
261
+ * ci: 🎡 renamed old ProcessMessages_10-2-1-2_test
262
+
263
+ * ci: 🎡 correct rapidsnark/build/prover path
264
+
265
+ * style(reviews): solve some reviews for merging
266
+
267
+ * refactor(messageaqq): remove more message merging and message aqq
268
+
269
+ * style(messageaqq): remove more message merging and message aqq
270
+
271
+ * refactor(messageaqq): remove message aqq from subgraph
272
+
273
+ * test(coordinator): hide NOT_MERGED_MESSAGE_TREE error
274
+
275
+ * test(coordinator): fix test about message merging
276
+
277
+ * test(proveonchain): change chainHash calculation
278
+
279
+ * test(proveonchain): fix chainHashes declaration
280
+
281
+ * test(proveonchain): fix chainHash calculation
282
+
283
+ * test(proveonchain): fix chainHashes calculations
284
+
285
+ * test(proveonchain): fix chainHashes calculation
286
+
287
+ * test(proveonchain): fix loop limit
288
+
289
+ * style(review comments): resolve some of review comments
290
+
291
+ * style(review comments): resolve some of review comments
292
+
293
+ * test(lint:ts): fix e2e test because of lint:ts check
294
+
295
+ * docs(wrong changes): fix wrong changes about documentation that is not in our scope
296
+
297
+ * refactor(batchsizes): change batchSizes struct with messageBatchSize variable
298
+
299
+ * refactor(contracts): rollback to provide external contract references
300
+
301
+ * docs(messageprocessor.sol): fix typo
302
+
303
+ * refactor(messagebatchsize): chenge messageBatchSize location from Params.sol to Poll.sol
304
+
305
+ * refactor(maxmessages): remove maxMessages from maxValues
306
+
307
+ * refactor(sltimestemp): remove slTimestamp from circuits
308
+
309
+ * refactor(review comments): resolve more review comments
310
+
311
+ * fix(subgraph): fix bug about maxVoteOptions dunction call
312
+
313
+ * fix(sltimestamp): fix test for removing slTimestap signal
314
+
315
+ * refactor(promise.all): refactor promise.all for only one async call
316
+
317
+ * fix(subgraph): try to fix subgraph build
318
+
319
+ * revert(.nx folder): remove .nx folder from cli folder
320
+
321
+ * fix(merge): tmp-anon-poll-joining merge
322
+
323
+ * fix(merge): tmp-anon-poll-joining merge
324
+
325
+ * test(ceremonyparams): add poll joining in the test
326
+
327
+ * test(processmessages): add poll joining for the test
328
+
329
+ without key-change test
330
+
331
+ * test(polljoining): add poll joining in the test
332
+
333
+ * test(tallyvotes): add poll joining in the test
334
+
335
+ * test(core): add joinPoll function in tests
336
+
337
+ * style(typo): inclusion proof
338
+
339
+ * style(todo): remove finished todo
340
+
341
+ * style(merge): after merge style
342
+
343
+ * style(return): inline return
344
+
345
+ * style(eslint): remove unnecessary eslint-disable
346
+
347
+ * refactor(joiningcircuitargs): add interface IJoiningCircuitArgs
348
+
349
+ * refactor(joinpoll): async read state file
350
+
351
+ * style(genmacisignup): add function description
352
+
353
+ * refactor(gensignuptree): add IGenSignUpTreeArgs interface
354
+
355
+ * style(polljoining): remove extra inlcudes and comments
356
+
357
+ * feat(pollvkkeys): init
358
+
359
+ * feat(vkregistry): separate set functions (process/tally/poll)
360
+
361
+ * test(pollvkkey): adjust test to setPollVkKey
362
+
363
+ * refactor(vkregistry): use setVerifyingKeys in setVerifyingKeysBatch
364
+
365
+ * refactor(poll): add verifier and vkRegystry in constructor
366
+
367
+ * refactor(poll): put verifier and vkRegistry into extContracts
368
+
369
+ * test(core e2e): fix sanity checks test for incorrect signature
370
+
371
+ * refactor(test): removing only from tests
372
+
373
+ * refactor(macistatetree): use LeanIMT instead of QuinTree
374
+
375
+ * refactor(crypto): export hashLeanIMT from index
376
+
377
+ * feat(joinpoll): use genSignUpTree instead of genMaciStateFromContract
378
+
379
+ * feat(joinpoll cli): add optional parameters
380
+
381
+ * test(coordinator): add pollJoiningZkeyPath in app.test
382
+
383
+ * refactor(joinpoll): prettier
384
+
385
+ * test(coordinator): add joinPoll
386
+
387
+ * fix(poll): joiningCircuitInputs with correct siblings, indices and actualStateTreeDepth
388
+
389
+ * test(integration): add joinPoll
390
+
391
+ * build(coordinator): add COORDINATOR_POLL_ZKEY_NAME
392
+
393
+ * refactor(mergestate): remove Maci from MergeState
394
+
395
+ * test(e2e): test:e2e add joinPoll
396
+
397
+ * test(e2e): test:keyChange add joinPoll
398
+
399
+ * docs(complete documentation): complete documentation of the new workflow
400
+
401
+ * docs(documentation): add v3 docs, revert v2 docs
402
+
403
+ * style(docs): prettier
404
+
405
+ * refactor(joinpoll): add generateAndVerifyProof and getStateIndexAndCreditBalance
406
+
407
+ * docs(blogpost): blogpost cuvering the latest updates
408
+
409
+ * docs(blogpost): kudos to our team members!
410
+
411
+ * style(prettier): blog
412
+
413
+ * fix(joinpoll): index value of the user in the state tree leaves
414
+
415
+ * docs(blog): remove poll-joining
416
+
417
+
418
+
419
+
6
420
  ## [3.0.0](https://github.com/privacy-scaling-explorations/maci/compare/v2.5.0...v3.0.0) (2025-03-28)
7
421
 
8
422
 
package/README.md CHANGED
@@ -15,7 +15,7 @@ contracts in discrete components which are easy to test.
15
15
 
16
16
  To this end, this submodule exposes a `MaciState` class and a `Poll` class.
17
17
  Developers should instantiate objects from these classes to test MACI. For
18
- instance, [`MACI.test.ts`](https://github.com/privacy-scaling-explorations/maci/blob/dev/packages/contracts/tests/MACI.test.ts) creates a
18
+ instance, [`MACI.test.ts`](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/tests/MACI.test.ts) creates a
19
19
  `MaciState` object and every time it interacts with the MACI smart contract, it
20
20
  mirrors said interaction on the `MaciState` and `Poll`. As such, the developer
21
21
  can then use their helper functions like `maciState.signUp()`,
@@ -34,8 +34,8 @@ In testing, whenever a test suite submits a `signUp()` transaction, it should
34
34
  call `maciState.signUp()` as well, so that the off-chain representation of MACI
35
35
  is kept up to date.
36
36
 
37
- In production, `genMaciStateFromContract()` in
38
- [`genMaciState.ts`](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/ts/genMaciState.ts) uses this function when it
37
+ In production, `generateMaciStateFromContract()` in
38
+ [`generateMaciState.ts`](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/ts/generateMaciState.ts) uses this function when it
39
39
  scans a MACI contract's event log for signups, so as to bring its `MaciState`
40
40
  instance up to date.
41
41
 
@@ -1,8 +1,8 @@
1
- import { IncrementalQuinTree } from "@maci-protocol/crypto";
1
+ import { type IncrementalQuinTree } from "@maci-protocol/crypto";
2
2
  import { PublicKey, type Keypair } from "@maci-protocol/domainobjs";
3
3
  import type { IJsonMaciState, IMaciState, ITreeDepths } from "./utils/types";
4
4
  import { Poll } from "./Poll";
5
- import { EMode } from "./utils/constants";
5
+ import { type EMode } from "./utils/constants";
6
6
  /**
7
7
  * A representation of the MACI contract.
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MaciState.d.ts","sourceRoot":"","sources":["../../ts/MaciState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAU,MAAM,2BAA2B,CAAC;AAE5E,OAAO,KAAK,EAAE,cAAc,EAAa,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAoB,MAAM,mBAAmB,CAAC;AAE5D;;GAEG;AACH,qBAAa,SAAU,YAAW,UAAU;IAE1C,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAA2B;IAGnD,UAAU,EAAE,SAAS,EAAE,CAAM;IAG7B,cAAc,EAAE,MAAM,CAAC;IAGvB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAEhC,YAAY,SAAK;IAGjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC;;;OAGG;gBACS,cAAc,EAAE,MAAM;IAUlC;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM;IAOpC;;;;;;;;;OASG;IACH,UAAU,CACR,gBAAgB,EA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C7C,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,sBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QACzF,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACvD,SAAS,CAAC,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC7E,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAE3C,yDAAyD;QACzD,SAAS,CAAC,KAAK,GAAG,IAAI,GAAG,CACvB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAmB,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,WAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CACpG,CAAC;QAEF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAvKD,8BAuKC"}
@@ -1,9 +1,8 @@
1
1
  import { IncrementalQuinTree } from "@maci-protocol/crypto";
2
- import { VoteCommand, Keypair, Ballot, PublicKey, Message, StateLeaf } from "@maci-protocol/domainobjs";
2
+ import { VoteCommand, Keypair, Ballot, PublicKey, Message, StateLeaf, VoteCounts } from "@maci-protocol/domainobjs";
3
3
  import { LeanIMT } from "@zk-kit/lean-imt";
4
- import type { ITreeDepths, IBatchSizes, IPoll, IJsonPoll, IProcessMessagesOutput, IVoteTallyCircuitInputs, IProcessMessagesCircuitInputs, IPollJoiningCircuitInputs, IJoiningCircuitArgs } from "./index";
5
4
  import type { MaciState } from "./MaciState";
6
- import type { IGetVoiceCreditsLeft, IJoinedCircuitArgs, IPollJoinedCircuitInputs } from "./utils/types";
5
+ import type { ITreeDepths, IBatchSizes, IPoll, IJsonPoll, IProcessMessagesOutput, IVoteTallyCircuitInputs, IProcessMessagesCircuitInputs, IPollJoiningCircuitInputs, IJoiningCircuitArgs, IGetVoiceCreditsLeft, IJoinedCircuitArgs, IPollJoinedCircuitInputs } from "./utils/types";
7
6
  import { EMode } from "./utils/constants";
8
7
  /**
9
8
  * A representation of the Poll contract.
@@ -18,6 +17,8 @@ export declare class Poll implements IPoll {
18
17
  pollEndTimestamp: bigint;
19
18
  ballots: Ballot[];
20
19
  ballotTree?: IncrementalQuinTree;
20
+ voteCounts: VoteCounts[];
21
+ voteCountsTree?: IncrementalQuinTree;
21
22
  messages: Message[];
22
23
  commands: VoteCommand[];
23
24
  encryptionPublicKeys: PublicKey[];
@@ -37,7 +38,9 @@ export declare class Poll implements IPoll {
37
38
  numBatchesTallied: number;
38
39
  totalSpentVoiceCredits: bigint;
39
40
  emptyBallot: Ballot;
40
- emptyBallotHash?: bigint;
41
+ emptyBallotHash: bigint;
42
+ emptyVoteCounts: VoteCounts;
43
+ emptyVoteCountsHash: bigint;
41
44
  chainHash: bigint;
42
45
  batchHashes: bigint[];
43
46
  pollStateLeaves: StateLeaf[];
@@ -223,6 +226,6 @@ export declare class Poll implements IPoll {
223
226
  * Get the number of signups
224
227
  * @returns The number of signups
225
228
  */
226
- gettotalSignups: () => bigint;
229
+ getTotalSignups: () => bigint;
227
230
  }
228
231
  //# sourceMappingURL=Poll.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Poll.d.ts","sourceRoot":"","sources":["../../ts/Poll.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAYpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,SAAS,EAET,OAAO,EACP,SAAS,EAMV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAKhE,OAAO,KAAK,EAEV,WAAW,EACX,WAAW,EACX,KAAK,EACL,SAAS,EACT,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,yBAAyB,EACzB,mBAAmB,EACpB,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