@waku/rln 0.1.5-5e19700.0 → 0.1.5-ea6daae.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 (125) hide show
  1. package/README.md +0 -5
  2. package/bundle/_virtual/index2.js +1 -1
  3. package/bundle/_virtual/utils.js +2 -2
  4. package/bundle/_virtual/utils2.js +2 -2
  5. package/bundle/index.js +1 -3
  6. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/checksum.js +3 -3
  7. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/cipher.js +4 -4
  8. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/class.js +7 -7
  9. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/functional.js +7 -7
  10. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/index.js +6 -6
  11. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/kdf.js +5 -5
  12. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/password.js +1 -1
  13. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/schema-validation-generated.js +1 -1
  14. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/schema-validation.js +2 -2
  15. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/types.js +1 -1
  16. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/_assert.js +1 -1
  17. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/_sha2.js +3 -3
  18. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/_u64.js +1 -1
  19. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/cryptoBrowser.js +1 -1
  20. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/hmac.js +3 -3
  21. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/pbkdf2.js +4 -4
  22. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/scrypt.js +5 -5
  23. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/sha256.js +3 -3
  24. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/sha512.js +4 -4
  25. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/utils.js +2 -2
  26. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/aes.js +3 -3
  27. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +7 -7
  28. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +3 -3
  29. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/scrypt.js +3 -3
  30. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +3 -3
  31. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +7 -7
  32. package/bundle/node_modules/@ethersproject/abi/lib.esm/_version.js +1 -1
  33. package/bundle/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js +1 -1
  34. package/bundle/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js +1 -1
  35. package/bundle/node_modules/@ethersproject/address/lib.esm/_version.js +1 -1
  36. package/bundle/node_modules/@ethersproject/bignumber/lib.esm/_version.js +1 -1
  37. package/bundle/node_modules/@ethersproject/contracts/lib.esm/_version.js +1 -1
  38. package/bundle/node_modules/@ethersproject/contracts/lib.esm/index.js +1 -1
  39. package/bundle/node_modules/@ethersproject/hash/lib.esm/_version.js +1 -1
  40. package/bundle/node_modules/@ethersproject/keccak256/lib.esm/index.js +1 -1
  41. package/bundle/node_modules/@ethersproject/networks/lib.esm/_version.js +1 -1
  42. package/bundle/node_modules/@ethersproject/networks/lib.esm/index.js +19 -1
  43. package/bundle/node_modules/@ethersproject/properties/lib.esm/_version.js +1 -1
  44. package/bundle/node_modules/@ethersproject/providers/lib.esm/_version.js +1 -1
  45. package/bundle/node_modules/@ethersproject/signing-key/lib.esm/_version.js +1 -1
  46. package/bundle/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js +58 -10
  47. package/bundle/node_modules/@ethersproject/strings/lib.esm/_version.js +1 -1
  48. package/bundle/node_modules/@ethersproject/transactions/lib.esm/_version.js +1 -1
  49. package/bundle/node_modules/@ethersproject/web/lib.esm/_version.js +1 -1
  50. package/bundle/node_modules/{@ethersproject/keccak256/node_modules/js-sha3 → js-sha3}/src/sha3.js +2 -2
  51. package/bundle/packages/rln/dist/contract/abi.js +248 -502
  52. package/bundle/packages/rln/dist/contract/constants.js +4 -4
  53. package/bundle/packages/rln/dist/contract/rln_contract.js +36 -120
  54. package/bundle/packages/rln/dist/keystore/cipher.js +3 -3
  55. package/bundle/packages/rln/dist/keystore/keystore.js +2 -3
  56. package/bundle/packages/rln/dist/rln.js +6 -6
  57. package/dist/.tsbuildinfo +1 -1
  58. package/dist/contract/abi.d.ts +17 -21
  59. package/dist/contract/abi.js +248 -502
  60. package/dist/contract/abi.js.map +1 -1
  61. package/dist/contract/constants.d.ts +18 -22
  62. package/dist/contract/constants.js +3 -3
  63. package/dist/contract/constants.js.map +1 -1
  64. package/dist/contract/rln_contract.d.ts +3 -10
  65. package/dist/contract/rln_contract.js +36 -120
  66. package/dist/contract/rln_contract.js.map +1 -1
  67. package/dist/index.d.ts +2 -5
  68. package/dist/index.js +2 -4
  69. package/dist/index.js.map +1 -1
  70. package/dist/keystore/keystore.js +1 -2
  71. package/dist/keystore/keystore.js.map +1 -1
  72. package/dist/keystore/types.d.ts +0 -1
  73. package/dist/rln.d.ts +1 -1
  74. package/dist/rln.js +6 -6
  75. package/dist/rln.js.map +1 -1
  76. package/package.json +1 -1
  77. package/src/contract/abi.ts +248 -502
  78. package/src/contract/constants.ts +3 -3
  79. package/src/contract/rln_contract.ts +46 -158
  80. package/src/index.ts +2 -17
  81. package/src/keystore/keystore.ts +1 -2
  82. package/src/keystore/types.ts +0 -1
  83. package/src/rln.ts +7 -7
  84. package/bundle/packages/rln/dist/contract/rln_light_contract.js +0 -473
  85. package/bundle/packages/rln/dist/rln_light.js +0 -149
  86. package/bundle/packages/rln/node_modules/@noble/hashes/esm/_assert.js +0 -43
  87. package/bundle/packages/rln/node_modules/@noble/hashes/esm/_sha2.js +0 -116
  88. package/bundle/packages/rln/node_modules/@noble/hashes/esm/hmac.js +0 -79
  89. package/bundle/packages/rln/node_modules/@noble/hashes/esm/sha256.js +0 -126
  90. package/bundle/packages/rln/node_modules/@noble/hashes/esm/utils.js +0 -43
  91. package/dist/codec.test-utils.d.ts +0 -36
  92. package/dist/codec.test-utils.js +0 -56
  93. package/dist/codec.test-utils.js.map +0 -1
  94. package/dist/contract/rln_light_contract.d.ts +0 -124
  95. package/dist/contract/rln_light_contract.js +0 -456
  96. package/dist/contract/rln_light_contract.js.map +0 -1
  97. package/dist/contract/test-setup.d.ts +0 -26
  98. package/dist/contract/test-setup.js +0 -56
  99. package/dist/contract/test-setup.js.map +0 -1
  100. package/dist/contract/test-utils.d.ts +0 -39
  101. package/dist/contract/test-utils.js +0 -118
  102. package/dist/contract/test-utils.js.map +0 -1
  103. package/dist/rln_light.d.ts +0 -64
  104. package/dist/rln_light.js +0 -144
  105. package/dist/rln_light.js.map +0 -1
  106. package/src/codec.test-utils.ts +0 -80
  107. package/src/contract/rln_light_contract.ts +0 -718
  108. package/src/contract/test-setup.ts +0 -86
  109. package/src/contract/test-utils.ts +0 -179
  110. package/src/rln_light.ts +0 -235
  111. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/index.js +0 -0
  112. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/md5.js +0 -0
  113. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/nil.js +0 -0
  114. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/parse.js +0 -0
  115. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/regex.js +0 -0
  116. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/rng.js +0 -0
  117. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/sha1.js +0 -0
  118. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/stringify.js +0 -0
  119. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v1.js +0 -0
  120. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v3.js +0 -0
  121. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v35.js +0 -0
  122. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v4.js +0 -0
  123. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v5.js +0 -0
  124. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/validate.js +0 -0
  125. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/version.js +0 -0
