@waku/rln 0.1.4-d27db21.0 → 0.1.5-053bb95.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 (138) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +5 -0
  3. package/bundle/_virtual/utils.js +2 -2
  4. package/bundle/_virtual/utils2.js +2 -2
  5. package/bundle/index.js +3 -1
  6. package/bundle/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js +1 -1
  7. package/bundle/node_modules/@ethersproject/abi/lib.esm/interface.js +1 -1
  8. package/bundle/node_modules/@ethersproject/abstract-provider/lib.esm/index.js +1 -1
  9. package/bundle/node_modules/@ethersproject/abstract-signer/lib.esm/index.js +11 -11
  10. package/bundle/node_modules/@ethersproject/bytes/lib.esm/_version.js +1 -1
  11. package/bundle/node_modules/@ethersproject/contracts/lib.esm/index.js +7 -7
  12. package/bundle/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js +2 -2
  13. package/bundle/node_modules/@ethersproject/hash/lib.esm/typed-data.js +2 -2
  14. package/bundle/node_modules/@ethersproject/keccak256/node_modules/js-sha3/src/sha3.js +1 -1
  15. package/bundle/node_modules/@ethersproject/logger/lib.esm/_version.js +1 -1
  16. package/bundle/node_modules/@ethersproject/properties/lib.esm/index.js +1 -1
  17. package/bundle/node_modules/@ethersproject/providers/lib.esm/base-provider.js +44 -44
  18. package/bundle/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js +8 -8
  19. package/bundle/node_modules/@ethersproject/rlp/lib.esm/_version.js +1 -1
  20. package/bundle/node_modules/@ethersproject/transactions/lib.esm/index.js +1 -1
  21. package/bundle/node_modules/@ethersproject/web/lib.esm/geturl.js +1 -1
  22. package/bundle/node_modules/@ethersproject/web/lib.esm/index.js +2 -2
  23. package/bundle/node_modules/@multiformats/multiaddr/dist/src/multiaddr.js +1 -0
  24. package/bundle/node_modules/@noble/hashes/esm/sha3.js +1 -1
  25. package/bundle/node_modules/bn.js/lib/bn.js +1 -1
  26. package/bundle/packages/core/dist/lib/connection_manager/connection_manager.js +6 -6
  27. package/bundle/packages/rln/dist/contract/abi.js +502 -248
  28. package/bundle/packages/rln/dist/contract/constants.js +5 -9
  29. package/bundle/packages/rln/dist/contract/errors.js +62 -0
  30. package/bundle/packages/rln/dist/contract/rln_base_contract.js +347 -0
  31. package/bundle/packages/rln/dist/contract/rln_contract.js +81 -392
  32. package/bundle/packages/rln/dist/contract/types.js +9 -0
  33. package/bundle/packages/rln/dist/create.js +1 -1
  34. package/bundle/packages/rln/dist/credentials_manager.js +215 -0
  35. package/bundle/packages/rln/dist/identity.js +8 -0
  36. package/bundle/packages/rln/dist/keystore/keystore.js +20 -28
  37. package/bundle/packages/rln/dist/rln.js +56 -166
  38. package/bundle/packages/rln/dist/zerokit.js +5 -5
  39. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/checksum.js +2 -2
  40. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/cipher.js +3 -3
  41. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/class.js +4 -4
  42. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/functional.js +4 -4
  43. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/kdf.js +4 -4
  44. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/password.js +1 -1
  45. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/schema-validation-generated.js +1 -1
  46. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/schema-validation.js +1 -1
  47. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/aes.js +1 -1
  48. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +1 -1
  49. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +2 -2
  50. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/scrypt.js +1 -1
  51. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +1 -1
  52. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +3 -3
  53. package/bundle/packages/rln/node_modules/@noble/hashes/_assert.js +1 -1
  54. package/bundle/packages/rln/node_modules/@noble/hashes/_sha2.js +2 -2
  55. package/bundle/packages/rln/node_modules/@noble/hashes/_u64.js +1 -1
  56. package/bundle/packages/rln/node_modules/@noble/hashes/cryptoBrowser.js +1 -1
  57. package/bundle/packages/rln/node_modules/@noble/hashes/esm/_assert.js +43 -0
  58. package/bundle/packages/rln/node_modules/@noble/hashes/esm/_sha2.js +116 -0
  59. package/bundle/packages/rln/node_modules/@noble/hashes/esm/hmac.js +79 -0
  60. package/bundle/packages/rln/node_modules/@noble/hashes/esm/sha256.js +126 -0
  61. package/bundle/packages/rln/node_modules/@noble/hashes/esm/utils.js +43 -0
  62. package/bundle/packages/rln/node_modules/@noble/hashes/hmac.js +2 -2
  63. package/bundle/packages/rln/node_modules/@noble/hashes/pbkdf2.js +2 -2
  64. package/bundle/packages/rln/node_modules/@noble/hashes/scrypt.js +3 -3
  65. package/bundle/packages/rln/node_modules/@noble/hashes/sha256.js +2 -2
  66. package/bundle/packages/rln/node_modules/@noble/hashes/sha512.js +3 -3
  67. package/bundle/packages/rln/node_modules/@noble/hashes/utils.js +2 -2
  68. package/dist/.tsbuildinfo +1 -1
  69. package/dist/codec.test-utils.d.ts +36 -0
  70. package/dist/codec.test-utils.js +56 -0
  71. package/dist/codec.test-utils.js.map +1 -0
  72. package/dist/contract/abi.d.ts +21 -17
  73. package/dist/contract/abi.js +502 -248
  74. package/dist/contract/abi.js.map +1 -1
  75. package/dist/contract/constants.d.ts +23 -19
  76. package/dist/contract/constants.js +3 -3
  77. package/dist/contract/constants.js.map +1 -1
  78. package/dist/contract/errors.d.ts +30 -0
  79. package/dist/contract/errors.js +61 -0
  80. package/dist/contract/errors.js.map +1 -0
  81. package/dist/contract/rln_base_contract.d.ts +88 -0
  82. package/dist/contract/rln_base_contract.js +330 -0
  83. package/dist/contract/rln_base_contract.js.map +1 -0
  84. package/dist/contract/rln_contract.d.ts +19 -109
  85. package/dist/contract/rln_contract.js +80 -390
  86. package/dist/contract/rln_contract.js.map +1 -1
  87. package/dist/contract/test-setup.d.ts +26 -0
  88. package/dist/contract/test-setup.js +56 -0
  89. package/dist/contract/test-setup.js.map +1 -0
  90. package/dist/contract/test-utils.d.ts +39 -0
  91. package/dist/contract/test-utils.js +118 -0
  92. package/dist/contract/test-utils.js.map +1 -0
  93. package/dist/contract/types.d.ts +40 -0
  94. package/dist/contract/types.js +8 -0
  95. package/dist/contract/types.js.map +1 -0
  96. package/dist/create.js +1 -1
  97. package/dist/create.js.map +1 -1
  98. package/dist/credentials_manager.d.ts +44 -0
  99. package/dist/credentials_manager.js +197 -0
  100. package/dist/credentials_manager.js.map +1 -0
  101. package/dist/identity.d.ts +1 -0
  102. package/dist/identity.js +8 -0
  103. package/dist/identity.js.map +1 -1
  104. package/dist/index.d.ts +5 -2
  105. package/dist/index.js +4 -2
  106. package/dist/index.js.map +1 -1
  107. package/dist/keystore/keystore.d.ts +0 -1
  108. package/dist/keystore/keystore.js +20 -28
  109. package/dist/keystore/keystore.js.map +1 -1
  110. package/dist/keystore/types.d.ts +2 -1
  111. package/dist/rln.d.ts +9 -52
  112. package/dist/rln.js +54 -163
  113. package/dist/rln.js.map +1 -1
  114. package/dist/types.d.ts +27 -0
  115. package/dist/types.js +2 -0
  116. package/dist/types.js.map +1 -0
  117. package/dist/zerokit.d.ts +3 -3
  118. package/dist/zerokit.js +5 -5
  119. package/dist/zerokit.js.map +1 -1
  120. package/package.json +1 -1
  121. package/src/codec.test-utils.ts +80 -0
  122. package/src/contract/abi.ts +502 -248
  123. package/src/contract/constants.ts +3 -3
  124. package/src/contract/errors.ts +75 -0
  125. package/src/contract/rln_base_contract.ts +500 -0
  126. package/src/contract/rln_contract.ts +102 -619
  127. package/src/contract/test-setup.ts +86 -0
  128. package/src/contract/test-utils.ts +179 -0
  129. package/src/contract/types.ts +48 -0
  130. package/src/create.ts +1 -1
  131. package/src/credentials_manager.ts +282 -0
  132. package/src/identity.ts +9 -0
  133. package/src/index.ts +17 -2
  134. package/src/keystore/keystore.ts +32 -46
  135. package/src/keystore/types.ts +2 -1
  136. package/src/rln.ts +67 -258
  137. package/src/types.ts +31 -0
  138. package/src/zerokit.ts +3 -3
