@waku/rln 0.1.6-4997440.0 → 0.1.6-4c18ca2.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 (51) hide show
  1. package/bundle/_virtual/utils.js +2 -2
  2. package/bundle/_virtual/utils2.js +2 -2
  3. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/_sha2.js +1 -1
  4. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/hmac.js +1 -1
  5. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/pbkdf2.js +1 -1
  6. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/scrypt.js +1 -1
  7. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/sha256.js +1 -1
  8. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/sha512.js +1 -1
  9. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/utils.js +1 -1
  10. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
  11. package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +2 -2
  12. package/bundle/node_modules/@chainsafe/is-ip/lib/is-ip.js +12 -0
  13. package/bundle/node_modules/@chainsafe/is-ip/lib/parse.js +26 -0
  14. package/bundle/node_modules/@chainsafe/is-ip/lib/parser.js +202 -0
  15. package/bundle/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js +1 -1
  16. package/bundle/node_modules/@multiformats/multiaddr/dist/src/constants.js +43 -0
  17. package/bundle/node_modules/@multiformats/multiaddr/dist/src/errors.js +17 -0
  18. package/bundle/node_modules/@multiformats/multiaddr/dist/src/registry.js +245 -0
  19. package/bundle/node_modules/@multiformats/multiaddr/dist/src/utils.js +191 -0
  20. package/bundle/node_modules/@multiformats/multiaddr/dist/src/validation.js +30 -0
  21. package/bundle/node_modules/debug/src/browser.js +1 -1
  22. package/bundle/node_modules/debug/src/common.js +1 -1
  23. package/bundle/node_modules/lodash/lodash.js +5 -5
  24. package/bundle/node_modules/multiformats/dist/src/bases/base.js +12 -9
  25. package/bundle/node_modules/multiformats/dist/src/bytes.js +19 -3
  26. package/bundle/node_modules/multiformats/dist/src/cid.js +371 -0
  27. package/bundle/node_modules/multiformats/dist/src/hashes/digest.js +62 -0
  28. package/bundle/node_modules/multiformats/dist/src/varint.js +15 -0
  29. package/bundle/node_modules/multiformats/dist/src/vendor/varint.js +78 -0
  30. package/bundle/node_modules/uint8arrays/dist/src/concat.js +20 -0
  31. package/bundle/node_modules/uint8arrays/dist/src/to-string.js +19 -0
  32. package/bundle/node_modules/uint8arrays/dist/src/util/as-uint8array.js +9 -0
  33. package/bundle/packages/core/dist/lib/connection_manager/connection_manager.js +1 -3
  34. package/bundle/packages/proto/dist/generated/filter.js +2 -0
  35. package/bundle/packages/proto/dist/generated/filter_v2.js +2 -0
  36. package/bundle/packages/proto/dist/generated/light_push.js +2 -0
  37. package/bundle/packages/proto/dist/generated/message.js +2 -0
  38. package/bundle/packages/proto/dist/generated/metadata.js +2 -0
  39. package/bundle/packages/proto/dist/generated/peer_exchange.js +2 -0
  40. package/bundle/packages/proto/dist/generated/sds_message.js +2 -0
  41. package/bundle/packages/proto/dist/generated/store_v3.js +2 -0
  42. package/bundle/packages/proto/dist/generated/topic_only_message.js +2 -0
  43. package/dist/.tsbuildinfo +1 -1
  44. package/dist/codec.test-utils.d.ts +1 -1
  45. package/dist/contract/test-setup.d.ts +1 -1
  46. package/dist/keystore/credential_validation_generated.d.ts +0 -2
  47. package/dist/keystore/keystore_validation_generated.d.ts +0 -2
  48. package/package.json +1 -1
  49. package/bundle/node_modules/@multiformats/multiaddr/dist/src/convert.js +0 -15
  50. package/bundle/node_modules/@multiformats/multiaddr/dist/src/multiaddr.js +0 -21
  51. package/bundle/node_modules/@multiformats/multiaddr/dist/src/protocols-table.js +0 -92
@@ -1,8 +1,6 @@
1
1
  export declare const Keystore: typeof validate11;
2
2
  declare function validate11(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
3
3
  instancePath?: string | undefined;
4
- parentData: any;
5
- parentDataProperty: any;
6
4
  rootData?: any;
7
5
  }): boolean;
