@waku/rln 0.0.2-ce9a6ae.0 → 0.0.2-ebd7523.0

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 (63) hide show
  1. package/bundle/_virtual/utils.js +2 -2
  2. package/bundle/_virtual/utils2.js +2 -2
  3. package/bundle/index.js +1 -1
  4. package/bundle/packages/interfaces/dist/protocols.js +40 -45
  5. package/bundle/packages/rln/dist/contract/abi.js +648 -0
  6. package/bundle/packages/rln/dist/contract/constants.js +8 -13
  7. package/bundle/packages/rln/dist/contract/rln_contract.js +14 -3
  8. package/bundle/packages/rln/dist/identity.js +0 -46
  9. package/bundle/packages/rln/dist/rln.js +31 -15
  10. package/bundle/packages/rln/dist/zerokit.js +22 -16
  11. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/checksum.js +1 -1
  12. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +1 -1
  13. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
  14. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +2 -2
  15. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +2 -2
  16. package/bundle/packages/rln/node_modules/@noble/hashes/_sha2.js +1 -1
  17. package/bundle/packages/rln/node_modules/@noble/hashes/hmac.js +1 -1
  18. package/bundle/packages/rln/node_modules/@noble/hashes/pbkdf2.js +1 -1
  19. package/bundle/packages/rln/node_modules/@noble/hashes/scrypt.js +2 -2
  20. package/bundle/packages/rln/node_modules/@noble/hashes/sha256.js +2 -2
  21. package/bundle/packages/rln/node_modules/@noble/hashes/sha512.js +1 -1
  22. package/bundle/packages/rln/node_modules/@noble/hashes/utils.js +1 -1
  23. package/dist/.tsbuildinfo +1 -1
  24. package/dist/contract/{abi/rlnv2.d.ts → abi.d.ts} +22 -18
  25. package/dist/contract/abi.js +647 -0
  26. package/dist/contract/abi.js.map +1 -0
  27. package/dist/contract/constants.d.ts +22 -23
  28. package/dist/contract/constants.js +7 -12
  29. package/dist/contract/constants.js.map +1 -1
  30. package/dist/contract/rln_contract.d.ts +8 -0
  31. package/dist/contract/rln_contract.js +14 -3
  32. package/dist/contract/rln_contract.js.map +1 -1
  33. package/dist/identity.d.ts +0 -7
  34. package/dist/identity.js +0 -46
  35. package/dist/identity.js.map +1 -1
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.js +2 -2
  38. package/dist/index.js.map +1 -1
  39. package/dist/rln.js +31 -14
  40. package/dist/rln.js.map +1 -1
  41. package/dist/zerokit.d.ts +5 -1
  42. package/dist/zerokit.js +22 -16
  43. package/dist/zerokit.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/contract/abi.ts +646 -0
  46. package/src/contract/constants.ts +8 -14
  47. package/src/contract/rln_contract.ts +16 -3
  48. package/src/identity.ts +0 -70
  49. package/src/index.ts +2 -2
  50. package/src/rln.ts +45 -14
  51. package/src/zerokit.ts +45 -16
  52. package/bundle/node_modules/@iden3/js-crypto/dist/browser/esm/index.js +0 -7
  53. package/bundle/node_modules/@stablelib/binary/lib/binary.js +0 -22
  54. package/bundle/node_modules/@stablelib/chacha/lib/chacha.js +0 -245
  55. package/bundle/node_modules/@stablelib/wipe/lib/wipe.js +0 -26
  56. package/bundle/packages/rln/dist/contract/abi/rlnv2.js +0 -394
  57. package/dist/__tests__/identity.test.d.ts +0 -1
  58. package/dist/__tests__/identity.test.js +0 -40
  59. package/dist/__tests__/identity.test.js.map +0 -1
  60. package/dist/contract/abi/rlnv2.js +0 -393
  61. package/dist/contract/abi/rlnv2.js.map +0 -1
  62. package/src/__tests__/identity.test.ts +0 -50
  63. package/src/contract/abi/rlnv2.ts +0 -392