@@ -1,393 +1,647 @@
1
1
  export const RLN_ABI = [
2
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
2
3
  {
3
- type: "constructor",
4
- inputs: [],
5
- stateMutability: "nonpayable"
4
+ inputs: [
5
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
6
+ ],
7
+ name: "CannotEraseActiveMembership",
8
+ type: "error"
6
9
  },
10
+ { inputs: [], name: "CannotExceedMaxTotalRateLimit", type: "error" },
7
11
  {
8
- type: "error",
9
- name: "DuplicateIdCommitment",
10
- inputs: []
12
+ inputs: [
13
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
14
+ ],
15
+ name: "CannotExtendNonGracePeriodMembership",
16
+ type: "error"
11
17
  },
12
18
  {
13
- type: "error",
14
- name: "InvalidIdCommitment",
15
19
  inputs: [
16
- {
17
- name: "idCommitment",
18
- type: "uint256"
19
- }
20
- ]
20
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
21
+ ],
22
+ name: "InvalidIdCommitment",
23
+ type: "error"
21
24
  },
25
+ { inputs: [], name: "InvalidMembershipRateLimit", type: "error" },
22
26
  {
23
- type: "error",
27
+ inputs: [
28
+ { internalType: "uint256", name: "startIndex", type: "uint256" },
29
+ { internalType: "uint256", name: "endIndex", type: "uint256" }
30
+ ],
24
31
  name: "InvalidPaginationQuery",
32
+ type: "error"
33
+ },
34
+ {
35
+ inputs: [
36
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
37
+ ],
38
+ name: "MembershipDoesNotExist",
39
+ type: "error"
40
+ },
41
+ {
42
+ inputs: [
43
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
44
+ ],
45
+ name: "NonHolderCannotEraseGracePeriodMembership",
46
+ type: "error"
47
+ },
48
+ {
49
+ inputs: [
50
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
51
+ ],
52
+ name: "NonHolderCannotExtend",
53
+ type: "error"
54
+ },
55
+ {
56
+ anonymous: false,
25
57
  inputs: [
26
58
  {
27
- name: "startIndex",
28
- type: "uint256"
59
+ indexed: false,
60
+ internalType: "address",
61
+ name: "previousAdmin",
62
+ type: "address"
29
63
  },
30
64
  {
31
- name: "endIndex",
32
- type: "uint256"
65
+ indexed: false,
66
+ internalType: "address",
67
+ name: "newAdmin",
68
+ type: "address"
33
69
  }
34
- ]
70
+ ],
71
+ name: "AdminChanged",
72
+ type: "event"
35
73
  },