8
6
  export {};
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@waku/rln","version":"0.1.6-4997440.0","description":"RLN (Rate Limiting Nullifier) implementation for Waku","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"type":"module","homepage":"https://github.com/waku-org/js-waku/tree/master/packages/rln#readme","repository":{"type":"git","url":"https://github.com/waku-org/js-waku.git"},"bugs":{"url":"https://github.com/waku-org/js-waku/issues"},"license":"MIT OR Apache-2.0","keywords":["waku","rln","rate-limiting","privacy","web3"],"scripts":{"build":"run-s build:**","build:copy":"mkdir -p dist/resources && cp -r src/resources/* dist/resources/","build:esm":"tsc","build:bundle":"rollup --config rollup.config.js","fix":"run-s fix:*","fix:lint":"eslint src *.js --fix","check":"run-s check:*","check:tsc":"tsc -p tsconfig.dev.json","check:lint":"eslint \"src/!(resources)/**/*.{ts,js}\" *.js","check:spelling":"cspell \"{README.md,src/**/*.ts}\"","test":"NODE_ENV=test run-s test:*","test:browser":"karma start karma.conf.cjs","watch:build":"tsc -p tsconfig.json -w","watch:test":"mocha --watch","prepublish":"npm run build","reset-hard":"git clean -dfx -e .idea && git reset --hard && npm i && npm run build"},"engines":{"node":">=20"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.2.3","@types/chai":"^5.0.1","@types/chai-spies":"^1.0.6","@waku/interfaces":"0.0.31-4997440.0","@types/deep-equal-in-any-order":"^1.0.4","@types/lodash":"^4.17.15","@types/sinon":"^17.0.3","@waku/build-utils":"^1.0.0","@waku/message-encryption":"0.0.34-4997440.0","deep-equal-in-any-order":"^2.0.6","fast-check":"^3.23.2","rollup-plugin-copy":"^3.5.0"},"files":["dist","bundle","src/**/*.ts","!**/*.spec.*","!**/*.json","CHANGELOG.md","LICENSE","README.md"],"dependencies":{"@chainsafe/bls-keystore":"3.0.0","@waku/core":"0.0.36-4997440.0","@waku/utils":"0.0.24-4997440.0","@noble/hashes":"^1.2.0","@waku/zerokit-rln-wasm":"^0.0.13","ethereum-cryptography":"^3.1.0","ethers":"^5.7.2","lodash":"^4.17.21","uuid":"^11.0.5","chai":"^5.1.2","chai-as-promised":"^8.0.1","chai-spies":"^1.1.0","chai-subset":"^1.6.0","sinon":"^19.0.2"}}
1
+ {"name":"@waku/rln","version":"0.1.6-4c18ca2.0","description":"RLN (Rate Limiting Nullifier) implementation for Waku","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"type":"module","homepage":"https://github.com/waku-org/js-waku/tree/master/packages/rln#readme","repository":{"type":"git","url":"https://github.com/waku-org/js-waku.git"},"bugs":{"url":"https://github.com/waku-org/js-waku/issues"},"license":"MIT OR Apache-2.0","keywords":["waku","rln","rate-limiting","privacy","web3"],"scripts":{"build":"run-s build:**","build:copy":"mkdir -p dist/resources && cp -r src/resources/* dist/resources/","build:esm":"tsc","build:bundle":"rollup --config rollup.config.js","fix":"run-s fix:*","fix:lint":"eslint src *.js --fix","check":"run-s check:*","check:tsc":"tsc -p tsconfig.dev.json","check:lint":"eslint \"src/!(resources)/**/*.{ts,js}\" *.js","check:spelling":"cspell \"{README.md,src/**/*.ts}\"","test":"NODE_ENV=test run-s test:*","test:browser":"karma start karma.conf.cjs","watch:build":"tsc -p tsconfig.json -w","watch:test":"mocha --watch","prepublish":"npm run build","reset-hard":"git clean -dfx -e .idea && git reset --hard && npm i && npm run build"},"engines":{"node":">=22"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.2.3","@types/chai":"^5.0.1","@types/chai-spies":"^1.0.6","@waku/interfaces":"0.0.31-4c18ca2.0","@types/deep-equal-in-any-order":"^1.0.4","@types/lodash":"^4.17.15","@types/sinon":"^17.0.3","@waku/build-utils":"^1.0.0","@waku/message-encryption":"0.0.34-4c18ca2.0","deep-equal-in-any-order":"^2.0.6","fast-check":"^3.23.2","rollup-plugin-copy":"^3.5.0"},"files":["dist","bundle","src/**/*.ts","!**/*.spec.*","!**/*.json","CHANGELOG.md","LICENSE","README.md"],"dependencies":{"@chainsafe/bls-keystore":"3.0.0","@waku/core":"0.0.36-4c18ca2.0","@waku/utils":"0.0.24-4c18ca2.0","@noble/hashes":"^1.2.0","@waku/zerokit-rln-wasm":"^0.0.13","ethereum-cryptography":"^3.1.0","ethers":"^5.7.2","lodash":"^4.17.21","uuid":"^11.0.5","chai":"^5.1.2","chai-as-promised":"^8.0.1","chai-spies":"^1.1.0","chai-subset":"^1.6.0","sinon":"^19.0.2"}}
@@ -1,15 +0,0 @@
1
- import '../../../../multiformats/dist/src/bases/base32.js';
2
- import '../../../../multiformats/dist/src/bases/base58.js';
3
- import { bases } from '../../../../multiformats/dist/src/basics.js';
4
- import '../../../../multiformats/dist/src/bases/base36.js';
5
- import { getProtocol } from './protocols-table.js';
6
-
7
- getProtocol('ip4');
8
- getProtocol('ip6');
9
- getProtocol('ipcidr');
10
- const decoders = Object.values(bases).map((c) => c.decoder);
11
- ((function () {
12
- let acc = decoders[0].or(decoders[1]);
13
- decoders.slice(2).forEach((d) => (acc = acc.or(d)));
14
- return acc;
15
- }))();
@@ -1,21 +0,0 @@
1
- import '../../../../multiformats/dist/src/bases/base58.js';
2
- import '../../../../multiformats/dist/src/bases/base32.js';
3
- import '../../../../multiformats/dist/src/bases/base36.js';
4
- import '../../../../multiformats/dist/src/bases/base10.js';
5
- import '../../../../multiformats/dist/src/bases/base16.js';
6
- import '../../../../multiformats/dist/src/bases/base2.js';
7
- import '../../../../multiformats/dist/src/bases/base256emoji.js';
8
- import '../../../../multiformats/dist/src/bases/base64.js';
9
- import '../../../../multiformats/dist/src/bases/base8.js';
10
- import '../../../../multiformats/dist/src/bases/identity.js';
11
- import '../../../../multiformats/dist/src/codecs/json.js';
12
- import './convert.js';
13
- import { getProtocol } from './protocols-table.js';
14
-
15
- /* eslint-disable complexity */
16
- [
17
- getProtocol('dns').code,
18
- getProtocol('dns4').code,
19
- getProtocol('dns6').code,
20
- getProtocol('dnsaddr').code
21
- ];
@@ -1,92 +0,0 @@
1
- const V = -1;
2
- const names = {};
3
- const codes = {};
4
- const table = [
5
- [4, 32, 'ip4'],
6
- [6, 16, 'tcp'],
7
- [33, 16, 'dccp'],
8
- [41, 128, 'ip6'],
9
- [42, V, 'ip6zone'],
10
- [43, 8, 'ipcidr'],
11
- [53, V, 'dns', true],
12
- [54, V, 'dns4', true],
13
- [55, V, 'dns6', true],
14
- [56, V, 'dnsaddr', true],
15
- [132, 16, 'sctp'],
16
- [273, 16, 'udp'],
17
- [275, 0, 'p2p-webrtc-star'],
18
- [276, 0, 'p2p-webrtc-direct'],
19
- [277, 0, 'p2p-stardust'],
20
- [280, 0, 'webrtc-direct'],
21
- [281, 0, 'webrtc'],
22
- [290, 0, 'p2p-circuit'],
23
- [301, 0, 'udt'],
24
- [302, 0, 'utp'],
25
- [400, V, 'unix', false, true],
26
- // `ipfs` is added before `p2p` for legacy support.
27
- // All text representations will default to `p2p`, but `ipfs` will
28
- // still be supported
29
- [421, V, 'ipfs'],
30
- // `p2p` is the preferred name for 421, and is now the default
31
- [421, V, 'p2p'],
32
- [443, 0, 'https'],
33
- [444, 96, 'onion'],
34
- [445, 296, 'onion3'],
35
- [446, V, 'garlic64'],
36
- [448, 0, 'tls'],
37
- [449, V, 'sni'],
38
- [460, 0, 'quic'],
39
- [461, 0, 'quic-v1'],
40
- [465, 0, 'webtransport'],
41
- [466, V, 'certhash'],
42
- [477, 0, 'ws'],
43
- [478, 0, 'wss'],
44
- [479, 0, 'p2p-websocket-star'],
45
- [480, 0, 'http'],
46
- [481, V, 'http-path'],
47
- [777, V, 'memory']
48
- ];
49
- // populate tables
50
- table.forEach(row => {
51
- const proto = createProtocol(...row);
52
- codes[proto.code] = proto;
53
- names[proto.name] = proto;
54
- });
55
- function createProtocol(code, size, name, resolvable, path) {
56
- return {
57
- code,
58
- size,
59
- name,
60
- resolvable: Boolean(resolvable),
61
- path: Boolean(path)
62
- };
63
- }
64
- /**
65
- * For the passed proto string or number, return a {@link Protocol}
66
- *
67
- * @example
68
- *
69
- * ```js
70
- * import { protocol } from '@multiformats/multiaddr'
71
- *
72
- * console.info(protocol(4))
73
- * // { code: 4, size: 32, name: 'ip4', resolvable: false, path: false }
74
- * ```
75
- */
76
- function getProtocol(proto) {
77
- if (typeof proto === 'number') {
78
- if (codes[proto] != null) {
79
- return codes[proto];
80
- }
81
- throw new Error(`no protocol with code: ${proto}`);
82
- }
83
- else if (typeof proto === 'string') {
84
- if (names[proto] != null) {
85
- return names[proto];
86
- }
87
- throw new Error(`no protocol with name: ${proto}`);
88
- }
89
- throw new Error(`invalid protocol id type: ${typeof proto}`);
90
- }
91
-
92
- export { codes, createProtocol, getProtocol, names, table };