@@ -1,392 +0,0 @@
1
- export const RLN_V2_ABI = [
2
- {
3
- type: "constructor",
4
- inputs: [],
5
- stateMutability: "nonpayable"
6
- },
7
- {
8
- type: "error",
9
- name: "DuplicateIdCommitment",
10
- inputs: []
11
- },
12
- {
13
- type: "error",
14
- name: "InvalidIdCommitment",
15
- inputs: [
16
- {
17
- name: "idCommitment",
18
- type: "uint256"
19
- }
20
- ]
21
- },
22
- {
23
- type: "error",
24
- name: "InvalidPaginationQuery",
25
- inputs: [
26
- {
27
- name: "startIndex",
28
- type: "uint256"
29
- },
30
- {
31
- name: "endIndex",
32
- type: "uint256"
33
- }
34
- ]
35
- },
36
- {
37
- type: "function",
38
- name: "MAX_MEMBERSHIP_SET_SIZE",
39
- inputs: [],
40
- outputs: [
41
- {
42
- name: "",
43
- type: "uint32"
44
- }
45
- ],
46
- stateMutability: "view"
47
- },
48
- {
49
- type: "function",
50
- name: "MERKLE_TREE_DEPTH",
51
- inputs: [],
52
- outputs: [
53
- {
54
- name: "",
55
- type: "uint8"
56
- }
57
- ],
58
- stateMutability: "view"
59
- },
60
- {
61
- type: "function",
62
- name: "Q",
63
- inputs: [],
64
- outputs: [
65
- {
66
- name: "",
67
- type: "uint256"
68
- }
69
- ],
70
- stateMutability: "view"
71
- },
72
- {
73
- type: "function",
74
- name: "activeDurationForNewMemberships",
75
- inputs: [],
76
- outputs: [
77
- {
78
- name: "",
79
- type: "uint32"
80
- }
81
- ],
82
- stateMutability: "view"
83
- },
84
- {
85
- type: "function",
86
- name: "currentTotalRateLimit",
87
- inputs: [],
88
- outputs: [
89
- {
90
- name: "",
91
- type: "uint256"
92
- }
93
- ],
94
- stateMutability: "view"
95
- },
96
- {
97
- type: "function",
98
- name: "deployedBlockNumber",
99
- inputs: [],
100
- outputs: [
101
- {
102
- name: "",
103
- type: "uint32"
104
- }
105
- ],
106
- stateMutability: "view"
107
- },
108
- {
109
- type: "function",
110
- name: "depositsToWithdraw",
111
- inputs: [
112
- {
113
- name: "holder",
114
- type: "address"
115
- },
116
- {
117
- name: "token",
118
- type: "address"
119
- }
120
- ],
121
- outputs: [
122
- {
123
- name: "balance",
124
- type: "uint256"
125
- }
126
- ],
127
- stateMutability: "view"
128
- },
129
- {
130
- type: "function",
131
- name: "eraseMemberships",
132
- inputs: [
133
- {
134
- name: "idCommitments",
135
- type: "uint256[]"
136
- }
137
- ],
138
- outputs: [],
139
- stateMutability: "nonpayable"
140
- },
141
- {
142
- type: "function",
143
- name: "eraseMemberships",
144
- inputs: [
145
- {
146
- name: "idCommitments",
147
- type: "uint256[]"
148
- },
149
- {
150
- name: "eraseFromMembershipSet",
151
- type: "bool"
152
- }
153
- ],
154
- outputs: [],
155
- stateMutability: "nonpayable"
156
- },
157
- {
158
- type: "function",
159
- name: "extendMemberships",
160
- inputs: [
161
- {
162
- name: "idCommitments",
163
- type: "uint256[]"
164
- }
165
- ],
166
- outputs: [],
167
- stateMutability: "nonpayable"
168
- },
169
- {
170
- type: "function",
171
- name: "getMembershipInfo",
172
- inputs: [
173
- {
174
- name: "idCommitment",
175
- type: "uint256"
176
- }
177
- ],
178
- outputs: [
179
- {
180
- name: "",
181
- type: "uint32"
182
- },
183
- {
184
- name: "",
185
- type: "uint32"
186
- },
187
- {
188
- name: "",
189
- type: "uint256"
190
- }
191
- ],
192
- stateMutability: "view"
193
- },
194
- {
195
- type: "function",
196
- name: "getMerkleProof",
197
- inputs: [
198
- {
199
- name: "index",
200
- type: "uint40"
201
- }
202
- ],
203
- outputs: [
204
- {
205
- name: "",
206
- type: "uint256[20]"
207
- }
208
- ],
209
- stateMutability: "view"
210
- },
211
- {
212
- type: "function",
213
- name: "getRateCommitmentsInRangeBoundsInclusive",
214
- inputs: [
215
- {
216
- name: "startIndex",
217
- type: "uint32"
218
- },
219
- {
220
- name: "endIndex",
221
- type: "uint32"
222
- }
223
- ],
224
- outputs: [
225
- {
226
- name: "",
227
- type: "uint256[]"
228
- }
229
- ],
230
- stateMutability: "view"
231
- },
232
- {
233
- type: "function",
234
- name: "gracePeriodDurationForNewMemberships",
235
- inputs: [],
236
- outputs: [
237
- {
238
- name: "",
239
- type: "uint32"
240
- }
241
- ],
242
- stateMutability: "view"
243
- },
244
- {
245
- type: "function",
246
- name: "initialize",
247
- inputs: [
248
- {
249
- name: "_priceCalculator",
250
- type: "address"
251
- },
252
- {
253
- name: "_maxTotalRateLimit",
254
- type: "uint32"
255
- },
256
- {
257
- name: "_minMembershipRateLimit",
258
- type: "uint32"
259
- },
260
- {
261
- name: "_maxMembershipRateLimit",
262
- type: "uint32"
263
- },
264
- {
265
- name: "_activeDuration",
266
- type: "uint32"
267
- },
268
- {
269
- name: "_gracePeriod",
270
- type: "uint32"
271
- }
272
- ],
273
- outputs: [],
274
- stateMutability: "nonpayable"
275
- },
276
- {
277
- type: "function",
278
- name: "isExpired",
279
- inputs: [
280
- {
281
- name: "_idCommitment",
282
- type: "uint256"
283
- }
284
- ],
285
- outputs: [
286
- {
287
- name: "",
288
- type: "bool"
289
- }
290
- ],
291
- stateMutability: "view"
292
- },
293
- {
294
- type: "function",
295
- name: "register",
296
- inputs: [
297
- {
298
- name: "idCommitment",
299
- type: "uint256"
300
- },
301
- {
302
- name: "rateLimit",
303
- type: "uint32"
304
- },
305
- {
306
- name: "idCommitmentsToErase",
307
- type: "uint256[]"
308
- }
309
- ],
310
- outputs: [],
311
- stateMutability: "nonpayable"
312
- },
313
- {
314
- type: "function",
315
- name: "registerWithPermit",
316
- inputs: [
317
- {
318
- name: "owner",
319
- type: "address"
320
- },
321
- {
322
- name: "deadline",
323
- type: "uint256"
324
- },
325
- {
326
- name: "v",
327
- type: "uint8"
328
- },
329
- {
330
- name: "r",
331
- type: "bytes32"
332
- },
333
- {
334
- name: "s",
335
- type: "bytes32"
336
- },
337
- {
338
- name: "idCommitment",
339
- type: "uint256"
340
- },
341
- {
342
- name: "rateLimit",
343
- type: "uint32"
344
- },
345
- {
346
- name: "idCommitmentsToErase",
347
- type: "uint256[]"
348
- }
349
- ],
350
- outputs: [],
351
- stateMutability: "nonpayable"
352
- },
353
- {
354
- type: "event",
355
- name: "MembershipRegistered",
356
- inputs: [
357
- {
358
- name: "idCommitment",
359
- type: "uint256",
360
- indexed: false
361
- },
362
- {
363
- name: "rateLimit",
364
- type: "uint32",
365
- indexed: false
366
- },
367
- {
368
- name: "index",
369
- type: "uint256",
370
- indexed: false
371
- }
372
- ],
373
- anonymous: false
374
- },
375
- {
376
- type: "event",
377
- name: "MembershipRemoved",
378
- inputs: [
379
- {
380
- name: "idCommitment",
381
- type: "uint256",
382
- indexed: false
383
- },
384
- {
385
- name: "index",
386
- type: "uint256",
387
- indexed: false
388
- }
389
- ],
390
- anonymous: false
391
- }
392
- ];