@@ -1,647 +1,393 @@
1
1
  export const RLN_ABI = [
2
- { inputs: [], stateMutability: "nonpayable", type: "constructor" },
3
2
  {
4
- inputs: [
5
- { internalType: "uint256", name: "idCommitment", type: "uint256" }
6
- ],
7
- name: "CannotEraseActiveMembership",
8
- type: "error"
3
+ type: "constructor",
4
+ inputs: [],
5
+ stateMutability: "nonpayable"
9
6
  },
10
- { inputs: [], name: "CannotExceedMaxTotalRateLimit", type: "error" },
11
7
  {
12
- inputs: [
13
- { internalType: "uint256", name: "idCommitment", type: "uint256" }
14
- ],
15
- name: "CannotExtendNonGracePeriodMembership",
16
- type: "error"
8
+ type: "error",
9
+ name: "DuplicateIdCommitment",
10
+ inputs: []
17
11
  },
18
12
  {
19
- inputs: [
20
- { internalType: "uint256", name: "idCommitment", type: "uint256" }
21
- ],
13
+ type: "error",
22
14
  name: "InvalidIdCommitment",
23
- type: "error"
24
- },
25
- { inputs: [], name: "InvalidMembershipRateLimit", type: "error" },
26
- {
27
- inputs: [
28
- { internalType: "uint256", name: "startIndex", type: "uint256" },
29
- { internalType: "uint256", name: "endIndex", type: "uint256" }
30
- ],
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
15
  inputs: [
50
- { internalType: "uint256", name: "idCommitment", type: "uint256" }
51
- ],
52
- name: "NonHolderCannotExtend",
53
- type: "error"
16
+ {
17
+ name: "idCommitment",
18
+ type: "uint256"
19
+ }
20
+ ]
54
21
  },
