@waku/rln 0.1.6-006cd41.0 → 0.1.6-6d86b6f.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 (87) hide show
  1. package/bundle/_virtual/index2.js +1 -1
  2. package/bundle/index.js +2 -1
  3. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/checksum.js +3 -3
  4. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/cipher.js +4 -4
  5. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/class.js +7 -7
  6. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/functional.js +7 -7
  7. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/index.js +6 -6
  8. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/kdf.js +5 -5
  9. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/password.js +1 -1
  10. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/schema-validation-generated.js +1 -1
  11. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/schema-validation.js +2 -2
  12. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/lib/types.js +1 -1
  13. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/_assert.js +1 -1
  14. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/_sha2.js +3 -3
  15. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/_u64.js +1 -1
  16. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/cryptoBrowser.js +1 -1
  17. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/hmac.js +3 -3
  18. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/pbkdf2.js +4 -4
  19. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/scrypt.js +5 -5
  20. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/sha256.js +3 -3
  21. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/sha512.js +4 -4
  22. package/bundle/{packages/rln → node_modules/@chainsafe/bls-keystore}/node_modules/@noble/hashes/utils.js +2 -2
  23. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/aes.js +3 -3
  24. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +7 -7
  25. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +3 -3
  26. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/scrypt.js +3 -3
  27. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +3 -3
  28. package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +7 -7
  29. package/bundle/node_modules/@ethersproject/keccak256/lib.esm/index.js +1 -1
  30. package/bundle/node_modules/@noble/hashes/esm/_assert.js +6 -32
  31. package/bundle/node_modules/@noble/hashes/esm/_md.js +22 -11
  32. package/bundle/node_modules/@noble/hashes/esm/_u64.js +4 -3
  33. package/bundle/{packages/rln/node_modules → node_modules}/@noble/hashes/esm/hmac.js +19 -10
  34. package/bundle/{packages/rln/node_modules/@noble/hashes/esm/sha256.js → node_modules/@noble/hashes/esm/sha2.js} +36 -50
  35. package/bundle/node_modules/@noble/hashes/esm/sha256.js +5 -102
  36. package/bundle/node_modules/@noble/hashes/esm/sha3.js +30 -24
  37. package/bundle/node_modules/@noble/hashes/esm/utils.js +69 -18
  38. package/bundle/node_modules/bn.js/lib/bn.js +1 -0
  39. package/bundle/node_modules/ethereum-cryptography/esm/sha256.js +1 -1
  40. package/bundle/node_modules/{@ethersproject/keccak256/node_modules/js-sha3 → js-sha3}/src/sha3.js +2 -2
  41. package/bundle/packages/rln/dist/contract/constants.js +1 -0
  42. package/bundle/packages/rln/dist/contract/rln_base_contract.js +127 -71
  43. package/bundle/packages/rln/dist/credentials_manager.js +3 -3
  44. package/bundle/packages/rln/dist/keystore/cipher.js +3 -3
  45. package/bundle/packages/rln/dist/keystore/keystore.js +1 -1
  46. package/dist/.tsbuildinfo +1 -1
  47. package/dist/contract/index.d.ts +1 -0
  48. package/dist/contract/index.js +1 -0
  49. package/dist/contract/index.js.map +1 -1
  50. package/dist/contract/rln_base_contract.d.ts +32 -22
  51. package/dist/contract/rln_base_contract.js +127 -71
  52. package/dist/contract/rln_base_contract.js.map +1 -1
  53. package/dist/contract/types.d.ts +5 -0
  54. package/dist/contract/types.js.map +1 -1
  55. package/dist/credentials_manager.js +1 -1
  56. package/dist/credentials_manager.js.map +1 -1
  57. package/dist/index.d.ts +2 -1
  58. package/dist/index.js +1 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/keystore/keystore.js.map +1 -1
  61. package/dist/keystore/types.d.ts +2 -2
  62. package/package.json +1 -1
  63. package/src/contract/index.ts +1 -0
  64. package/src/contract/rln_base_contract.ts +166 -102
  65. package/src/contract/types.ts +5 -0
  66. package/src/credentials_manager.ts +1 -1
  67. package/src/index.ts +3 -1
  68. package/src/keystore/keystore.ts +4 -2
  69. package/src/keystore/types.ts +2 -2
  70. package/bundle/packages/rln/node_modules/@noble/hashes/esm/_assert.js +0 -43
  71. package/bundle/packages/rln/node_modules/@noble/hashes/esm/_sha2.js +0 -116
  72. package/bundle/packages/rln/node_modules/@noble/hashes/esm/utils.js +0 -43
  73. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/index.js +0 -0
  74. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/md5.js +0 -0
  75. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/nil.js +0 -0
  76. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/parse.js +0 -0
  77. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/regex.js +0 -0
  78. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/rng.js +0 -0
  79. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/sha1.js +0 -0
  80. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/stringify.js +0 -0
  81. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v1.js +0 -0
  82. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v3.js +0 -0
  83. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v35.js +0 -0
  84. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v4.js +0 -0
  85. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/v5.js +0 -0
  86. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/validate.js +0 -0
  87. /package/bundle/{packages/rln/node_modules → node_modules}/@chainsafe/bls-keystore/node_modules/uuid/dist/esm-browser/version.js +0 -0
@@ -1,43 +0,0 @@
1
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2
- // The import here is via the package name. This is to ensure
3
- // that exports mapping/resolution does fall into place.
4
- // Cast array to view
5
- const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
6
- // The rotate right (circular right shift) operation for uint32
7
- const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);
8
- const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;
9
- // There is almost no big endian hardware, but js typed arrays uses platform specific endianness.
10
- // So, just to be sure not to corrupt anything.
11
- if (!isLE)
12
- throw new Error('Non little-endian hardware is not supported');
13
- Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));
14
- function utf8ToBytes(str) {
15
- if (typeof str !== 'string') {
16
- throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);
17
- }
18
- return new TextEncoder().encode(str);
19
- }
20
- function toBytes(data) {
21
- if (typeof data === 'string')
22
- data = utf8ToBytes(data);
23
- if (!(data instanceof Uint8Array))
24
- throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);
25
- return data;
26
- }
27
- // For runtime check if class implements interface
28
- class Hash {
29
- // Safe version that clones internal state
30
- clone() {
31
- return this._cloneInto();
32
- }
33
- }
34
- function wrapConstructor(hashConstructor) {
35
- const hashC = (message) => hashConstructor().update(toBytes(message)).digest();
36
- const tmp = hashConstructor();
37
- hashC.outputLen = tmp.outputLen;
38
- hashC.blockLen = tmp.blockLen;
39
- hashC.create = () => hashConstructor();
40
- return hashC;
41
- }
42
-
43
- export { Hash, createView, isLE, rotr, toBytes, utf8ToBytes, wrapConstructor };