@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,22 +0,0 @@
1
- // Copyright (C) 2016 Dmitry Chestnykh
2
- // MIT License. See LICENSE file for details.
3
- /**
4
- * Package binary provides functions for encoding and decoding numbers in byte arrays.
5
- */
6
- /**
7
- * Writes 4-byte little-endian representation of 32-bit unsigned
8
- * value to array starting at offset.
9
- *
10
- * If byte array is not given, creates a new 4-byte one.
11
- *
12
- * Returns the output byte array.
13
- */
14
- function writeUint32LE(value, out = new Uint8Array(4), offset = 0) {
15
- out[offset + 0] = value >>> 0;
16
- out[offset + 1] = value >>> 8;
17
- out[offset + 2] = value >>> 16;
18
- out[offset + 3] = value >>> 24;
19
- return out;
20
- }
21
-
22
- export { writeUint32LE };
@@ -1,245 +0,0 @@
1
- import { writeUint32LE } from '../../binary/lib/binary.js';
2
- import { wipe } from '../../wipe/lib/wipe.js';
3
-
4
- // Copyright (C) 2016 Dmitry Chestnykh
5
- // MIT License. See LICENSE file for details.
6
- /**
7
- * Package chacha implements ChaCha stream cipher.
8
- */
9
- // Number of ChaCha rounds (ChaCha20).
10
- const ROUNDS = 20;
11
- // Applies the ChaCha core function to 16-byte input,
12
- // 32-byte key key, and puts the result into 64-byte array out.
13
- function core(out, input, key) {
14
- let j0 = 0x61707865; // "expa" -- ChaCha's "sigma" constant
15
- let j1 = 0x3320646E; // "nd 3" for 32-byte keys
16
- let j2 = 0x79622D32; // "2-by"
17
- let j3 = 0x6B206574; // "te k"
18
- let j4 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];
19
- let j5 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];
20
- let j6 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];
21
- let j7 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];
22
- let j8 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];
23
- let j9 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];
24
- let j10 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];
25
- let j11 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];
26
- let j12 = (input[3] << 24) | (input[2] << 16) | (input[1] << 8) | input[0];
27
- let j13 = (input[7] << 24) | (input[6] << 16) | (input[5] << 8) | input[4];
28
- let j14 = (input[11] << 24) | (input[10] << 16) | (input[9] << 8) | input[8];
29
- let j15 = (input[15] << 24) | (input[14] << 16) | (input[13] << 8) | input[12];
30
- let x0 = j0;
31
- let x1 = j1;
32
- let x2 = j2;
33
- let x3 = j3;
34
- let x4 = j4;
35
- let x5 = j5;
36
- let x6 = j6;
37
- let x7 = j7;
38
- let x8 = j8;
39
- let x9 = j9;
40
- let x10 = j10;
41
- let x11 = j11;
42
- let x12 = j12;
43
- let x13 = j13;
44
- let x14 = j14;
45
- let x15 = j15;
46
- for (let i = 0; i < ROUNDS; i += 2) {
47
- x0 = x0 + x4 | 0;
48
- x12 ^= x0;
49
- x12 = x12 >>> (32 - 16) | x12 << 16;
50
- x8 = x8 + x12 | 0;
51
- x4 ^= x8;
52
- x4 = x4 >>> (32 - 12) | x4 << 12;
53
- x1 = x1 + x5 | 0;
54
- x13 ^= x1;
55
- x13 = x13 >>> (32 - 16) | x13 << 16;
56
- x9 = x9 + x13 | 0;
57
- x5 ^= x9;
58
- x5 = x5 >>> (32 - 12) | x5 << 12;
59
- x2 = x2 + x6 | 0;
60
- x14 ^= x2;
61
- x14 = x14 >>> (32 - 16) | x14 << 16;
62
- x10 = x10 + x14 | 0;
63
- x6 ^= x10;
64
- x6 = x6 >>> (32 - 12) | x6 << 12;
65
- x3 = x3 + x7 | 0;
66
- x15 ^= x3;
67
- x15 = x15 >>> (32 - 16) | x15 << 16;
68
- x11 = x11 + x15 | 0;
69
- x7 ^= x11;
70
- x7 = x7 >>> (32 - 12) | x7 << 12;
71
- x2 = x2 + x6 | 0;
72
- x14 ^= x2;
73
- x14 = x14 >>> (32 - 8) | x14 << 8;
74
- x10 = x10 + x14 | 0;
75
- x6 ^= x10;
76
- x6 = x6 >>> (32 - 7) | x6 << 7;
77
- x3 = x3 + x7 | 0;
78
- x15 ^= x3;
79
- x15 = x15 >>> (32 - 8) | x15 << 8;
80
- x11 = x11 + x15 | 0;
81
- x7 ^= x11;
82
- x7 = x7 >>> (32 - 7) | x7 << 7;
83
- x1 = x1 + x5 | 0;
84
- x13 ^= x1;
85
- x13 = x13 >>> (32 - 8) | x13 << 8;
86
- x9 = x9 + x13 | 0;
87
- x5 ^= x9;
88
- x5 = x5 >>> (32 - 7) | x5 << 7;
89
- x0 = x0 + x4 | 0;
90
- x12 ^= x0;
91
- x12 = x12 >>> (32 - 8) | x12 << 8;
92
- x8 = x8 + x12 | 0;
93
- x4 ^= x8;
94
- x4 = x4 >>> (32 - 7) | x4 << 7;
95
- x0 = x0 + x5 | 0;
96
- x15 ^= x0;
97
- x15 = x15 >>> (32 - 16) | x15 << 16;
98
- x10 = x10 + x15 | 0;
99
- x5 ^= x10;
100
- x5 = x5 >>> (32 - 12) | x5 << 12;
101
- x1 = x1 + x6 | 0;
102
- x12 ^= x1;
103
- x12 = x12 >>> (32 - 16) | x12 << 16;
104
- x11 = x11 + x12 | 0;
105
- x6 ^= x11;
106
- x6 = x6 >>> (32 - 12) | x6 << 12;
107
- x2 = x2 + x7 | 0;
108
- x13 ^= x2;
109
- x13 = x13 >>> (32 - 16) | x13 << 16;
110
- x8 = x8 + x13 | 0;
111
- x7 ^= x8;
112
- x7 = x7 >>> (32 - 12) | x7 << 12;
113
- x3 = x3 + x4 | 0;
114
- x14 ^= x3;
115
- x14 = x14 >>> (32 - 16) | x14 << 16;
116
- x9 = x9 + x14 | 0;
117
- x4 ^= x9;
118
- x4 = x4 >>> (32 - 12) | x4 << 12;
119
- x2 = x2 + x7 | 0;
120
- x13 ^= x2;
121
- x13 = x13 >>> (32 - 8) | x13 << 8;
122
- x8 = x8 + x13 | 0;
123
- x7 ^= x8;
124
- x7 = x7 >>> (32 - 7) | x7 << 7;
125
- x3 = x3 + x4 | 0;
126
- x14 ^= x3;
127
- x14 = x14 >>> (32 - 8) | x14 << 8;
128
- x9 = x9 + x14 | 0;
129
- x4 ^= x9;
130
- x4 = x4 >>> (32 - 7) | x4 << 7;
131
- x1 = x1 + x6 | 0;
132
- x12 ^= x1;
133
- x12 = x12 >>> (32 - 8) | x12 << 8;
134
- x11 = x11 + x12 | 0;
135
- x6 ^= x11;
136
- x6 = x6 >>> (32 - 7) | x6 << 7;
137
- x0 = x0 + x5 | 0;
138
- x15 ^= x0;
139
- x15 = x15 >>> (32 - 8) | x15 << 8;
140
- x10 = x10 + x15 | 0;
141
- x5 ^= x10;
142
- x5 = x5 >>> (32 - 7) | x5 << 7;
143
- }
144
- writeUint32LE(x0 + j0 | 0, out, 0);
145
- writeUint32LE(x1 + j1 | 0, out, 4);
146
- writeUint32LE(x2 + j2 | 0, out, 8);
147
- writeUint32LE(x3 + j3 | 0, out, 12);
148
- writeUint32LE(x4 + j4 | 0, out, 16);
149
- writeUint32LE(x5 + j5 | 0, out, 20);
150
- writeUint32LE(x6 + j6 | 0, out, 24);
151
- writeUint32LE(x7 + j7 | 0, out, 28);
152
- writeUint32LE(x8 + j8 | 0, out, 32);
153
- writeUint32LE(x9 + j9 | 0, out, 36);
154
- writeUint32LE(x10 + j10 | 0, out, 40);
155
- writeUint32LE(x11 + j11 | 0, out, 44);
156
- writeUint32LE(x12 + j12 | 0, out, 48);
157
- writeUint32LE(x13 + j13 | 0, out, 52);
158
- writeUint32LE(x14 + j14 | 0, out, 56);
159
- writeUint32LE(x15 + j15 | 0, out, 60);
160
- }
161
- /**
162
- * Encrypt src with ChaCha20 stream generated for the given 32-byte key and
163
- * 8-byte (as in original implementation) or 12-byte (as in RFC7539) nonce and
164
- * write the result into dst and return it.
165
- *
166
- * dst and src may be the same, but otherwise must not overlap.
167
- *
168
- * If nonce is 12 bytes, users should not encrypt more than 256 GiB with the
169
- * same key and nonce, otherwise the stream will repeat. The function will
170
- * throw error if counter overflows to prevent this.
171
- *
172
- * If nonce is 8 bytes, the output is practically unlimited (2^70 bytes, which
173
- * is more than a million petabytes). However, it is not recommended to
174
- * generate 8-byte nonces randomly, as the chance of collision is high.
175
- *
176
- * Never use the same key and nonce to encrypt more than one message.
177
- *
178
- * If nonceInplaceCounterLength is not 0, the nonce is assumed to be a 16-byte
179
- * array with stream counter in first nonceInplaceCounterLength bytes and nonce
180
- * in the last remaining bytes. The counter will be incremented inplace for
181
- * each ChaCha block. This is useful if you need to encrypt one stream of data
182
- * in chunks.
183
- */
184
- function streamXOR(key, nonce, src, dst, nonceInplaceCounterLength = 0) {
185
- // We only support 256-bit keys.
186
- if (key.length !== 32) {
187
- throw new Error("ChaCha: key size must be 32 bytes");
188
- }
189
- if (dst.length < src.length) {
190
- throw new Error("ChaCha: destination is shorter than source");
191
- }
192
- let nc;
193
- let counterLength;
194
- if (nonceInplaceCounterLength === 0) {
195
- if (nonce.length !== 8 && nonce.length !== 12) {
196
- throw new Error("ChaCha nonce must be 8 or 12 bytes");
197
- }
198
- nc = new Uint8Array(16);
199
- // First counterLength bytes of nc are counter, starting with zero.
200
- counterLength = nc.length - nonce.length;
201
- // Last bytes of nc after counterLength are nonce, set them.
202
- nc.set(nonce, counterLength);
203
- }
204
- else {
205
- if (nonce.length !== 16) {
206
- throw new Error("ChaCha nonce with counter must be 16 bytes");
207
- }
208
- // This will update passed nonce with counter inplace.
209
- nc = nonce;
210
- counterLength = nonceInplaceCounterLength;
211
- }
212
- // Allocate temporary space for ChaCha block.
213
- const block = new Uint8Array(64);
214
- for (let i = 0; i < src.length; i += 64) {
215
- // Generate a block.
216
- core(block, nc, key);
217
- // XOR block bytes with src into dst.
218
- for (let j = i; j < i + 64 && j < src.length; j++) {
219
- dst[j] = src[j] ^ block[j - i];
220
- }
221
- // Increment counter.
222
- incrementCounter(nc, 0, counterLength);
223
- }
224
- // Cleanup temporary space.
225
- wipe(block);
226
- if (nonceInplaceCounterLength === 0) {
227
- // Cleanup counter.
228
- wipe(nc);
229
- }
230
- return dst;
231
- }
232
- function incrementCounter(counter, pos, len) {
233
- let carry = 1;
234
- while (len--) {
235
- carry = carry + (counter[pos] & 0xff) | 0;
236
- counter[pos] = carry & 0xff;
237
- carry >>>= 8;
238
- pos++;
239
- }
240
- if (carry > 0) {
241
- throw new Error("ChaCha: counter overflow");
242
- }
243
- }
244
-
245
- export { streamXOR };
@@ -1,26 +0,0 @@
1
- // Copyright (C) 2016 Dmitry Chestnykh
2
- // MIT License. See LICENSE file for details.
3
- /**
4
- * Sets all values in the given array to zero and returns it.
5
- *
6
- * The fact that it sets bytes to zero can be relied on.
7
- *
8
- * There is no guarantee that this function makes data disappear from memory,
9
- * as runtime implementation can, for example, have copying garbage collector
10
- * that will make copies of sensitive data before we wipe it. Or that an
11
- * operating system will write our data to swap or sleep image. Another thing
12
- * is that an optimizing compiler can remove calls to this function or make it
13
- * no-op. There's nothing we can do with it, so we just do our best and hope
14
- * that everything will be okay and good will triumph over evil.
15
- */
16
- function wipe(array) {
17
- // Right now it's similar to array.fill(0). If it turns
18
- // out that runtimes optimize this call away, maybe
19
- // we can try something else.
20
- for (let i = 0; i < array.length; i++) {
21
- array[i] = 0;
22
- }
23
- return array;
24
- }
25
-
26
- export { wipe };
@@ -1,394 +0,0 @@
1
- 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
- ];
393
-
394
- export { RLN_V2_ABI };
@@ -1 +0,0 @@
1
- export {};