55
22
  {
56
- anonymous: false,
23
+ type: "error",
24
+ name: "InvalidPaginationQuery",
57
25
  inputs: [
58
26
  {
59
- indexed: false,
60
- internalType: "address",
61
- name: "previousAdmin",
62
- type: "address"
27
+ name: "startIndex",
28
+ type: "uint256"
63
29
  },
64
30
  {
65
- indexed: false,
66
- internalType: "address",
67
- name: "newAdmin",
68
- type: "address"
31
+ name: "endIndex",
32
+ type: "uint256"
69
33
  }
70
- ],
71
- name: "AdminChanged",
72
- type: "event"
34
+ ]
73
35
  },
74
36
  {
75
- anonymous: false,
76
- inputs: [
37
+ type: "function",
38
+ name: "MAX_MEMBERSHIP_SET_SIZE",
39
+ inputs: [],
40
+ outputs: [
77
41
  {
78
- indexed: true,
79
- internalType: "address",
80
- name: "beacon",
81
- type: "address"
42
+ name: "",
43
+ type: "uint32"
82
44
  }
83
45
  ],
84
- name: "BeaconUpgraded",
85
- type: "event"
46
+ stateMutability: "view"
86
47
  },
87
48
  {
88
- anonymous: false,
89
- inputs: [
90
- { indexed: false, internalType: "uint8", name: "version", type: "uint8" }
49
+ type: "function",
50
+ name: "MERKLE_TREE_DEPTH",
51
+ inputs: [],
52
+ outputs: [
53
+ {
54
+ name: "",
55
+ type: "uint8"
56
+ }
91
57
  ],
92
- name: "Initialized",
93
- type: "event"
58
+ stateMutability: "view"
94
59
  },
95
60
  {
96
- anonymous: false,
97
- inputs: [
61
+ type: "function",
62
+ name: "Q",
63
+ inputs: [],
64
+ outputs: [
98
65
  {
99
- indexed: false,
100
- internalType: "uint256",
101
- name: "idCommitment",
66
+ name: "",
102
67
  type: "uint256"
103
- },
104
- {
105
- indexed: false,
106
- internalType: "uint32",
107
- name: "membershipRateLimit",
108
- type: "uint32"
109
- },
110
- { indexed: false, internalType: "uint32", name: "index", type: "uint32" }
68
+ }
111
69
  ],
112
- name: "MembershipErased",
113
- type: "event"
70
+ stateMutability: "view"
114
71
  },
115
72
  {
116
- anonymous: false,
117
- inputs: [
118
- {
119
- indexed: false,
120
- internalType: "uint256",
121
- name: "idCommitment",
122
- type: "uint256"
123
- },
73
+ type: "function",
74
+ name: "activeDurationForNewMemberships",
75
+ inputs: [],
76
+ outputs: [
124
77
  {
125
- indexed: false,
126
- internalType: "uint32",
127
- name: "membershipRateLimit",
78
+ name: "",
128
79
  type: "uint32"
129
- },
130
- { indexed: false, internalType: "uint32", name: "index", type: "uint32" }
80
+ }
131
81
  ],
132
- name: "MembershipExpired",
133
- type: "event"
82
+ stateMutability: "view"
134
83
  },
135
84
  {
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" },
85
+ type: "function",
86
+ name: "currentTotalRateLimit",
87
+ inputs: [],
88
+ outputs: [
151
89
  {
152
- indexed: false,
153
- internalType: "uint256",
154
- name: "newGracePeriodStartTimestamp",
90
+ name: "",
155
91
  type: "uint256"
156
92
  }
157
93
  ],
158
- name: "MembershipExtended",
159
- type: "event"
94
+ stateMutability: "view"
160
95
  },
161
96
  {
162
- anonymous: false,
163
- inputs: [
164
- {
165
- indexed: false,
166
- internalType: "uint256",
167
- name: "idCommitment",
168
- type: "uint256"
169
- },
97
+ type: "function",
98
+ name: "deployedBlockNumber",
99
+ inputs: [],
100
+ outputs: [
170
101
  {
171
- indexed: false,
172
- internalType: "uint256",
173
- name: "membershipRateLimit",
174
- type: "uint256"
175
- },
176
- { indexed: false, internalType: "uint32", name: "index", type: "uint32" }
102
+ name: "",
103
+ type: "uint32"
104
+ }
177
105
  ],
178
- name: "MembershipRegistered",
179
- type: "event"
106
+ stateMutability: "view"
180
107
  },
181
108
  {
182
- anonymous: false,
109
+ type: "function",
110
+ name: "depositsToWithdraw",
183
111
  inputs: [
184
112
  {
185
- indexed: true,
186
- internalType: "address",
187
- name: "previousOwner",
113
+ name: "holder",
188
114
  type: "address"
189
115
  },
190
116
  {
191
- indexed: true,
192
- internalType: "address",
193
- name: "newOwner",
117
+ name: "token",
194
118
  type: "address"
195
119
  }
196
120
  ],
197
- name: "OwnershipTransferred",
198
- type: "event"
199
- },
200
- {
201
- anonymous: false,
202
- inputs: [
121
+ outputs: [
203
122
  {
204
- indexed: true,
205
- internalType: "address",
206
- name: "implementation",
207
- type: "address"
123
+ name: "balance",
124
+ type: "uint256"
208
125
  }
209
126
  ],
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"
254
- },
255
- {
256
- inputs: [
257
- { internalType: "address", name: "holder", type: "address" },
258
- { internalType: "address", name: "token", type: "address" }
259
- ],
260
- name: "depositsToWithdraw",
261
- outputs: [{ internalType: "uint256", name: "balance", type: "uint256" }],
262
- stateMutability: "view",
263
- type: "function"
127
+ stateMutability: "view"
264
128
  },
265
129
  {
130
+ type: "function",
131
+ name: "eraseMemberships",
266
132
  inputs: [
267
- { internalType: "uint256[]", name: "idCommitments", type: "uint256[]" }
133
+ {
134
+ name: "idCommitments",
135
+ type: "uint256[]"
136
+ }
268
137
  ],
269
- name: "eraseMemberships",
270
138
  outputs: [],
271
- stateMutability: "nonpayable",
272
- type: "function"
139
+ stateMutability: "nonpayable"
273
140
  },
274
141
  {
142
+ type: "function",
143
+ name: "eraseMemberships",
275
144
  inputs: [
276
- { internalType: "uint256[]", name: "idCommitments", type: "uint256[]" },
277
- { internalType: "bool", name: "eraseFromMembershipSet", type: "bool" }
145
+ {
146
+ name: "idCommitments",
147
+ type: "uint256[]"
148
+ },
149
+ {
150
+ name: "eraseFromMembershipSet",
151
+ type: "bool"
152
+ }
278
153
  ],
279
- name: "eraseMemberships",
280
154
  outputs: [],
281
- stateMutability: "nonpayable",
282
- type: "function"
155
+ stateMutability: "nonpayable"
283
156
  },
284
157
  {
158
+ type: "function",
159
+ name: "extendMemberships",
285
160
  inputs: [
286
- { internalType: "uint256[]", name: "idCommitments", type: "uint256[]" }
161
+ {
162
+ name: "idCommitments",
163
+ type: "uint256[]"
164
+ }
287
165
  ],
288
- name: "extendMemberships",
289
166
  outputs: [],
290
- stateMutability: "nonpayable",
291
- type: "function"
167
+ stateMutability: "nonpayable"
292
168
  },
293
169
  {
294
- inputs: [
295
- { internalType: "uint256", name: "idCommitment", type: "uint256" }
296
- ],
170
+ type: "function",
297
171
  name: "getMembershipInfo",
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
172
  inputs: [
315
- { internalType: "uint32", name: "startIndex", type: "uint32" },
316
- { internalType: "uint32", name: "endIndex", type: "uint32" }
173
+ {
174
+ name: "idCommitment",
175
+ type: "uint256"
176
+ }
317
177
  ],
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" },
178
+ outputs: [
341
179
  {
342
- internalType: "uint32",
343
- name: "_minMembershipRateLimit",
180
+ name: "",
344
181
  type: "uint32"
345
182
  },
346
183
  {
347
- internalType: "uint32",
348
- name: "_maxMembershipRateLimit",
184
+ name: "",
349
185
  type: "uint32"
350
186
  },
351
- { internalType: "uint32", name: "_activeDuration", type: "uint32" },
352
- { internalType: "uint32", name: "_gracePeriod", type: "uint32" }
353
- ],
354
- name: "initialize",
355
- outputs: [],
356
- stateMutability: "nonpayable",
357
- type: "function"
358
- },
359
- {
360
- inputs: [
361
- { internalType: "uint256", name: "_idCommitment", type: "uint256" }
362
- ],
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" }
371
- ],
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"
385
- },
386
- {
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" },
433
187
  {
434
- internalType: "uint256",
435
- name: "gracePeriodStartTimestamp",
188
+ name: "",
436
189
  type: "uint256"
437
- },
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" }
190
+ }
443
191
  ],
444
- stateMutability: "view",
445
- type: "function"
192
+ stateMutability: "view"
446
193
  },