36
74
  {
37
- type: "function",
38
- name: "MAX_MEMBERSHIP_SET_SIZE",
39
- inputs: [],
40
- outputs: [
75
+ anonymous: false,
76
+ inputs: [
41
77
  {
42
- name: "",
43
- type: "uint32"
78
+ indexed: true,
79
+ internalType: "address",
80
+ name: "beacon",
81
+ type: "address"
44
82
  }
45
83
  ],
46
- stateMutability: "view"
84
+ name: "BeaconUpgraded",
85
+ type: "event"
47
86
  },
48
87
  {
49
- type: "function",
50
- name: "MERKLE_TREE_DEPTH",
51
- inputs: [],
52
- outputs: [
53
- {
54
- name: "",
55
- type: "uint8"
56
- }
88
+ anonymous: false,
89
+ inputs: [
90
+ { indexed: false, internalType: "uint8", name: "version", type: "uint8" }
57
91
  ],
58
- stateMutability: "view"
92
+ name: "Initialized",
93
+ type: "event"
59
94
  },
60
95
  {
61
- type: "function",
62
- name: "Q",
63
- inputs: [],
64
- outputs: [
96
+ anonymous: false,
97
+ inputs: [
65
98
  {
66
- name: "",
99
+ indexed: false,
100
+ internalType: "uint256",
101
+ name: "idCommitment",
67
102
  type: "uint256"
68
- }
103
+ },
104
+ {
105
+ indexed: false,
106
+ internalType: "uint32",
107
+ name: "membershipRateLimit",
108
+ type: "uint32"
109
+ },
110
+ { indexed: false, internalType: "uint32", name: "index", type: "uint32" }
69
111
  ],
70
- stateMutability: "view"
112
+ name: "MembershipErased",
113
+ type: "event"
71
114
  },
72
115
  {
73
- type: "function",
74
- name: "activeDurationForNewMemberships",
75
- inputs: [],
76
- outputs: [
116
+ anonymous: false,
117
+ inputs: [
77
118
  {
78
- name: "",
119
+ indexed: false,
120
+ internalType: "uint256",
121
+ name: "idCommitment",
122
+ type: "uint256"
123
+ },
124
+ {
125
+ indexed: false,
126
+ internalType: "uint32",
127
+ name: "membershipRateLimit",
79
128
  type: "uint32"
80
- }
129
+ },
130
+ { indexed: false, internalType: "uint32", name: "index", type: "uint32" }
81
131
  ],
82
- stateMutability: "view"
132
+ name: "MembershipExpired",
133
+ type: "event"
83
134
  },
84
135
  {
85
- type: "function",
86
- name: "currentTotalRateLimit",
87
- inputs: [],
88
- outputs: [
136
+ anonymous: false,
137
+ inputs: [
138
+ {
139
+ indexed: false,
140
+ internalType: "uint256",
141
+ name: "idCommitment",
142
+ type: "uint256"
143
+ },
144
+ {
145
+ indexed: false,
146
+ internalType: "uint32",
147
+ name: "membershipRateLimit",
148
+ type: "uint32"
149
+ },
150
+ { indexed: false, internalType: "uint32", name: "index", type: "uint32" },
89
151
  {
90
- name: "",
152
+ indexed: false,
153
+ internalType: "uint256",
154
+ name: "newGracePeriodStartTimestamp",
91
155
  type: "uint256"
92
156
  }
93
157
  ],
94
- stateMutability: "view"
158
+ name: "MembershipExtended",
159
+ type: "event"
95
160
  },
96
161
  {
97
- type: "function",
98
- name: "deployedBlockNumber",
99
- inputs: [],
100
- outputs: [
162
+ anonymous: false,
163
+ inputs: [
101
164
  {
102
- name: "",
103
- type: "uint32"
104
- }
165
+ indexed: false,
166
+ internalType: "uint256",
167
+ name: "idCommitment",
168
+ type: "uint256"
169
+ },
170
+ {
171
+ indexed: false,
172
+ internalType: "uint256",
173
+ name: "membershipRateLimit",
174
+ type: "uint256"
175
+ },
176
+ { indexed: false, internalType: "uint32", name: "index", type: "uint32" }
105
177
  ],
106
- stateMutability: "view"
178
+ name: "MembershipRegistered",
179
+ type: "event"
107
180
  },
108
181
  {
109
- type: "function",
110
- name: "depositsToWithdraw",
182
+ anonymous: false,
111
183
  inputs: [
112
184
  {
113
- name: "holder",
185
+ indexed: true,
186
+ internalType: "address",
187
+ name: "previousOwner",
114
188
  type: "address"
115
189
  },
116
190
  {
117
- name: "token",
191
+ indexed: true,
192
+ internalType: "address",
193
+ name: "newOwner",
118
194
  type: "address"
119
195
  }
120
196
  ],
121
- outputs: [
197
+ name: "OwnershipTransferred",
198
+ type: "event"
199
+ },
200
+ {
201
+ anonymous: false,
202
+ inputs: [
122
203
  {
123
- name: "balance",
124
- type: "uint256"
204
+ indexed: true,
205
+ internalType: "address",
206
+ name: "implementation",
207
+ type: "address"
125
208
  }
126
209
  ],
127
- stateMutability: "view"
210
+ name: "Upgraded",
211
+ type: "event"
212
+ },
213
+ {
214
+ inputs: [],
215
+ name: "MAX_MEMBERSHIP_SET_SIZE",
216
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
217
+ stateMutability: "view",
218
+ type: "function"
219
+ },
220
+ {
221
+ inputs: [],
222
+ name: "MERKLE_TREE_DEPTH",
223
+ outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
224
+ stateMutability: "view",
225
+ type: "function"
226
+ },
227
+ {
228
+ inputs: [],
229
+ name: "Q",
230
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
231
+ stateMutability: "view",
232
+ type: "function"
233
+ },
234
+ {
235
+ inputs: [],
236
+ name: "activeDurationForNewMemberships",
237
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
238
+ stateMutability: "view",
239
+ type: "function"
240
+ },
241
+ {
242
+ inputs: [],
243
+ name: "currentTotalRateLimit",
244
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
245
+ stateMutability: "view",
246
+ type: "function"
247
+ },
248
+ {
249
+ inputs: [],
250
+ name: "deployedBlockNumber",
251
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
252
+ stateMutability: "view",
253
+ type: "function"
128
254
  },
129
255
  {
130
- type: "function",
131
- name: "eraseMemberships",
132
256
  inputs: [
133
- {
134
- name: "idCommitments",
135
- type: "uint256[]"
136
- }
257
+ { internalType: "address", name: "holder", type: "address" },
258
+ { internalType: "address", name: "token", type: "address" }
137
259
  ],
138
- outputs: [],
139
- stateMutability: "nonpayable"
260
+ name: "depositsToWithdraw",
261
+ outputs: [{ internalType: "uint256", name: "balance", type: "uint256" }],
262
+ stateMutability: "view",
263
+ type: "function"
140
264
  },
141
265
  {
142
- type: "function",
266
+ inputs: [
267
+ { internalType: "uint256[]", name: "idCommitments", type: "uint256[]" }
268
+ ],
143
269
  name: "eraseMemberships",
270
+ outputs: [],
271
+ stateMutability: "nonpayable",
272
+ type: "function"
273
+ },
274
+ {
144
275
  inputs: [
145
- {
146
- name: "idCommitments",
147
- type: "uint256[]"
148
- },
149
- {
150
- name: "eraseFromMembershipSet",
151
- type: "bool"
152
- }
276
+ { internalType: "uint256[]", name: "idCommitments", type: "uint256[]" },
277
+ { internalType: "bool", name: "eraseFromMembershipSet", type: "bool" }
153
278
  ],
279
+ name: "eraseMemberships",
154
280
  outputs: [],
155
- stateMutability: "nonpayable"
281
+ stateMutability: "nonpayable",
282
+ type: "function"
156
283
  },
157
284
  {
158
- type: "function",
159
- name: "extendMemberships",
160
285
  inputs: [
161
- {
162
- name: "idCommitments",
163
- type: "uint256[]"
164
- }
286
+ { internalType: "uint256[]", name: "idCommitments", type: "uint256[]" }
165
287
  ],
288
+ name: "extendMemberships",
166
289
  outputs: [],
167
- stateMutability: "nonpayable"
290
+ stateMutability: "nonpayable",
291
+ type: "function"
168
292
  },
169
293
  {
170
- type: "function",
171
- name: "getMembershipInfo",
172
294
  inputs: [
173
- {
174
- name: "idCommitment",
175
- type: "uint256"
176
- }
295
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
177
296
  ],
297
+ name: "getMembershipInfo",
178
298
  outputs: [
299
+ { internalType: "uint32", name: "", type: "uint32" },
300
+ { internalType: "uint32", name: "", type: "uint32" },
301
+ { internalType: "uint256", name: "", type: "uint256" }
302
+ ],
303
+ stateMutability: "view",
304
+ type: "function"
305
+ },
306
+ {
307
+ inputs: [{ internalType: "uint40", name: "index", type: "uint40" }],
308
+ name: "getMerkleProof",
309
+ outputs: [{ internalType: "uint256[20]", name: "", type: "uint256[20]" }],
310
+ stateMutability: "view",
311
+ type: "function"
312
+ },
313
+ {
314
+ inputs: [
315
+ { internalType: "uint32", name: "startIndex", type: "uint32" },
316
+ { internalType: "uint32", name: "endIndex", type: "uint32" }
317
+ ],
318
+ name: "getRateCommitmentsInRangeBoundsInclusive",
319
+ outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
320
+ stateMutability: "view",
321
+ type: "function"
322
+ },
323
+ {
324
+ inputs: [],
325
+ name: "gracePeriodDurationForNewMemberships",
326
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
327
+ stateMutability: "view",
328
+ type: "function"
329
+ },
330
+ {
331
+ inputs: [{ internalType: "uint256", name: "", type: "uint256" }],
332
+ name: "indicesOfLazilyErasedMemberships",
333
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
334
+ stateMutability: "view",
335
+ type: "function"
336
+ },
337
+ {
338
+ inputs: [
339
+ { internalType: "address", name: "_priceCalculator", type: "address" },
340
+ { internalType: "uint32", name: "_maxTotalRateLimit", type: "uint32" },
179
341
  {
180
- name: "",
342
+ internalType: "uint32",
343
+ name: "_minMembershipRateLimit",
181
344
  type: "uint32"
182
345
  },
183
346
  {
184
- name: "",
347
+ internalType: "uint32",
348
+ name: "_maxMembershipRateLimit",
185
349
  type: "uint32"
186
350
  },
187
- {
188
- name: "",
189
- type: "uint256"
190
- }
351
+ { internalType: "uint32", name: "_activeDuration", type: "uint32" },
352
+ { internalType: "uint32", name: "_gracePeriod", type: "uint32" }
191
353
  ],
192
- stateMutability: "view"
354
+ name: "initialize",
355
+ outputs: [],
356
+ stateMutability: "nonpayable",
357
+ type: "function"
193
358
  },
194
359
  {
195
- type: "function",
196
- name: "getMerkleProof",
197
360
  inputs: [
198
- {
199
- name: "index",
200
- type: "uint40"
201
- }
361
+ { internalType: "uint256", name: "_idCommitment", type: "uint256" }
202
362
  ],
203
- outputs: [
204
- {
205
- name: "",
206
- type: "uint256[20]"
207
- }
363
+ name: "isExpired",
364
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
365
+ stateMutability: "view",
366
+ type: "function"
367
+ },
368
+ {
369
+ inputs: [
370
+ { internalType: "uint256", name: "_idCommitment", type: "uint256" }
208
371
  ],
209
- stateMutability: "view"
372
+ name: "isInGracePeriod",
373
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
374
+ stateMutability: "view",
375
+ type: "function"
376
+ },
377
+ {
378
+ inputs: [
379
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
380
+ ],
381
+ name: "isInMembershipSet",
382
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
383
+ stateMutability: "view",
384
+ type: "function"
210
385
  },
211
386
  {
212
- type: "function",
213
- name: "getRateCommitmentsInRangeBoundsInclusive",
214
387
  inputs: [
388
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
389
+ ],
390
+ name: "isValidIdCommitment",
391
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
392
+ stateMutability: "pure",
393
+ type: "function"
394
+ },
395
+ {
396
+ inputs: [{ internalType: "uint32", name: "rateLimit", type: "uint32" }],
397
+ name: "isValidMembershipRateLimit",
398
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
399
+ stateMutability: "view",
400
+ type: "function"
401
+ },
402
+ {
403
+ inputs: [],
404
+ name: "maxMembershipRateLimit",
405
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
406
+ stateMutability: "view",
407
+ type: "function"
408
+ },
409
+ {
410
+ inputs: [],
411
+ name: "maxTotalRateLimit",
412
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
413
+ stateMutability: "view",
414
+ type: "function"
415
+ },
416
+ {
417
+ inputs: [
418
+ { internalType: "uint256", name: "_idCommitment", type: "uint256" }
419
+ ],
420
+ name: "membershipExpirationTimestamp",
421
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
422
+ stateMutability: "view",
423
+ type: "function"
424
+ },
425
+ {
426
+ inputs: [
427
+ { internalType: "uint256", name: "idCommitment", type: "uint256" }
428
+ ],
429
+ name: "memberships",
430
+ outputs: [
431
+ { internalType: "uint256", name: "depositAmount", type: "uint256" },
432
+ { internalType: "uint32", name: "activeDuration", type: "uint32" },
215
433
  {
216
- name: "startIndex",
217
- type: "uint32"
434
+ internalType: "uint256",
435
+ name: "gracePeriodStartTimestamp",
436
+ type: "uint256"
218
437
  },
219
- {
220
- name: "endIndex",
221
- type: "uint32"
222
- }
438
+ { internalType: "uint32", name: "gracePeriodDuration", type: "uint32" },
439
+ { internalType: "uint32", name: "rateLimit", type: "uint32" },
440
+ { internalType: "uint32", name: "index", type: "uint32" },
441
+ { internalType: "address", name: "holder", type: "address" },
442
+ { internalType: "address", name: "token", type: "address" }
223
443
  ],
444
+ stateMutability: "view",
445
+ type: "function"
446
+ },
447
+ {
448
+ inputs: [],
449
+ name: "merkleTree",
224
450
  outputs: [
225
- {
226
- name: "",
227
- type: "uint256[]"
228
- }
451
+ { internalType: "uint40", name: "maxIndex", type: "uint40" },
452
+ { internalType: "uint40", name: "numberOfLeaves", type: "uint40" }
229
453
  ],
230
- stateMutability: "view"
454
+ stateMutability: "view",
455
+ type: "function"
456
+ },
457
+ {
458
+ inputs: [],
459
+ name: "minMembershipRateLimit",
460
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
461
+ stateMutability: "view",
462
+ type: "function"
463
+ },
464
+ {
465
+ inputs: [],
466
+ name: "nextFreeIndex",
467
+ outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
468
+ stateMutability: "view",
469
+ type: "function"
470
+ },
471
+ {
472
+ inputs: [],
473
+ name: "owner",
474
+ outputs: [{ internalType: "address", name: "", type: "address" }],
475
+ stateMutability: "view",
476
+ type: "function"
231
477
  },
232
478
  {
233
- type: "function",
234
- name: "gracePeriodDurationForNewMemberships",
235
479
  inputs: [],
480
+ name: "priceCalculator",
236
481
  outputs: [
237
- {
238
- name: "",
239
- type: "uint32"
240
- }
482
+ { internalType: "contract IPriceCalculator", name: "", type: "address" }
241
483
  ],
242
- stateMutability: "view"
484
+ stateMutability: "view",
485
+ type: "function"
486
+ },
487
+ {
488
+ inputs: [],
489
+ name: "proxiableUUID",
490
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
491
+ stateMutability: "view",
492
+ type: "function"
243
493
  },
244
494
  {
245
- type: "function",
246
- name: "initialize",
247
495
  inputs: [
496
+ { internalType: "uint256", name: "idCommitment", type: "uint256" },
497
+ { internalType: "uint32", name: "rateLimit", type: "uint32" },
248
498
  {
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"
499
+ internalType: "uint256[]",
500
+ name: "idCommitmentsToErase",
501
+ type: "uint256[]"
271
502
  }
272
503
  ],
504
+ name: "register",
273
505
  outputs: [],
274
- stateMutability: "nonpayable"
506
+ stateMutability: "nonpayable",
507
+ type: "function"
275
508
  },
276
509
  {
277
- type: "function",
278
- name: "isExpired",
279
510
  inputs: [
280
- {
281
- name: "_idCommitment",
282
- type: "uint256"
511
+ { internalType: "address", name: "owner", type: "address" },
512
+ { internalType: "uint256", name: "deadline", type: "uint256" },
513
+ { internalType: "uint8", name: "v", type: "uint8" },
514
+ { internalType: "bytes32", name: "r", type: "bytes32" },
515
+ { internalType: "bytes32", name: "s", type: "bytes32" },
516
+ { internalType: "uint256", name: "idCommitment", type: "uint256" },
517
+ { internalType: "uint32", name: "rateLimit", type: "uint32" },
518
+ {
519
+ internalType: "uint256[]",
520
+ name: "idCommitmentsToErase",
521
+ type: "uint256[]"
283
522
  }
284
523
  ],
285
- outputs: [
524
+ name: "registerWithPermit",
525
+ outputs: [],
526
+ stateMutability: "nonpayable",
527
+ type: "function"
528
+ },
529
+ {
530
+ inputs: [],
531
+ name: "renounceOwnership",
532
+ outputs: [],
533
+ stateMutability: "nonpayable",
534
+ type: "function"
535
+ },
536
+ {
537
+ inputs: [],
538
+ name: "root",
539
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
540
+ stateMutability: "view",
541
+ type: "function"
542
+ },
543
+ {
544
+ inputs: [
286
545
  {
287
- name: "",
288
- type: "bool"
546
+ internalType: "uint32",
547
+ name: "_activeDurationForNewMembership",
548
+ type: "uint32"
289
549
  }
290
550
  ],
291
- stateMutability: "view"
551
+ name: "setActiveDuration",
552
+ outputs: [],
553
+ stateMutability: "nonpayable",
554
+ type: "function"
292
555
  },
293
556
  {
294
- type: "function",
295
- name: "register",
296
557
  inputs: [
297
558
  {
298
- name: "idCommitment",
299
- type: "uint256"
300
- },
301
- {
302
- name: "rateLimit",
559
+ internalType: "uint32",
560
+ name: "_gracePeriodDurationForNewMembership",
303
561
  type: "uint32"
304
- },
305
- {
306
- name: "idCommitmentsToErase",
307
- type: "uint256[]"
308
562
  }
309
563
  ],
564
+ name: "setGracePeriodDuration",
310
565
  outputs: [],
311
- stateMutability: "nonpayable"
566
+ stateMutability: "nonpayable",
567
+ type: "function"
312
568
  },
313
569
  {
314
- type: "function",
315
- name: "registerWithPermit",
316
570
  inputs: [
317
571
  {
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",
572
+ internalType: "uint32",
573
+ name: "_maxMembershipRateLimit",
343
574
  type: "uint32"
344
- },
345
- {
346
- name: "idCommitmentsToErase",
347
- type: "uint256[]"
348
575
  }
349
576
  ],
577
+ name: "setMaxMembershipRateLimit",
350
578
  outputs: [],
351
- stateMutability: "nonpayable"
579
+ stateMutability: "nonpayable",
580
+ type: "function"
352
581
  },
353
582
  {
354
- type: "event",
355
- name: "MembershipRegistered",
356
583
  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
- }
584
+ { internalType: "uint32", name: "_maxTotalRateLimit", type: "uint32" }
372
585
  ],
373
- anonymous: false
586
+ name: "setMaxTotalRateLimit",
587
+ outputs: [],
588
+ stateMutability: "nonpayable",
589
+ type: "function"
374
590
  },
375
591
  {
376
- type: "event",
377
- name: "MembershipRemoved",
378
592
  inputs: [
379
593
  {
380
- name: "idCommitment",
381
- type: "uint256",
382
- indexed: false
383
- },
384
- {
385
- name: "index",
386
- type: "uint256",
387
- indexed: false
594
+ internalType: "uint32",
595
+ name: "_minMembershipRateLimit",
596
+ type: "uint32"
388
597
  }
389
598
  ],
390
- anonymous: false
599
+ name: "setMinMembershipRateLimit",
600
+ outputs: [],
601
+ stateMutability: "nonpayable",
602
+ type: "function"
603
+ },
604
+ {
605
+ inputs: [
606
+ { internalType: "address", name: "_priceCalculator", type: "address" }
607
+ ],
608
+ name: "setPriceCalculator",
609
+ outputs: [],
610
+ stateMutability: "nonpayable",
611
+ type: "function"
612
+ },
613
+ {
614
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
615
+ name: "transferOwnership",
616
+ outputs: [],
617
+ stateMutability: "nonpayable",
618
+ type: "function"
619
+ },
620
+ {
621
+ inputs: [
622
+ { internalType: "address", name: "newImplementation", type: "address" }
623
+ ],
624
+ name: "upgradeTo",
625
+ outputs: [],
626
+ stateMutability: "nonpayable",
627
+ type: "function"
628
+ },
629
+ {
630
+ inputs: [
631
+ { internalType: "address", name: "newImplementation", type: "address" },
632
+ { internalType: "bytes", name: "data", type: "bytes" }
633
+ ],
634
+ name: "upgradeToAndCall",
635
+ outputs: [],
636
+ stateMutability: "payable",
637
+ type: "function"
638
+ },
639
+ {
640
+ inputs: [{ internalType: "address", name: "token", type: "address" }],
641
+ name: "withdraw",
642
+ outputs: [],
643
+ stateMutability: "nonpayable",
644
+ type: "function"
391
645
  }
392
646
  ];
393
647
  //# sourceMappingURL=abi.js.map