447
194
  {
448
- inputs: [],
449
- name: "merkleTree",
450
- outputs: [
451
- { internalType: "uint40", name: "maxIndex", type: "uint40" },
452
- { internalType: "uint40", name: "numberOfLeaves", type: "uint40" }
195
+ type: "function",
196
+ name: "getMerkleProof",
197
+ inputs: [
198
+ {
199
+ name: "index",
200
+ type: "uint40"
201
+ }
453
202
  ],
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"
477
- },
478
- {
479
- inputs: [],
480
- name: "priceCalculator",
481
203
  outputs: [
482
- { internalType: "contract IPriceCalculator", name: "", type: "address" }
204
+ {
205
+ name: "",
206
+ type: "uint256[20]"
207
+ }
483
208
  ],
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"
209
+ stateMutability: "view"
493
210
  },
494
211
  {
212
+ type: "function",
213
+ name: "getRateCommitmentsInRangeBoundsInclusive",
495
214
  inputs: [
496
- { internalType: "uint256", name: "idCommitment", type: "uint256" },
497
- { internalType: "uint32", name: "rateLimit", type: "uint32" },
498
215
  {
499
- internalType: "uint256[]",
500
- name: "idCommitmentsToErase",
501
- type: "uint256[]"
216
+ name: "startIndex",
217
+ type: "uint32"
218
+ },
219
+ {
220
+ name: "endIndex",
221
+ type: "uint32"
502
222
  }
503
223
  ],
504
- name: "register",
505
- outputs: [],
506
- stateMutability: "nonpayable",
507
- type: "function"
508
- },
509
- {
510
- inputs: [
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",
224
+ outputs: [
225
+ {
226
+ name: "",
521
227
  type: "uint256[]"
522
228
  }
523
229
  ],
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"
230
+ stateMutability: "view"
535
231
  },
536
232
  {
233
+ type: "function",
234
+ name: "gracePeriodDurationForNewMemberships",
537
235
  inputs: [],
538
- name: "root",
539
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
540
- stateMutability: "view",
541
- type: "function"
542
- },
543
- {
544
- inputs: [
236
+ outputs: [
545
237
  {
546
- internalType: "uint32",
547
- name: "_activeDurationForNewMembership",
238
+ name: "",
548
239
  type: "uint32"
549
240
  }
550
241
  ],
551
- name: "setActiveDuration",
552
- outputs: [],
553
- stateMutability: "nonpayable",
554
- type: "function"
242
+ stateMutability: "view"
555
243
  },
556
244
  {
245
+ type: "function",
246
+ name: "initialize",
557
247
  inputs: [
558
248
  {
559
- internalType: "uint32",
560
- name: "_gracePeriodDurationForNewMembership",
249
+ name: "_priceCalculator",
250
+ type: "address"
251
+ },
252
+ {
253
+ name: "_maxTotalRateLimit",
561
254
  type: "uint32"
562
- }
563
- ],
564
- name: "setGracePeriodDuration",
565
- outputs: [],
566
- stateMutability: "nonpayable",
567
- type: "function"
568
- },
569
- {
570
- inputs: [
255
+ },
256
+ {
257
+ name: "_minMembershipRateLimit",
258
+ type: "uint32"
259
+ },
571
260
  {
572
- internalType: "uint32",
573
261
  name: "_maxMembershipRateLimit",
574
262
  type: "uint32"
263
+ },
264
+ {
265
+ name: "_activeDuration",
266
+ type: "uint32"
267
+ },
268
+ {
269
+ name: "_gracePeriod",
270
+ type: "uint32"
575
271
  }
576
272
  ],
577
- name: "setMaxMembershipRateLimit",
578
273
  outputs: [],
579
- stateMutability: "nonpayable",
580
- type: "function"
274
+ stateMutability: "nonpayable"
581
275
  },
582
276
  {
277
+ type: "function",
278
+ name: "isExpired",
583
279
  inputs: [
584
- { internalType: "uint32", name: "_maxTotalRateLimit", type: "uint32" }
280
+ {
281
+ name: "_idCommitment",
282
+ type: "uint256"
283
+ }
585
284
  ],
586
- name: "setMaxTotalRateLimit",
587
- outputs: [],
588
- stateMutability: "nonpayable",
589
- type: "function"
285
+ outputs: [
286
+ {
287
+ name: "",
288
+ type: "bool"
289
+ }
290
+ ],
291
+ stateMutability: "view"
590
292
  },
591
293
  {
294
+ type: "function",
295
+ name: "register",
592
296
  inputs: [
593
297
  {
594
- internalType: "uint32",
595
- name: "_minMembershipRateLimit",
298
+ name: "idCommitment",
299
+ type: "uint256"
300
+ },
301
+ {
302
+ name: "rateLimit",
596
303
  type: "uint32"
304
+ },
305
+ {
306
+ name: "idCommitmentsToErase",
307
+ type: "uint256[]"
597
308
  }
598
309
  ],
599
- name: "setMinMembershipRateLimit",
600
310
  outputs: [],
601
- stateMutability: "nonpayable",
602
- type: "function"
311
+ stateMutability: "nonpayable"
603
312
  },
604
313
  {
314
+ type: "function",
315
+ name: "registerWithPermit",
605
316
  inputs: [
606
- { internalType: "address", name: "_priceCalculator", type: "address" }
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
+ }
607
349
  ],
608
- name: "setPriceCalculator",
609
350
  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"
351
+ stateMutability: "nonpayable"
619
352
  },
620
353
  {
354
+ type: "event",
355
+ name: "MembershipRegistered",
621
356
  inputs: [
622
- { internalType: "address", name: "newImplementation", type: "address" }
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
+ }
623
372
  ],
624
- name: "upgradeTo",
625
- outputs: [],
626
- stateMutability: "nonpayable",
627
- type: "function"
373
+ anonymous: false
628
374
  },
629
375
  {
376
+ type: "event",
377
+ name: "MembershipRemoved",
630
378
  inputs: [
631
- { internalType: "address", name: "newImplementation", type: "address" },
632
- { internalType: "bytes", name: "data", type: "bytes" }
379
+ {
380
+ name: "idCommitment",
381
+ type: "uint256",
382
+ indexed: false
383
+ },
384
+ {
385
+ name: "index",
386
+ type: "uint256",
387
+ indexed: false
388
+ }
633
389
  ],
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"
390
+ anonymous: false
645
391
  }
646
392
  ];
647
393
  //# sourceMappingURL=abi.js.map