@waku/interfaces 0.0.17 → 0.0.19

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file.
5
5
  The file is maintained by [Release Please](https://github.com/googleapis/release-please) based on [Conventional Commits](https://www.conventionalcommits.org) specification,
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.19](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.18...interfaces-v0.0.19) (2023-10-16)
9
+
10
+
11
+ ### ⚠ BREAKING CHANGES
12
+
13
+ * **static-sharding:** allow multiple pubSubTopics ([#1586](https://github.com/waku-org/js-waku/issues/1586))
14
+ * return `REMOTE_PEER_REJECTED` if remote peer rejected the message
15
+
16
+ ### Features
17
+
18
+ * Return `REMOTE_PEER_REJECTED` if remote peer rejected the message ([053b654](https://github.com/waku-org/js-waku/commit/053b6545ad0c2450af5687495eb7b6049c0f21ad))
19
+ * **static-sharding:** Allow multiple pubSubTopics ([#1586](https://github.com/waku-org/js-waku/issues/1586)) ([a3c45b6](https://github.com/waku-org/js-waku/commit/a3c45b6e1a9beae488cae3c71c48949fa47bcaf6))
20
+ * **static-sharding:** Filter peer connections per shards ([#1626](https://github.com/waku-org/js-waku/issues/1626)) ([124a29e](https://github.com/waku-org/js-waku/commit/124a29ebba59c05fbbf199d969e6ba3f9e57d45b))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * Catch stream creation promise rejection for `lightPush.send` ([b696a89](https://github.com/waku-org/js-waku/commit/b696a8957211bf20577f419a207a23ceca03d23f))
26
+
27
+ ## [0.0.18](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.17...interfaces-v0.0.18) (2023-09-11)
28
+
29
+
30
+ ### ⚠ BREAKING CHANGES
31
+
32
+ * set peer-exchange with default bootstrap ([#1469](https://github.com/waku-org/js-waku/issues/1469))
33
+ * refactor store protocol for readability ([#1456](https://github.com/waku-org/js-waku/issues/1456))
34
+ * remove filter v1 ([#1433](https://github.com/waku-org/js-waku/issues/1433))
35
+ * upgrade to libp2p@0.45 ([#1400](https://github.com/waku-org/js-waku/issues/1400))
36
+ * filter v2 ([#1332](https://github.com/waku-org/js-waku/issues/1332))
37
+ * add and implement IReceiver ([#1219](https://github.com/waku-org/js-waku/issues/1219))
38
+
39
+ ### Features
40
+
41
+ * Add 1MB restriction to LightPush and Relay ([#1351](https://github.com/waku-org/js-waku/issues/1351)) ([72f97d4](https://github.com/waku-org/js-waku/commit/72f97d4545512f92936b1a9b50fa0b53f8603f9d))
42
+ * Add and implement IReceiver ([#1219](https://github.com/waku-org/js-waku/issues/1219)) ([e11e5b4](https://github.com/waku-org/js-waku/commit/e11e5b4870aede7813b3ee4b60f5e625f6eac5a2))
43
+ * Allow passing of multiple ENR URLs to DNS Discovery & dial multiple peers in parallel ([#1379](https://github.com/waku-org/js-waku/issues/1379)) ([f32d7d9](https://github.com/waku-org/js-waku/commit/f32d7d9fe0b930b4fa9c46b8644e6d21be45d5c1))
44
+ * ConnectionManager extends EventEmitter & exposed on the Waku interface (& minor improvements) ([#1447](https://github.com/waku-org/js-waku/issues/1447)) ([0b8936f](https://github.com/waku-org/js-waku/commit/0b8936f1f1ad33f6cb90eb88d027a19e787ae7a2))
45
+ * **dns-discovery:** Set default for `NodeRequirements` ([#1466](https://github.com/waku-org/js-waku/issues/1466)) ([aab9c08](https://github.com/waku-org/js-waku/commit/aab9c08caefb9f72460261ec0c38df88ae0f02ce))
46
+ * Enable event emission for peer discovery/connection in ConnectionManager ([#1438](https://github.com/waku-org/js-waku/issues/1438)) ([6ce898d](https://github.com/waku-org/js-waku/commit/6ce898d77132f30b5d8f33b48c7f6276992a486e))
47
+ * Expose `meta` on `IDecodedMessage` ([5724bb2](https://github.com/waku-org/js-waku/commit/5724bb2b21367e4e397acbc5530b3a2bf315194e))
48
+ * Filter v2 ([#1332](https://github.com/waku-org/js-waku/issues/1332)) ([8d0e647](https://github.com/waku-org/js-waku/commit/8d0e64796695fbafad0a033552eb4412bdff3d78))
49
+ * Set peer-exchange with default bootstrap ([#1469](https://github.com/waku-org/js-waku/issues/1469)) ([81a52a8](https://github.com/waku-org/js-waku/commit/81a52a8097ba948783c9d798ba362af0f27e1c10))
50
+ * ToSubscriptionIterator impl for IReceiver ([#1307](https://github.com/waku-org/js-waku/issues/1307)) ([7daa9d0](https://github.com/waku-org/js-waku/commit/7daa9d05bf44b33296b56df214f5d5901887a129))
51
+ * Upgrade to libp2p@0.45 ([#1400](https://github.com/waku-org/js-waku/issues/1400)) ([420e6c6](https://github.com/waku-org/js-waku/commit/420e6c698dd8f44d40d34e47d876da5d2e1ce85e))
52
+
53
+
54
+ ### Miscellaneous Chores
55
+
56
+ * Refactor store protocol for readability ([#1456](https://github.com/waku-org/js-waku/issues/1456)) ([2389977](https://github.com/waku-org/js-waku/commit/2389977a9840281dff4008c015fe76451c0f0df5))
57
+ * Remove filter v1 ([#1433](https://github.com/waku-org/js-waku/issues/1433)) ([d483644](https://github.com/waku-org/js-waku/commit/d483644a4bb4350df380719b9bcfbdd0b1439482))
58
+
8
59
  ## [0.0.17](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.16...interfaces-v0.0.17) (2023-08-02)
9
60
 
10
61
 
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/multiformats/dist/types/src/bases/interface.d.ts","../../../node_modules/multiformats/dist/types/src/block/interface.d.ts","../../../node_modules/multiformats/dist/types/src/hashes/interface.d.ts","../../../node_modules/multiformats/dist/types/src/link/interface.d.ts","../../../node_modules/multiformats/dist/types/src/cid.d.ts","../../../node_modules/@libp2p/interface/dist/src/peer-id/index.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/peer-store/index.d.ts","../../../node_modules/@libp2p/interfaces/dist/src/events.d.ts","../src/connection_manager.ts","../src/dns_discovery.ts","../../../node_modules/@libp2p/interface/dist/src/peer-info/index.d.ts","../src/enr.ts","../src/misc.ts","../src/message.ts","../../../node_modules/it-stream-types/dist/src/index.d.ts","../../../node_modules/uint8arraylist/dist/src/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/connection/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/content-routing/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/events.d.ts","../../../node_modules/@libp2p/interface/dist/src/keys/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/keychain/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/metrics/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/peer-routing/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/startable.d.ts","../../../node_modules/@libp2p/interface/dist/src/stream-handler/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/topology/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/stream-muxer/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/transport/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-internal/dist/src/transport-manager/index.d.ts","../../../node_modules/libp2p/dist/src/address-manager/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/connection-gater/index.d.ts","../../../node_modules/@libp2p/interface-internal/dist/src/address-manager/index.d.ts","../../../node_modules/@libp2p/peer-collections/dist/src/map.d.ts","../../../node_modules/@libp2p/peer-collections/dist/src/set.d.ts","../../../node_modules/@libp2p/peer-collections/dist/src/list.d.ts","../../../node_modules/@libp2p/peer-collections/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-internal/dist/src/connection-manager/index.d.ts","../../../node_modules/@libp2p/interface-internal/dist/src/registrar/index.d.ts","../../../node_modules/multiformats/dist/types/src/codecs/interface.d.ts","../../../node_modules/multiformats/dist/types/src/interface.d.ts","../../../node_modules/multiformats/dist/types/src/hashes/digest.d.ts","../../../node_modules/multiformats/dist/types/src/hashes/hasher.d.ts","../../../node_modules/multiformats/dist/types/src/varint.d.ts","../../../node_modules/multiformats/dist/types/src/bytes.d.ts","../../../node_modules/multiformats/dist/types/src/index.d.ts","../../../node_modules/multiformats/dist/types/src/codecs/raw.d.ts","../../../node_modules/multiformats/dist/types/src/codecs/json.d.ts","../../../node_modules/multiformats/dist/types/src/bases/base.d.ts","../../../node_modules/multiformats/dist/types/src/basics.d.ts","../../../node_modules/uint8arrays/dist/src/util/bases.d.ts","../../../node_modules/uint8arrays/dist/src/to-string.d.ts","../../../node_modules/interface-datastore/dist/src/key.d.ts","../../../node_modules/interface-store/dist/src/index.d.ts","../../../node_modules/interface-datastore/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/components.d.ts","../../../node_modules/libp2p/dist/src/connection-manager/auto-dial.d.ts","../../../node_modules/libp2p/dist/src/connection-manager/connection-pruner.d.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/p-queue/dist/queue.d.ts","../../../node_modules/p-queue/dist/options.d.ts","../../../node_modules/p-queue/dist/priority-queue.d.ts","../../../node_modules/p-queue/dist/index.d.ts","../../../node_modules/libp2p/dist/src/connection-manager/dial-queue.d.ts","../../../node_modules/libp2p/dist/src/connection-manager/index.d.ts","../../../node_modules/libp2p/dist/src/transport-manager.d.ts","../../../node_modules/@libp2p/interface/dist/src/connection-encrypter/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/peer-discovery/index.d.ts","../../../node_modules/@libp2p/keychain/dist/src/index.d.ts","../../../node_modules/@libp2p/peer-store/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/index.d.ts","../src/protocols.ts","../src/receiver.ts","../src/filter.ts","../src/sender.ts","../src/light_push.ts","../src/peer_exchange.ts","../../../node_modules/@libp2p/logger/dist/src/index.d.ts","../../../node_modules/protobufjs/index.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.d.ts","../../../node_modules/it-pushable/dist/src/index.d.ts","../../../node_modules/@libp2p/interface/dist/src/pubsub/index.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message-cache.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-stats.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.d.ts","../../../node_modules/denque/index.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/metrics.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/utils/set.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/tracer.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/config.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/stream.d.ts","../../../node_modules/protobufjs/minimal.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/decodeRpc.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.d.ts","../src/relay.ts","../src/store.ts","../../../node_modules/protons-runtime/dist/src/codec.d.ts","../../../node_modules/protons-runtime/dist/src/decode.d.ts","../../../node_modules/protons-runtime/dist/src/encode.d.ts","../../../node_modules/protons-runtime/dist/src/codecs/enum.d.ts","../../../node_modules/protons-runtime/dist/src/codecs/message.d.ts","../../../node_modules/protons-runtime/dist/src/utils.d.ts","../../../node_modules/protons-runtime/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/identify/pb/message.d.ts","../../../node_modules/libp2p/dist/src/identify/index.d.ts","../../../node_modules/libp2p/dist/src/ping/index.d.ts","../src/libp2p.ts","../src/waku.ts","../src/keep_alive_manager.ts","../src/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc",{"version":"0075fa5ceda385bcdf3488e37786b5a33be730e8bc4aa3cf1e78c63891752ce8","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"bc496ef4377553e461efcf7cc5a5a57cf59f9962aea06b5e722d54a36bf66ea1","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"683889752b7c95fffd073b82ea76d36b3fe548ef3bb9887eb903676eabd676ff","6bb42cbe99c20c8a6f816ce876524a0312dc4f703dfd8d9aa5fd8810b35d31e4","f196d5ed4194259ffb797a34001a5edb7a165cd110dc3e4d8f03f11e3531fe9b","869e21e461b24bb47689e264cec456db0a1c1462e7100c738be7688071d690bf","671efcb4cb21897b43dec53d0218afcac3d1e13c7d50158b0c1a0b300acdb69e","a884051a029dc34c400dc1dbad39a878935d37ebbea62d357d17b25f0076b578","5212dd78d1d63ab33332c8846a0ea5ce248159e74033cde16de48373036b4704","d71577e78c7a4257074aaf82f595724175210c89e8b467ef82f949a6cbd891bc","7bc7a347a64a3502c300d5a0adb10ec871ae3ad4f118c52529f624769b5f8e6f","1667ee69895dc51300d4f15e584729b758fcf2be4c378f901533c992024af7c8","2aa7c0830c012225c929a525fe2c37d2e5e73ae064f03ee20b8804feb5bb068b",{"version":"c96c8c4f8d1b53dda527afbe1efaa198d5ad1cac1d775276301268f96447bdf6","signature":"a01358d6c8a2650d3a37b7ab46f094314334cc5ba8e3c95d1638f8eefb17def7"},{"version":"4093d8ac54bc850b1608efccfe9cddb6e87d67e5b1146976a9b038654db776e5","signature":"767e616fb07287dfce56cef40cd2da2d95c1ff7da6766a01d3db2727a48b480e"},"2cd3b80c4762701c0faffcfaa6f9ba62ab7142260eb2de1b9d1c16f79279fe98",{"version":"c7f775591647d61e4467514940f28a461aa3b4568b9fce65df0316383748a55b","signature":"26588688d35614421598ceaa1cee9ffcd94de302df9c6486a6fe6d955f432fe6"},{"version":"ee0c7158fa49143fe0bbc9a1f96ebdb824c0f144baf4b58b7b63ac71fdc929d7","signature":"dbd6959b739551aca3c6f93f51647a13ac09111cd6d42b87ccc6d6dcc8e4b0d9"},{"version":"ed9edc7b0a697dbf7b4b29d7363921ec28a5efd3dfa83e6dab7a00d996056701","signature":"ba1e38228afae1ccd785bde979bae278af656f4f3da0e6f6f0170c4ebf0a6757"},"c84146dbc9d2e5f43d2cbf15485a4eabf90219dbb66c0d481f20f12d3851bffc","176f19f35d1cfa16aa7e3d7a2cf36c01431d256901163b8e9a3e628b315bbb0d","b41a3bfc6e2c39ba7a81295965e85f6c5bca0deff2451dff1c2266070d512396","7cd8af5d325bceedc698f43a6303839cedfb01109c2b9a9a711782aa69eea7ae","2aa7c0830c012225c929a525fe2c37d2e5e73ae064f03ee20b8804feb5bb068b","87725787eb3a35c26ad48a9e9eeaf3b17270612ebaef5259442501b71ff56dee","1c47fd9df081bbc5ee6ec531ea1763613438b8379a3b21d826089d88c37fd7d3","1e4448f4c023c725aa7b44c3d09c84595cff1ba9e2e256311b4500df57573e35","b64e89450fb83cf7e8e32eb5ffdf7960bd71e40047e0818c2ad8b0aad5ac758a","d6fd2b60c72d94f260741967579d6ffa20d7585ad53282f5d83623761df36a38","85786f052b5dcd0b36564b657a9aea3e80f1fd0e76e4606a4400ec21928892c1","b4b0b688d26d1ae58fc922ae28849dd2a390f6fba8c85189753c0cd5f313cdae","81434e23e4fd973c225f20c160a7e129c98edaaaef3a3c1458ffc70647009516","85c2bb8c647a51021635c0847186d8cdd97bcc5b0973056c900fabb138e109aa","3e73bdc7b31ad8c6e2f34567ce93b43ac7e2a244249b070bc541811f0ec99d5c","bb67aacb028d577b5cd05f5a5571d5bb673438f7982fbb014914c027eebb41c7","c7a4bc5b52a0eaf5d10f23c9b99028b92049586bcc43e5d62c50d4f1c5d6a4e2","d395a624935584352acd2b80c9341aed77bfe3240f7f4f4d154cb9973f9e7ec6","6b6be2a5e228e84df3e06ec8255df6cfeaea8b56c77f983a18f7412aa3dd8919","83a1426ac1a9cf144141dfe10d71a68629623a7c28245c9ca0e0352bead501fd","2726c0a6a4a87fad11e6846e6b0b40b8924fbe66340adc512093c4273bc53e4e","c888daaa99fdf6c5712d98605fdcf21cbbaab756a629661a44cac44ede464d37","206bab3a2affada92f8eb6ba8b90411cfdb572dae254e27d9fad61171d71960b","4955c08d2af1f4fdeaa32a3f52b51853444269391fdc4e88874df9855d499593","def82d7f3ae543845879a906469de52e42f816197603751382805c572d0de3f4","5b3714bd84ba057f1be3beb9cf273d3c718376ac9b202e16b0fffe125325a095","557b8c7481296f4b7ed362320f3bbb40bb87404edf880c81224f365a8d1e17f3","467a7c09abfde00a7fc41d06c1c599f01e944c9f4948d38a0bde82b766a7e364","7697d44896d7082a0195b088b1a5c49bb70aea87721448982bee34720cfa73f4","77c738b0671d324f6cb2c7c1d7dfc0282a5836c67af55c9ba6df315c62207f57","f2dc47a6b115cd100153d2aaa3dbec094e7a55c5e471c9df8cf7fd651925d63f","2d57b5c1d1ef4cf78480539c0e0650af78ccf387d95f0585b12dbd658691a30f","88de5467cd5e4c2c1384629806d56ac1215657bddf39ef9f60a0e05beee2b131","ff5820394809bfc32a7e4586ff11b3c07327a0f4c756709aef92f1cd73d6da48","bfe2af20f3ff0579331661ef4c5d2597e0c31a7a0d760e41eaff0502bf064c4d","f52a0e53f79d7fd1c1c55a3cbda59499d4cce75f3188969024cdc286b29ad3ea","e2dd36a524ea5b13de1ed104ede9cea79696588175c1df1940d6a29113a4aee0","a878d4c7237a7af50e96534295fcf723134d70cbb1e9bfd8365266b912aee6ec","8970ab047d89c71edf9973609dd62f61bb366abeabbff36a1200103b6c1c605b","36d756189d9295e3a964e5cd45cb8ac965d5d2ada53ed848e08608426c146d69","8bdb5c16e8b9ba625ec08d8189879a6fb47b2c3c458a5d43ebd53a8763b5712e","2ea008f3c6f799004f9d9c9dec4b868a4534159d7d586f797720f50381f49727","9ce0498518bc48d7e8f676452f6a8685c38393c90fac0df4befb58108a1cddda","a11c8babe419eaf805939cfe03e779a42cf6949bac6222ac5ef40da12f95de47","27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","a77fbecee25688f568e18b43f8f54195d6c278a2a9a687ada5ab3d2f726524eb","e29f2b3a93ca3392fe29fa8e7b93985e854b44fe28e2b5c113f08296095bd6b7","d27956c8b392088a06d882e1edb58aab4d5cf5ab1229b73f99329ab21f352147","d643518d0b08b3d8d6e7f1fa884bca57ef95caaa1c312abbd9e1d4ed0d51c370","ed031ba502b7c6e5728eedaad24affae08ff6c5cb7b7a693d0f2c2eb989d6475","679e508f8631ed26cc44de55c4fa1380fc6e1138ba25b6059400aecce3ea2885","7dd62326bcdcfa8c572b6fea5dc7621875ecbf5654036433fa1617898468cd69","5a6201b07effdabd694cb7ecce715f3684d51cdbf79fc6d465a689c083ee0e26","6dec7d4b8af96b4936fec4a7a76fc70b0481dac7b6fc89bd516ab79c21a2cf37","e99c8be1d9a00f8ed88e6ec776ceacd38154772319afbda4ff3d50a5a931c3c1","89448fbf5e1b96d1139cb6f278ff48e772263280889dacf10b8dcdab395452db","c1536bc8b25b55c40185804643a85e14e95496028e060301daa956a1b32eff89",{"version":"c607f1d231645f3f58e2ba181f61762683e19651de74b585ef4b4a6aa681a470","signature":"1ebcc10fb1bde3a49d8dd9ae975b3f5a477098fa28fe7628858cff66ff4f5353"},{"version":"49f2358b171aa212b367bfd25d89b22ccb35fb2c913efc8aa6f4294007cd5ecb","signature":"d1b7ead0191be98267d23d8c388150ca5a8df9b8b6aba0138e1b3e29537542ea"},{"version":"ce1c7c474b5ff71cf44d32ac94b1190175c3ed5862bd348ae9a533e746c3d32b","signature":"6e19eefe82bbaa01d499588f5405b3cb912f9dfcf253b2b209d60ef5d1f203f0"},{"version":"fcdcc439def25506ab770e638d432093b166dd52ee0e30bf0ccc562bf3990812","signature":"ff80f1684384d2efb41a5acec11d1d5d8e1fb7df9a0b63ed4077eb1d617c65d3"},{"version":"72df637760ccc72a241e13520236241eb3072bf5125bdbb4b41555f9457c8f0a","signature":"d3b20e1147265f4e5ff52cfd0984d929a215182fe1099e08e5a37de388708935"},{"version":"d676098ed59e5063e001db24199fc665582db6f73bea5f7b414bd8c68dcdbb39","signature":"cfec24e56862ecb9f5e1d7ba0fd020e032984826ac0e36d954ac3b6cf4ff0e34"},"97030b9c029efb982a7ffa9cfbfa7dc80353f2d6c4f03676a7d04e3811f278b8","688c9dfd2b7114f5f01022abb5b179659f990d5af5924f185c2644ca99fe7b77","925a8770415572378b7b62dcd714e744b7ffed86de59bdbe1d25c68d9d1f7f51","5af3aae727d37689c2ba38173d6e68b3bca8fb0e2a1faa24a2e4eee45313970e","020b684c620461753ab74b5c1d36c39030045242305161443e89c5f4c6e02861","444fd02034dcb14575c1d65b39678654508784d34c4d66d6631b54bb6aa24d21","d4936633d5453e441ad5ab182efad46a0e1285fe5f9f5c2948cad3e71b7c2c23","7378c8a8eb3feec7b36b268d55794b625a77f1a3a4d075932425fd263aadd8c2","a1b60bd2328318dcbec30bdf529dad31a13315ff2df60c8bd71630c58a575b06","5d11703e2c5d4dbe00bbe79f3bc864d178cf8d6ebccc2d1448ea29e93654f029","92aabe63a01fe06680e7e49775d5a66524f4816d49490af8e82330e5aeff91fd","ed849d616865076f44a41c87f27698f7cdf230290c44bafc71d7c2bc6919b202","5c2862817a9073efcdc8608cb171525067c4a7afd82f2cd800bf208104085234","626a82c4bd44767fb7ab3709a2a7857d43b02b575e7d1678d3d24f889515983c","8f364fec0ef20506aa9cf00b5cd8b620c1c0389687b11a3a32b0b5d4716ad894","dcef5e69bfd584dd4640a8363792acac1f2328767a57f401ee6daa0f281c632a","763bb8df872cbb8783e29e19bd7a1dea0f88f7fd7398343af38be8509a65df82","c286b410193495d067668bcdbd13ea3f3a39001edff02edee248babf2652e563","ba1405da509cc84896a588978efc45400d4f9844ee738d750b59868b1ad1618a","129e03ea345ad2ec480758767408a6119112e1c1d6a454f83524c8590549a949","932cade1c5802123b5831f332ad8a6297f0f7d14d0ee04f5a774408f393e2200","1165dc3daad62e737ee6c7016470a4a9a4c751be9f47da494a718a0b428bfe49","1969a7f95125132dd513d57d726f4a645270bbe2c4036ae23231f6fe916b0bd3",{"version":"bb38fe371919a121250a5b830a4ee6dcdde83ff574d0ba384e827994463c91e9","signature":"15bb3762d68705887d7e68133edb2d7fc1dbd5b8e776f38ede3c2c55b17aaa75"},{"version":"3705aeef3480347a04be9de7cd603ed082ea3343e4cec023d13b7772171cd8eb","signature":"f445ba7fc267ed04053607199f51c040e83ad711a5333624a7e4a69ddadc7666"},"fd617cc8eec6f43227ab572160bac9d23c723073e83a9b100bd15c758eff34c2","ec3786b43d68955ecdb12ce679d3bc61b6b25c4d0ac5bcdaf50fa4a746189b98","3155e98b0df0c1523715e8a1c75c8a67c401aeb58d6eccf8bd89d5d775b8c1cf","fa82b7b22d9df87323e31e9e2ad75911028f3e544647fd212424b3c4452fee3f","90aa0b916eef195a17c3dbd621746f82ac7969ecc3dbf27c81ee4c68c5af7f25","7a1b62551b7284b81ff5d24c595f55a49056c6652667e2105abbca822418484d","6c56034a31bed2b7910da7ea2bf605b7cbfb1170134898e9ef31179553c034ee","38440c424965f82feb64288195ea06871aac94fe8d10c9a7983b54665ee033c8","82f8c6834bbcf2b6288f90b7f7cc5b0588518ae6897dabb3bf36df860c65730d","ba136467ca7a8153e8849ee2dad548a390651acd4a2238b861d2d3b3f47f197c",{"version":"dccfe20d7aa4a0041f227fd553f1c0a5616eabcfad5722e024602b0d327aec32","signature":"299fe7964755e788d57f92a1e2679da0db168ecfdf733dbf28e711de8b05d7c8"},{"version":"88be9f8382711e0e4aec0077827b1320319ce6c5222b4d22140a2dc2808bac2f","signature":"562a6317c991ab93bf4278bd30436b8c0fafb08a94dbc01e3997e9959429ca82"},{"version":"9cfa9159b147460a327204a583538a5d6f80a943ae204f0e95c84a79b02ccd00","signature":"09ac11dc22366cb89d815665ca03e3388fe437b270592bce1c1ca7fe3ddaec5d"},"813346dbba15be1455e67c92608bcaac00258fbaca1cecf48c8965e5d9a14672","587f13f1e8157bd8cec0adda0de4ef558bb8573daa9d518d1e2af38e87ecc91f","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"d32f90e6cf32e99c86009b5f79fa50bc750fe54e17137d9bb029c377a2822ee2","affectsGlobalScope":true},"33536b5951667cd5a54b4bea28d3d52aaca1844448258f1281d3843b89ac5895",{"version":"c81c51f43e343b6d89114b17341fb9d381c4ccbb25e0ee77532376052c801ba7","affectsGlobalScope":true},"3dd49afd822c82b63b3905a13e22240f34cf367aea4f4dd0e6564f4bddcb8370","57135ce61976a8b1dadd01bb412406d1805b90db6e8ecb726d0d78e0b5f76050",{"version":"49479e21a040c0177d1b1bc05a124c0383df7a08a0726ad4d9457619642e875a","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","f302f3a47d7758f67f2afc753b9375d6504dde05d2e6ecdb1df50abbb131fc89","93db4c949a785a3dbef7f5e08523be538e468c580dd276178b818e761b3b68cd","5b1c0a23f464f894e7c2b2b6c56df7b9afa60ed48c5345f8618d389a636b2108","be2b092f2765222757c6441b86c53a5ea8dfed47bbc43eab4c5fe37942c866b3","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","1ca735bb3d407b2af4fbee7665f3a0a83be52168c728cc209755060ba7ed67bd",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"6e335a70826a634c5a1a1fa36a2dacbf3712ef2be7a517540ae1de8a1e8ea4f6","affectsGlobalScope":true},"255eb00ff28266f9b35e1b73a19a4451542572b33dc0e78daa6d6e1d1d22f3bf","992e52cd58b975ff089613d4095a316d9c9b63466299f15c9b7cc0249d6d6908","1b0856424524be4d18e41b31506c9640c4786ee68fd9658abdbf27c856f70125","3122a3f1136508a27a229e0e4e2848299028300ffa11d0cdfe99df90c492fe20","42b40e40f2a358cda332456214fad311e1806a6abf3cebaaac72496e07556642","ad8848c289c0b633452e58179f46edccd14b5a0fe90ebce411f79ff040b803e0",{"version":"b748ed8ff77f2c330857f01f385e52f708448b6ff6424415ab0de749fd7bc664","affectsGlobalScope":true},"fe6dba0e8c69f2b244e3da38e53dd2cc9e51b2543e647e805396af73006613f7","5e2b91328a540a0933ab5c2203f4358918e6f0fe7505d22840a891a6117735f1","3abc3512fa04aa0230f59ea1019311fd8667bd935d28306311dccc8b17e79d5d",{"version":"5810080a0da989a944d3b691b7b479a4a13c75947fb538abb8070710baa5ccee","affectsGlobalScope":true},{"version":"72f4a812489dee501c41a085f174e1a843aa78e93dd2af0a6f9ed89f796565c8","affectsGlobalScope":true},"1349077576abb41f0e9c78ec30762ff75b710208aff77f5fdcc6a8c8ce6289dd","e2ce82603102b5c0563f59fb40314cc1ff95a4d521a66ad14146e130ea80d89c","a3e0395220255a350aa9c6d56f882bfcb5b85c19fddf5419ec822cf22246a26d","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","898840e876dfd21843db9f2aa6ae38ba2eab550eb780ff62b894b9fbfebfae6b","8904e5b670bbfc712dda607853de9227206e7dad93ac97109fe30875c5f12b78","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","164deb2409ac5f4da3cd139dbcee7f7d66753d90363a4d7e2db8d8874f272270",{"version":"a54ee34c2cc03ec4bbf0c9b10a08b9f909a21b3314f90a743de7b12b85867cef","affectsGlobalScope":true},{"version":"8a985c7d30aea82342d5017730b546bb2b734fe37a2684ca55d4734deb019d58","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","5bc85813bfcb6907cc3a960fec8734a29d7884e0e372515147720c5991b8bc22","812b25f798033c202baedf386a1ccc41f9191b122f089bffd10fdccce99fba11","993325544790073f77e945bee046d53988c0bc3ac5695c9cf8098166feb82661",{"version":"4d06f3abc2a6aae86f1be39e397372f74fb6e7964f594d645926b4a3419cc15d","affectsGlobalScope":true},{"version":"0e08c360c9b5961ecb0537b703e253842b3ded53151ee07024148219b61a8baf","affectsGlobalScope":true},"2ce2210032ccaff7710e2abf6a722e62c54960458e73e356b6a365c93ab6ca66","5ba5b760345053acdf5beb1a9048ff43a51373f3d87849963779c1711ea7cbcc","16a3080e885ed52d4017c902227a8d0d8daf723d062bec9e45627c6fdcd6699b",{"version":"d19e76b1210879a533e64d687e7c4aa605c7fecaa554fbb6b319d9ae9d0f5164","affectsGlobalScope":true},"1ca6858a0cbcd74d7db72d7b14c5360a928d1d16748a55ecfa6bfaff8b83071b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"13e851ee5f3dad116583e14e9d3f4aaf231194bbb6f4b969dc7446ae98a3fa73",{"version":"677646e2620795c98a539fb12fb531f10331c217cef1492132b2518f894fa92d","affectsGlobalScope":true}],"root":[70,71,[73,75],[133,138],162,163,[174,177]],"options":{"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"module":7,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[224],[64,68,80,99,100,139,141,143,144,145,152,155,156,157,158,160,224],[141,144,224],[141,159,224],[140,224],[141,143,144,147,224],[146,148,224],[146,147,154,224],[150,224],[144,146,148,149,151,152,153,224],[144,224],[77,78,224],[144,152,224],[64,67,81,141,143,224],[67,224],[64,67,78,90,98,224],[78,224],[67,78,89,224],[64,76,224],[64,67,78,224],[64,67,76,77,90,224],[63,72,90,224],[64,67,68,72,78,79,80,82,83,84,85,86,87,89,224],[59,64,81,224],[72,80,224],[61,63,224],[64,67,224],[64,72,90,224],[64,77,78,80,142,224],[76,77,78,90,224],[64,78,224],[67,78,80,88,90,224],[64,81,82,116,224],[95,96,97,224],[64,224],[64,67,68,80,90,116,224],[65,66,224],[178,224],[181,224],[182,187,215,224],[183,194,195,202,212,223,224],[183,184,194,202,224],[185,224],[186,187,195,203,224],[187,212,220,224],[188,190,194,202,224],[189,224],[190,191,224],[194,224],[192,194,224],[194,195,196,212,223,224],[194,195,196,209,212,215,224],[224,228],[190,194,197,202,212,223,224],[194,195,197,198,202,212,220,223,224],[197,199,212,220,223,224],[178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230],[194,200,224],[201,223,224,228],[190,194,202,212,224],[203,224],[204,224],[181,205,224],[206,222,224,228],[207,224],[208,224],[194,209,210,224],[209,211,224,226],[182,194,212,213,214,215,224],[182,212,214,224],[212,213,224],[215,224],[216,224],[181,212,224],[194,218,219,224],[218,219,224],[187,202,212,220,224],[221,224],[202,222,224],[182,197,208,223,224],[187,224],[212,224,225],[201,224,226],[224,227],[182,187,194,196,205,212,223,224,226,228],[212,224,229],[114,115,224],[113,224],[64,67,68,80,90,91,224],[64,68,78,79,80,83,84,85,89,90,91,93,94,99,100,116,224],[68,80,85,90,99,224],[67,68,80,90,99,224],[64,67,68,78,83,90,91,93,124,224],[64,67,68,78,80,83,85,90,91,93,98,99,118,119,125,224],[64,68,80,90,94,99,100,171,224],[77,170,224],[64,78,79,83,84,88,89,90,92,93,116,117,126,127,128,129,130,131,224],[64,67,90,99,100,224],[67,78,80,83,85,89,90,91,94,224],[59,224],[107,108,109,110,224],[62,63,224],[62,224],[60,224],[101,224],[61,224],[61,103,224],[63,102,103,104,105,106,224],[59,60,61,62,101,224],[59,60,61,224],[120,121,122,123,224],[121,224],[121,122,224],[170,224],[164,224],[164,170,224],[77,164,224],[164,165,166,167,168,169,224],[112,224],[107,111,224],[64,68,69,224],[68,224],[64,67,72,224],[64,74,75,133,134,224],[70,71,73,74,75,133,134,135,136,137,138,162,163,174,175,176,224],[90,132,161,172,173,224],[133,136,224],[74,224],[75,224],[64,68,73,99,133,224],[64,68,74,75,90,132,224],[74,75,133,224],[74,134,136,144,161,224],[75,133,224],[64,67,70,78,133,135,137,162,163,174,224],[64,68,69],[68],[64,67,72],[64,74,75,133,134],[90,132,161,172,173],[133,136],[74],[75],[64,68,73,99,133],[64,68,74,75,90,132],[74,75,133],[74,134,136,144,161],[75,133],[64,67,70,78,133,135,137,162,163,174]],"referencedMap":[[157,1],[161,2],[145,3],[160,4],[141,5],[152,6],[149,7],[155,8],[151,9],[146,1],[147,1],[154,10],[148,11],[158,12],[156,13],[144,14],[153,1],[94,15],[99,16],[100,17],[91,18],[128,19],[93,20],[78,21],[79,22],[80,1],[90,23],[82,24],[81,1],[83,17],[129,25],[64,26],[72,27],[84,28],[68,27],[143,29],[85,1],[86,17],[88,30],[87,31],[89,32],[69,1],[130,33],[139,1],[98,34],[97,35],[95,35],[96,35],[131,36],[66,15],[67,37],[65,15],[232,1],[178,38],[179,38],[181,39],[182,40],[183,41],[184,42],[185,43],[186,44],[187,45],[188,46],[189,47],[190,48],[191,48],[193,49],[192,50],[194,49],[195,51],[196,52],[180,53],[230,1],[197,54],[198,55],[199,56],[231,57],[200,58],[201,59],[202,60],[203,61],[204,62],[205,63],[206,64],[207,65],[208,66],[209,67],[210,67],[211,68],[212,69],[214,70],[213,71],[215,72],[216,73],[217,74],[218,75],[219,76],[220,77],[221,78],[222,79],[223,80],[224,81],[225,82],[226,83],[227,84],[228,85],[229,86],[150,1],[120,1],[116,87],[114,88],[115,1],[142,1],[76,1],[92,89],[117,90],[118,91],[119,92],[125,93],[126,94],[172,95],[171,96],[132,97],[173,98],[127,99],[110,100],[59,1],[111,101],[60,102],[106,1],[63,103],[101,104],[109,105],[108,105],[103,106],[104,107],[61,1],[107,108],[102,109],[62,110],[105,1],[124,111],[122,112],[123,113],[121,1],[140,1],[159,5],[164,114],[167,115],[168,116],[165,117],[166,115],[170,118],[169,114],[57,1],[58,1],[10,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[55,1],[53,1],[54,1],[1,1],[56,1],[77,1],[113,119],[112,120],[70,121],[71,122],[73,123],[135,124],[177,125],[176,1],[174,126],[137,127],[75,128],[74,129],[138,130],[133,131],[134,132],[162,133],[136,134],[163,134],[175,135]],"exportedModulesMap":[[157,1],[161,2],[145,3],[160,4],[141,5],[152,6],[149,7],[155,8],[151,9],[146,1],[147,1],[154,10],[148,11],[158,12],[156,13],[144,14],[153,1],[94,15],[99,16],[100,17],[91,18],[128,19],[93,20],[78,21],[79,22],[80,1],[90,23],[82,24],[81,1],[83,17],[129,25],[64,26],[72,27],[84,28],[68,27],[143,29],[85,1],[86,17],[88,30],[87,31],[89,32],[69,1],[130,33],[139,1],[98,34],[97,35],[95,35],[96,35],[131,36],[66,15],[67,37],[65,15],[232,1],[178,38],[179,38],[181,39],[182,40],[183,41],[184,42],[185,43],[186,44],[187,45],[188,46],[189,47],[190,48],[191,48],[193,49],[192,50],[194,49],[195,51],[196,52],[180,53],[230,1],[197,54],[198,55],[199,56],[231,57],[200,58],[201,59],[202,60],[203,61],[204,62],[205,63],[206,64],[207,65],[208,66],[209,67],[210,67],[211,68],[212,69],[214,70],[213,71],[215,72],[216,73],[217,74],[218,75],[219,76],[220,77],[221,78],[222,79],[223,80],[224,81],[225,82],[226,83],[227,84],[228,85],[229,86],[150,1],[120,1],[116,87],[114,88],[115,1],[142,1],[76,1],[92,89],[117,90],[118,91],[119,92],[125,93],[126,94],[172,95],[171,96],[132,97],[173,98],[127,99],[110,100],[59,1],[111,101],[60,102],[106,1],[63,103],[101,104],[109,105],[108,105],[103,106],[104,107],[61,1],[107,108],[102,109],[62,110],[105,1],[124,111],[122,112],[123,113],[121,1],[140,1],[159,5],[164,114],[167,115],[168,116],[165,117],[166,115],[170,118],[169,114],[57,1],[58,1],[10,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[55,1],[53,1],[54,1],[1,1],[56,1],[77,1],[113,119],[112,120],[70,136],[71,137],[73,138],[135,139],[177,125],[174,140],[137,141],[75,142],[74,143],[138,144],[133,145],[134,146],[162,147],[136,148],[163,148],[175,149]],"semanticDiagnosticsPerFile":[157,161,145,160,141,152,149,155,151,146,147,154,148,158,156,144,153,94,99,100,91,128,93,78,79,80,90,82,81,83,129,64,72,84,68,143,85,86,88,87,89,69,130,139,98,97,95,96,131,66,67,65,232,178,179,181,182,183,184,185,186,187,188,189,190,191,193,192,194,195,196,180,230,197,198,199,231,200,201,202,203,204,205,206,207,208,209,210,211,212,214,213,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,150,120,116,114,115,142,76,92,117,118,119,125,126,172,171,132,173,127,110,59,111,60,106,63,101,109,108,103,104,61,107,102,62,105,124,122,123,121,140,159,164,167,168,165,166,170,169,57,58,10,12,11,2,13,14,15,16,17,18,19,20,3,4,21,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,55,53,54,1,56,77,113,112,70,71,73,135,177,176,174,137,75,74,138,133,134,162,136,163,175]},"version":"5.2.2"}
@@ -1,5 +1,5 @@
1
- import type { PeerId } from "@libp2p/interface-peer-id";
2
- import type { Peer } from "@libp2p/interface-peer-store";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
+ import type { Peer } from "@libp2p/interface/peer-store";
3
3
  import type { EventEmitter } from "@libp2p/interfaces/events";
4
4
  export declare enum Tags {
5
5
  BOOTSTRAP = "bootstrap",
@@ -0,0 +1,42 @@
1
+ import { PeerStore } from "@libp2p/interface/peer-store";
2
+ export type SearchContext = {
3
+ domain: string;
4
+ publicKey: string;
5
+ visits: {
6
+ [key: string]: boolean;
7
+ };
8
+ };
9
+ export interface DnsClient {
10
+ resolveTXT: (domain: string) => Promise<string[]>;
11
+ }
12
+ export interface NodeCapabilityCount {
13
+ relay: number;
14
+ store: number;
15
+ filter: number;
16
+ lightPush: number;
17
+ }
18
+ export interface DnsDiscoveryComponents {
19
+ peerStore: PeerStore;
20
+ }
21
+ export interface DnsDiscOptions {
22
+ /**
23
+ * ENR URL to use for DNS discovery
24
+ */
25
+ enrUrls: string | string[];
26
+ /**
27
+ * Specifies what type of nodes are wanted from the discovery process
28
+ */
29
+ wantedNodeCapabilityCount: Partial<NodeCapabilityCount>;
30
+ /**
31
+ * Tag a bootstrap peer with this name before "discovering" it (default: 'bootstrap')
32
+ */
33
+ tagName?: string;
34
+ /**
35
+ * The bootstrap peer tag will have this value (default: 50)
36
+ */
37
+ tagValue?: number;
38
+ /**
39
+ * Cause the bootstrap peer tag to be removed after this number of ms (default: 2 minutes)
40
+ */
41
+ tagTTL?: number;
42
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dns_discovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dns_discovery.js","sourceRoot":"","sources":["../src/dns_discovery.ts"],"names":[],"mappings":""}
package/dist/enr.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { PeerId } from "@libp2p/interface-peer-id";
2
- import type { PeerInfo } from "@libp2p/interface-peer-info";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
+ import type { PeerInfo } from "@libp2p/interface/peer-info";
3
3
  import type { Multiaddr } from "@multiformats/multiaddr";
4
4
  export type ENRKey = string;
5
5
  export type ENRValue = Uint8Array;
@@ -15,6 +15,10 @@ export interface Waku2 {
15
15
  filter: boolean;
16
16
  lightPush: boolean;
17
17
  }
18
+ export interface ShardInfo {
19
+ cluster: number;
20
+ indexList: number[];
21
+ }
18
22
  export interface IEnr extends Map<ENRKey, ENRValue> {
19
23
  nodeId?: NodeId;
20
24
  peerId?: PeerId;
@@ -31,6 +35,7 @@ export interface IEnr extends Map<ENRKey, ENRValue> {
31
35
  multiaddrs?: Multiaddr[];
32
36
  waku2?: Waku2;
33
37
  peerInfo: PeerInfo | undefined;
38
+ shardInfo?: ShardInfo;
34
39
  /**
35
40
  * @deprecated: use { @link IEnr.peerInfo } instead.
36
41
  */
package/dist/filter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { PeerId } from "@libp2p/interface-peer-id";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
2
  import type { IDecodedMessage, IDecoder } from "./message.js";
3
3
  import type { ContentTopic } from "./misc.js";
4
4
  import type { Callback, IBaseProtocol } from "./protocols.js";
@@ -13,5 +13,5 @@ export interface IFilterSubscription {
13
13
  unsubscribeAll(): Promise<void>;
14
14
  }
15
15
  export type IFilter = IReceiver & IBaseProtocol & {
16
- createSubscription(pubSubTopic?: string, peerId?: PeerId): Promise<IFilterSubscription>;
16
+ createSubscription(pubsubTopic?: string, peerId?: PeerId): Promise<IFilterSubscription>;
17
17
  };
package/dist/index.d.ts CHANGED
@@ -13,3 +13,4 @@ export * from "./receiver.js";
13
13
  export * from "./misc.js";
14
14
  export * from "./libp2p.js";
15
15
  export * from "./keep_alive_manager.js";
16
+ export * from "./dns_discovery.js";
package/dist/index.js CHANGED
@@ -13,4 +13,5 @@ export * from "./receiver.js";
13
13
  export * from "./misc.js";
14
14
  export * from "./libp2p.js";
15
15
  export * from "./keep_alive_manager.js";
16
+ export * from "./dns_discovery.js";
16
17
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
package/dist/libp2p.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
2
- import type { Libp2p as BaseLibp2p } from "@libp2p/interface-libp2p";
2
+ import type { Libp2p as BaseLibp2p } from "@libp2p/interface";
3
3
  import type { Libp2pInit } from "libp2p";
4
4
  import type { identifyService } from "libp2p/identify";
5
5
  import type { PingService } from "libp2p/ping";
package/dist/message.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { PubSubTopic } from "./misc.js";
1
2
  export interface IRateLimitProof {
2
3
  proof: Uint8Array;
3
4
  merkleRoot: Uint8Array;
@@ -34,6 +35,7 @@ export interface IMetaSetter {
34
35
  }): Uint8Array;
35
36
  }
36
37
  export interface EncoderOptions {
38
+ pubsubTopic?: PubSubTopic;
37
39
  /** The content topic to set on outgoing messages. */
38
40
  contentTopic: string;
39
41
  /**
@@ -49,6 +51,7 @@ export interface EncoderOptions {
49
51
  metaSetter?: IMetaSetter;
50
52
  }
51
53
  export interface IEncoder {
54
+ pubsubTopic: PubSubTopic;
52
55
  contentTopic: string;
53
56
  ephemeral: boolean;
54
57
  toWire: (message: IMessage) => Promise<Uint8Array | undefined>;
@@ -57,14 +60,15 @@ export interface IEncoder {
57
60
  export interface IDecodedMessage {
58
61
  payload: Uint8Array;
59
62
  contentTopic: string;
60
- pubSubTopic: string;
63
+ pubsubTopic: PubSubTopic;
61
64
  timestamp: Date | undefined;
62
65
  rateLimitProof: IRateLimitProof | undefined;
63
66
  ephemeral: boolean | undefined;
64
67
  meta: Uint8Array | undefined;
65
68
  }
66
69
  export interface IDecoder<T extends IDecodedMessage> {
70
+ pubsubTopic: PubSubTopic;
67
71
  contentTopic: string;
68
72
  fromWireToProtoObj: (bytes: Uint8Array) => Promise<IProtoMessage | undefined>;
69
- fromProtoObj: (pubSubTopic: string, proto: IProtoMessage) => Promise<T | undefined>;
73
+ fromProtoObj: (pubsubTopic: string, proto: IProtoMessage) => Promise<T | undefined>;
70
74
  }
@@ -1,6 +1,6 @@
1
- import type { ConnectionManager } from "@libp2p/interface-connection-manager";
2
- import type { PeerId } from "@libp2p/interface-peer-id";
3
- import type { PeerStore } from "@libp2p/interface-peer-store";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
+ import type { PeerStore } from "@libp2p/interface/peer-store";
3
+ import type { ConnectionManager } from "@libp2p/interface-internal/connection-manager";
4
4
  import { IEnr } from "./enr.js";
5
5
  import { IBaseProtocol } from "./protocols.js";
6
6
  export interface IPeerExchange extends IBaseProtocol {
@@ -1,8 +1,9 @@
1
- import type { Libp2p } from "@libp2p/interface-libp2p";
2
- import type { PeerId } from "@libp2p/interface-peer-id";
3
- import type { Peer, PeerStore } from "@libp2p/interface-peer-store";
1
+ import type { Libp2p } from "@libp2p/interface";
2
+ import type { PeerId } from "@libp2p/interface/peer-id";
3
+ import type { Peer, PeerStore } from "@libp2p/interface/peer-store";
4
4
  import type { Libp2pOptions } from "libp2p";
5
5
  import type { IDecodedMessage } from "./message.js";
6
+ import type { PubSubTopic } from "./misc.js";
6
7
  export declare enum Protocols {
7
8
  Relay = "relay",
8
9
  Store = "store",
@@ -18,24 +19,29 @@ export interface IBaseProtocol {
18
19
  }
19
20
  export type ProtocolCreateOptions = {
20
21
  /**
21
- * The PubSub Topic to use. Defaults to {@link @waku/core.DefaultPubSubTopic }.
22
+ * Waku supports usage of multiple pubsub topics, but this is still in early stages.
23
+ * Waku implements sharding to achieve scalability
24
+ * The format of the sharded topic is `/waku/2/rs/<shard_cluster_index>/<shard_number>`
25
+ * To learn more about the sharding specifications implemented, see [Relay Sharding](https://rfc.vac.dev/spec/51/).
26
+ * The PubSub Topic to use. Defaults to {@link @waku/core!DefaultPubSubTopic }.
22
27
  *
23
- * One and only one pubsub topic is used by Waku. This is used by:
28
+ * If no pubsub topic is specified, the default pubsub topic is used.
29
+ * The set of pubsub topics that are used to initialize the Waku node, will need to be used by the protocols as well
30
+ * You cannot currently add or remove pubsub topics after initialization.
31
+ * This is used by:
24
32
  * - WakuRelay to receive, route and send messages,
25
33
  * - WakuLightPush to send messages,
26
34
  * - WakuStore to retrieve messages.
27
- *
28
- * The usage of the default pubsub topic is recommended.
29
35
  * See [Waku v2 Topic Usage Recommendations](https://rfc.vac.dev/spec/23/) for details.
30
36
  *
31
37
  */
32
- pubSubTopic?: string;
38
+ pubsubTopics?: PubSubTopic[];
33
39
  /**
34
- * You can pass options to the `Libp2p` instance used by {@link @waku/core.WakuNode} using the `libp2p` property.
40
+ * You can pass options to the `Libp2p` instance used by {@link @waku/core!WakuNode} using the `libp2p` property.
35
41
  * This property is the same type as the one passed to [`Libp2p.create`](https://github.com/libp2p/js-libp2p/blob/master/doc/API.md#create)
36
42
  * apart that we made the `modules` property optional and partial,
37
43
  * allowing its omission and letting Waku set good defaults.
38
- * Notes that some values are overridden by {@link @waku/core.WakuNode} to ensure it implements the Waku protocol.
44
+ * Notes that some values are overridden by {@link @waku/core!WakuNode} to ensure it implements the Waku protocol.
39
45
  */
40
46
  libp2p?: Partial<Libp2pOptions>;
41
47
  /**
@@ -49,21 +55,45 @@ export type ProtocolCreateOptions = {
49
55
  */
50
56
  defaultBootstrap?: boolean;
51
57
  };
52
- export type ProtocolOptions = {
53
- /**
54
- * Optionally specify an PeerId for the protocol request. If not included, will use a random peer.
55
- */
56
- peerId?: PeerId;
57
- };
58
58
  export type Callback<T extends IDecodedMessage> = (msg: T) => void | Promise<void>;
59
59
  export declare enum SendError {
60
+ /** Could not determine the origin of the fault. Best to check connectivity and try again */
60
61
  GENERIC_FAIL = "Generic error",
62
+ /** Failure to protobuf encode the message. This is not recoverable and needs
63
+ * further investigation. */
61
64
  ENCODE_FAILED = "Failed to encode",
65
+ /** Failure to protobuf decode the message. May be due to a remote peer issue,
66
+ * ensuring that messages are sent via several peer enable mitigation of this error.. */
62
67
  DECODE_FAILED = "Failed to decode",
68
+ /** The message size is above the maximum message size allowed on the Waku Network.
69
+ * Compressing the message or using an alternative strategy for large messages is recommended.
70
+ */
63
71
  SIZE_TOO_BIG = "Size is too big",
64
- NO_RPC_RESPONSE = "No RPC response"
72
+ /**
73
+ * The PubSubTopic passed to the send function is not configured on the Waku node.
74
+ * Please ensure that the PubSubTopic is used when initializing the Waku node.
75
+ */
76
+ TOPIC_NOT_CONFIGURED = "Topic not configured",
77
+ /**
78
+ * Failure to find a peer with suitable protocols. This may due to a connection issue.
79
+ * Mitigation can be: retrying after a given time period, display connectivity issue
80
+ * to user or listening for `peer:connected:bootstrap` or `peer:connected:peer-exchange`
81
+ * on the connection manager before retrying.
82
+ */
83
+ NO_PEER_AVAILABLE = "No peer available",
84
+ /**
85
+ * The remote peer did not behave as expected. Mitigation for `NO_PEER_AVAILABLE`
86
+ * or `DECODE_FAILED` can be used.
87
+ */
88
+ REMOTE_PEER_FAULT = "Remote peer fault",
89
+ /**
90
+ * The remote peer rejected the message. Information provided by the remote peer
91
+ * is logged. Review message validity, or mitigation for `NO_PEER_AVAILABLE`
92
+ * or `DECODE_FAILED` can be used.
93
+ */
94
+ REMOTE_PEER_REJECTED = "Remote peer rejected"
65
95
  }
66
96
  export interface SendResult {
67
- error?: SendError;
97
+ errors?: SendError[];
68
98
  recipients: PeerId[];
69
99
  }
package/dist/protocols.js CHANGED
@@ -7,10 +7,40 @@ export var Protocols;
7
7
  })(Protocols || (Protocols = {}));
8
8
  export var SendError;
9
9
  (function (SendError) {
10
+ /** Could not determine the origin of the fault. Best to check connectivity and try again */
10
11
  SendError["GENERIC_FAIL"] = "Generic error";
12
+ /** Failure to protobuf encode the message. This is not recoverable and needs
13
+ * further investigation. */
11
14
  SendError["ENCODE_FAILED"] = "Failed to encode";
15
+ /** Failure to protobuf decode the message. May be due to a remote peer issue,
16
+ * ensuring that messages are sent via several peer enable mitigation of this error.. */
12
17
  SendError["DECODE_FAILED"] = "Failed to decode";
18
+ /** The message size is above the maximum message size allowed on the Waku Network.
19
+ * Compressing the message or using an alternative strategy for large messages is recommended.
20
+ */
13
21
  SendError["SIZE_TOO_BIG"] = "Size is too big";
14
- SendError["NO_RPC_RESPONSE"] = "No RPC response";
22
+ /**
23
+ * The PubSubTopic passed to the send function is not configured on the Waku node.
24
+ * Please ensure that the PubSubTopic is used when initializing the Waku node.
25
+ */
26
+ SendError["TOPIC_NOT_CONFIGURED"] = "Topic not configured";
27
+ /**
28
+ * Failure to find a peer with suitable protocols. This may due to a connection issue.
29
+ * Mitigation can be: retrying after a given time period, display connectivity issue
30
+ * to user or listening for `peer:connected:bootstrap` or `peer:connected:peer-exchange`
31
+ * on the connection manager before retrying.
32
+ */
33
+ SendError["NO_PEER_AVAILABLE"] = "No peer available";
34
+ /**
35
+ * The remote peer did not behave as expected. Mitigation for `NO_PEER_AVAILABLE`
36
+ * or `DECODE_FAILED` can be used.
37
+ */
38
+ SendError["REMOTE_PEER_FAULT"] = "Remote peer fault";
39
+ /**
40
+ * The remote peer rejected the message. Information provided by the remote peer
41
+ * is logged. Review message validity, or mitigation for `NO_PEER_AVAILABLE`
42
+ * or `DECODE_FAILED` can be used.
43
+ */
44
+ SendError["REMOTE_PEER_REJECTED"] = "Remote peer rejected";
15
45
  })(SendError || (SendError = {}));
16
46
  //# sourceMappingURL=protocols.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocols.js","sourceRoot":"","sources":["../src/protocols.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAuDD,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,2CAA8B,CAAA;IAC9B,+CAAkC,CAAA;IAClC,+CAAkC,CAAA;IAClC,6CAAgC,CAAA;IAChC,gDAAmC,CAAA;AACrC,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB"}
1
+ {"version":3,"file":"protocols.js","sourceRoot":"","sources":["../src/protocols.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAqDD,MAAM,CAAN,IAAY,SAoCX;AApCD,WAAY,SAAS;IACnB,4FAA4F;IAC5F,2CAA8B,CAAA;IAC9B;gCAC4B;IAC5B,+CAAkC,CAAA;IAClC;4FACwF;IACxF,+CAAkC,CAAA;IAClC;;OAEG;IACH,6CAAgC,CAAA;IAChC;;;OAGG;IACH,0DAA6C,CAAA;IAC7C;;;;;OAKG;IACH,oDAAuC,CAAA;IACvC;;;OAGG;IACH,oDAAuC,CAAA;IACvC;;;;OAIG;IACH,0DAA6C,CAAA;AAC/C,CAAC,EApCW,SAAS,KAAT,SAAS,QAoCpB"}
@@ -1,10 +1,8 @@
1
1
  import type { IDecodedMessage, IDecoder } from "./message.js";
2
- import type { IAsyncIterator, PubSubTopic, Unsubscribe } from "./misc.js";
3
- import type { Callback, ProtocolOptions } from "./protocols.js";
4
- type ContentTopic = string;
2
+ import type { ContentTopic, IAsyncIterator, PubSubTopic, Unsubscribe } from "./misc.js";
3
+ import type { Callback } from "./protocols.js";
5
4
  export type ActiveSubscriptions = Map<PubSubTopic, ContentTopic[]>;
6
5
  export interface IReceiver {
7
- toSubscriptionIterator: <T extends IDecodedMessage>(decoders: IDecoder<T> | IDecoder<T>[], opts?: ProtocolOptions) => Promise<IAsyncIterator<T>>;
8
- subscribe: <T extends IDecodedMessage>(decoders: IDecoder<T> | IDecoder<T>[], callback: Callback<T>, opts?: ProtocolOptions) => Unsubscribe | Promise<Unsubscribe>;
6
+ toSubscriptionIterator: <T extends IDecodedMessage>(decoders: IDecoder<T> | IDecoder<T>[]) => Promise<IAsyncIterator<T>>;
7
+ subscribe: <T extends IDecodedMessage>(decoders: IDecoder<T> | IDecoder<T>[], callback: Callback<T>) => Unsubscribe | Promise<Unsubscribe>;
9
8
  }
10
- export {};
package/dist/relay.d.ts CHANGED
@@ -1,11 +1,19 @@
1
1
  import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
2
2
  import type { PeerIdStr, TopicStr } from "@chainsafe/libp2p-gossipsub/types";
3
+ import { PubSubTopic } from "./misc.js";
3
4
  import { IReceiver } from "./receiver.js";
4
5
  import type { ISender } from "./sender.js";
5
- interface IRelayAPI {
6
+ /**
7
+ * Interface representing the Relay API, providing control and information about the GossipSub protocol.
8
+ *
9
+ * @property gossipSub - The GossipSub instance used for managing pub/sub behavior.
10
+ * @property start - Function to start the relay, returning a Promise that resolves when initialization is complete.
11
+ * @property getMeshPeers - Function to retrieve the mesh peers for a given topic or all topics if none is specified. Returns an array of peer IDs as strings.
12
+ */
13
+ export interface IRelayAPI {
14
+ readonly pubsubTopics: Set<PubSubTopic>;
6
15
  readonly gossipSub: GossipSub;
7
16
  start: () => Promise<void>;
8
17
  getMeshPeers: (topic?: TopicStr) => PeerIdStr[];
9
18
  }
10
19
  export type IRelay = IRelayAPI & ISender & IReceiver;
11
- export {};
package/dist/sender.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { IEncoder, IMessage } from "./message.js";
2
- import type { ProtocolOptions, SendResult } from "./protocols.js";
2
+ import type { SendResult } from "./protocols.js";
3
3
  export interface ISender {
4
- send: (encoder: IEncoder, message: IMessage, opts?: ProtocolOptions) => Promise<SendResult>;
4
+ send: (encoder: IEncoder, message: IMessage) => Promise<SendResult>;
5
5
  }
package/dist/store.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { IDecodedMessage, IDecoder } from "./message.js";
2
- import type { IBaseProtocol, ProtocolOptions } from "./protocols.js";
2
+ import type { IBaseProtocol } from "./protocols.js";
3
3
  export declare enum PageDirection {
4
4
  BACKWARD = "backward",
5
5
  FORWARD = "forward"
@@ -39,9 +39,9 @@ export type StoreQueryOptions = {
39
39
  * Message.
40
40
  */
41
41
  cursor?: Cursor;
42
- } & ProtocolOptions;
42
+ };
43
43
  export interface IStore extends IBaseProtocol {
44
- queryOrderedCallback: <T extends IDecodedMessage>(decoders: IDecoder<T>[], callback: (message: T) => Promise<void | boolean> | boolean | void, options?: StoreQueryOptions) => Promise<void>;
45
- queryCallbackOnPromise: <T extends IDecodedMessage>(decoders: IDecoder<T>[], callback: (message: Promise<T | undefined>) => Promise<void | boolean> | boolean | void, options?: StoreQueryOptions) => Promise<void>;
44
+ queryWithOrderedCallback: <T extends IDecodedMessage>(decoders: IDecoder<T>[], callback: (message: T) => Promise<void | boolean> | boolean | void, options?: StoreQueryOptions) => Promise<void>;
45
+ queryWithPromiseCallback: <T extends IDecodedMessage>(decoders: IDecoder<T>[], callback: (message: Promise<T | undefined>) => Promise<void | boolean> | boolean | void, options?: StoreQueryOptions) => Promise<void>;
46
46
  queryGenerator: <T extends IDecodedMessage>(decoders: IDecoder<T>[], options?: StoreQueryOptions) => AsyncGenerator<Promise<T | undefined>[]>;
47
47
  }
package/dist/waku.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Stream } from "@libp2p/interface-connection";
2
- import type { PeerId } from "@libp2p/interface-peer-id";
1
+ import type { Stream } from "@libp2p/interface/connection";
2
+ import type { PeerId } from "@libp2p/interface/peer-id";
3
3
  import type { Multiaddr } from "@multiformats/multiaddr";
4
4
  import { IConnectionManager } from "./connection_manager.js";
5
5
  import type { IFilter } from "./filter.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waku/interfaces",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "Definition of Waku interfaces",
5
5
  "types": "./dist/index.d.ts",
6
6
  "module": "./dist/index.js",
@@ -44,26 +44,14 @@
44
44
  "reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build"
45
45
  },
46
46
  "engines": {
47
- "node": ">=16"
47
+ "node": ">=18"
48
48
  },
49
49
  "devDependencies": {
50
- "@chainsafe/libp2p-gossipsub": "^9.1.0",
51
- "@libp2p/interface-connection": "^5.1.1",
52
- "@libp2p/interface-connection-manager": "^3.0.1",
53
- "@libp2p/interface-libp2p": "^3.2.0",
54
- "@libp2p/interface-peer-id": "^2.0.2",
55
- "@libp2p/interface-peer-info": "^1.0.10",
56
- "@libp2p/interface-peer-store": "^2.0.4",
57
- "@libp2p/interface-registrar": "^2.0.12",
50
+ "@chainsafe/libp2p-gossipsub": "^10.1.0",
58
51
  "@multiformats/multiaddr": "^12.0.0",
59
- "cspell": "^6.31.1",
52
+ "cspell": "^7.3.2",
60
53
  "npm-run-all": "^4.1.5",
61
- "prettier": "^2.8.8",
62
- "typescript": "^5.0.4",
63
- "libp2p": "^0.45.9"
64
- },
65
- "typedoc": {
66
- "entryPoint": "./src/index.ts"
54
+ "libp2p": "^0.46.12"
67
55
  },
68
56
  "files": [
69
57
  "dist",
@@ -1,10 +1,10 @@
1
- import type { PeerId } from "@libp2p/interface-peer-id";
2
- import type { Peer } from "@libp2p/interface-peer-store";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
+ import type { Peer } from "@libp2p/interface/peer-store";
3
3
  import type { EventEmitter } from "@libp2p/interfaces/events";
4
4
 
5
5
  export enum Tags {
6
6
  BOOTSTRAP = "bootstrap",
7
- PEER_EXCHANGE = "peer-exchange",
7
+ PEER_EXCHANGE = "peer-exchange"
8
8
  }
9
9
 
10
10
  export interface ConnectionManagerOptions {
@@ -28,7 +28,7 @@ export enum EPeersByDiscoveryEvents {
28
28
  PEER_DISCOVERY_BOOTSTRAP = "peer:discovery:bootstrap",
29
29
  PEER_DISCOVERY_PEER_EXCHANGE = "peer:discovery:peer-exchange",
30
30
  PEER_CONNECT_BOOTSTRAP = "peer:connected:bootstrap",
31
- PEER_CONNECT_PEER_EXCHANGE = "peer:connected:peer-exchange",
31
+ PEER_CONNECT_PEER_EXCHANGE = "peer:connected:peer-exchange"
32
32
  }
33
33
 
34
34
  export interface IPeersByDiscoveryEvents {
@@ -0,0 +1,47 @@
1
+ import { PeerStore } from "@libp2p/interface/peer-store";
2
+
3
+ export type SearchContext = {
4
+ domain: string;
5
+ publicKey: string;
6
+ visits: { [key: string]: boolean };
7
+ };
8
+
9
+ export interface DnsClient {
10
+ resolveTXT: (domain: string) => Promise<string[]>;
11
+ }
12
+
13
+ export interface NodeCapabilityCount {
14
+ relay: number;
15
+ store: number;
16
+ filter: number;
17
+ lightPush: number;
18
+ }
19
+
20
+ export interface DnsDiscoveryComponents {
21
+ peerStore: PeerStore;
22
+ }
23
+
24
+ export interface DnsDiscOptions {
25
+ /**
26
+ * ENR URL to use for DNS discovery
27
+ */
28
+ enrUrls: string | string[];
29
+ /**
30
+ * Specifies what type of nodes are wanted from the discovery process
31
+ */
32
+ wantedNodeCapabilityCount: Partial<NodeCapabilityCount>;
33
+ /**
34
+ * Tag a bootstrap peer with this name before "discovering" it (default: 'bootstrap')
35
+ */
36
+ tagName?: string;
37
+
38
+ /**
39
+ * The bootstrap peer tag will have this value (default: 50)
40
+ */
41
+ tagValue?: number;
42
+
43
+ /**
44
+ * Cause the bootstrap peer tag to be removed after this number of ms (default: 2 minutes)
45
+ */
46
+ tagTTL?: number;
47
+ }
package/src/enr.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { PeerId } from "@libp2p/interface-peer-id";
2
- import type { PeerInfo } from "@libp2p/interface-peer-info";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
+ import type { PeerInfo } from "@libp2p/interface/peer-info";
3
3
  import type { Multiaddr } from "@multiformats/multiaddr";
4
4
 
5
5
  export type ENRKey = string;
@@ -18,6 +18,11 @@ export interface Waku2 {
18
18
  lightPush: boolean;
19
19
  }
20
20
 
21
+ export interface ShardInfo {
22
+ cluster: number;
23
+ indexList: number[];
24
+ }
25
+
21
26
  export interface IEnr extends Map<ENRKey, ENRValue> {
22
27
  nodeId?: NodeId;
23
28
  peerId?: PeerId;
@@ -34,6 +39,7 @@ export interface IEnr extends Map<ENRKey, ENRValue> {
34
39
  multiaddrs?: Multiaddr[];
35
40
  waku2?: Waku2;
36
41
  peerInfo: PeerInfo | undefined;
42
+ shardInfo?: ShardInfo;
37
43
 
38
44
  /**
39
45
  * @deprecated: use { @link IEnr.peerInfo } instead.
package/src/filter.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { PeerId } from "@libp2p/interface-peer-id";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
2
 
3
3
  import type { IDecodedMessage, IDecoder } from "./message.js";
4
4
  import type { ContentTopic } from "./misc.js";
@@ -25,7 +25,7 @@ export interface IFilterSubscription {
25
25
  export type IFilter = IReceiver &
26
26
  IBaseProtocol & {
27
27
  createSubscription(
28
- pubSubTopic?: string,
28
+ pubsubTopic?: string,
29
29
  peerId?: PeerId
30
30
  ): Promise<IFilterSubscription>;
31
31
  };
package/src/index.ts CHANGED
@@ -13,3 +13,4 @@ export * from "./receiver.js";
13
13
  export * from "./misc.js";
14
14
  export * from "./libp2p.js";
15
15
  export * from "./keep_alive_manager.js";
16
+ export * from "./dns_discovery.js";
package/src/libp2p.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
2
- import type { Libp2p as BaseLibp2p } from "@libp2p/interface-libp2p";
2
+ import type { Libp2p as BaseLibp2p } from "@libp2p/interface";
3
3
  import type { Libp2pInit } from "libp2p";
4
4
  import type { identifyService } from "libp2p/identify";
5
5
  import type { PingService } from "libp2p/ping";
package/src/message.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { PubSubTopic } from "./misc.js";
2
+
1
3
  export interface IRateLimitProof {
2
4
  proof: Uint8Array;
3
5
  merkleRoot: Uint8Array;
@@ -36,6 +38,7 @@ export interface IMetaSetter {
36
38
  }
37
39
 
38
40
  export interface EncoderOptions {
41
+ pubsubTopic?: PubSubTopic;
39
42
  /** The content topic to set on outgoing messages. */
40
43
  contentTopic: string;
41
44
  /**
@@ -52,6 +55,7 @@ export interface EncoderOptions {
52
55
  }
53
56
 
54
57
  export interface IEncoder {
58
+ pubsubTopic: PubSubTopic;
55
59
  contentTopic: string;
56
60
  ephemeral: boolean;
57
61
  toWire: (message: IMessage) => Promise<Uint8Array | undefined>;
@@ -61,7 +65,7 @@ export interface IEncoder {
61
65
  export interface IDecodedMessage {
62
66
  payload: Uint8Array;
63
67
  contentTopic: string;
64
- pubSubTopic: string;
68
+ pubsubTopic: PubSubTopic;
65
69
  timestamp: Date | undefined;
66
70
  rateLimitProof: IRateLimitProof | undefined;
67
71
  ephemeral: boolean | undefined;
@@ -69,10 +73,11 @@ export interface IDecodedMessage {
69
73
  }
70
74
 
71
75
  export interface IDecoder<T extends IDecodedMessage> {
76
+ pubsubTopic: PubSubTopic;
72
77
  contentTopic: string;
73
78
  fromWireToProtoObj: (bytes: Uint8Array) => Promise<IProtoMessage | undefined>;
74
79
  fromProtoObj: (
75
- pubSubTopic: string,
80
+ pubsubTopic: string,
76
81
  proto: IProtoMessage
77
82
  ) => Promise<T | undefined>;
78
83
  }
@@ -1,6 +1,6 @@
1
- import type { ConnectionManager } from "@libp2p/interface-connection-manager";
2
- import type { PeerId } from "@libp2p/interface-peer-id";
3
- import type { PeerStore } from "@libp2p/interface-peer-store";
1
+ import type { PeerId } from "@libp2p/interface/peer-id";
2
+ import type { PeerStore } from "@libp2p/interface/peer-store";
3
+ import type { ConnectionManager } from "@libp2p/interface-internal/connection-manager";
4
4
 
5
5
  import { IEnr } from "./enr.js";
6
6
  import { IBaseProtocol } from "./protocols.js";
package/src/protocols.ts CHANGED
@@ -1,15 +1,16 @@
1
- import type { Libp2p } from "@libp2p/interface-libp2p";
2
- import type { PeerId } from "@libp2p/interface-peer-id";
3
- import type { Peer, PeerStore } from "@libp2p/interface-peer-store";
1
+ import type { Libp2p } from "@libp2p/interface";
2
+ import type { PeerId } from "@libp2p/interface/peer-id";
3
+ import type { Peer, PeerStore } from "@libp2p/interface/peer-store";
4
4
  import type { Libp2pOptions } from "libp2p";
5
5
 
6
6
  import type { IDecodedMessage } from "./message.js";
7
+ import type { PubSubTopic } from "./misc.js";
7
8
 
8
9
  export enum Protocols {
9
10
  Relay = "relay",
10
11
  Store = "store",
11
12
  LightPush = "lightpush",
12
- Filter = "filter",
13
+ Filter = "filter"
13
14
  }
14
15
 
15
16
  export interface IBaseProtocol {
@@ -22,24 +23,29 @@ export interface IBaseProtocol {
22
23
 
23
24
  export type ProtocolCreateOptions = {
24
25
  /**
25
- * The PubSub Topic to use. Defaults to {@link @waku/core.DefaultPubSubTopic }.
26
+ * Waku supports usage of multiple pubsub topics, but this is still in early stages.
27
+ * Waku implements sharding to achieve scalability
28
+ * The format of the sharded topic is `/waku/2/rs/<shard_cluster_index>/<shard_number>`
29
+ * To learn more about the sharding specifications implemented, see [Relay Sharding](https://rfc.vac.dev/spec/51/).
30
+ * The PubSub Topic to use. Defaults to {@link @waku/core!DefaultPubSubTopic }.
26
31
  *
27
- * One and only one pubsub topic is used by Waku. This is used by:
32
+ * If no pubsub topic is specified, the default pubsub topic is used.
33
+ * The set of pubsub topics that are used to initialize the Waku node, will need to be used by the protocols as well
34
+ * You cannot currently add or remove pubsub topics after initialization.
35
+ * This is used by:
28
36
  * - WakuRelay to receive, route and send messages,
29
37
  * - WakuLightPush to send messages,
30
38
  * - WakuStore to retrieve messages.
31
- *
32
- * The usage of the default pubsub topic is recommended.
33
39
  * See [Waku v2 Topic Usage Recommendations](https://rfc.vac.dev/spec/23/) for details.
34
40
  *
35
41
  */
36
- pubSubTopic?: string;
42
+ pubsubTopics?: PubSubTopic[];
37
43
  /**
38
- * You can pass options to the `Libp2p` instance used by {@link @waku/core.WakuNode} using the `libp2p` property.
44
+ * You can pass options to the `Libp2p` instance used by {@link @waku/core!WakuNode} using the `libp2p` property.
39
45
  * This property is the same type as the one passed to [`Libp2p.create`](https://github.com/libp2p/js-libp2p/blob/master/doc/API.md#create)
40
46
  * apart that we made the `modules` property optional and partial,
41
47
  * allowing its omission and letting Waku set good defaults.
42
- * Notes that some values are overridden by {@link @waku/core.WakuNode} to ensure it implements the Waku protocol.
48
+ * Notes that some values are overridden by {@link @waku/core!WakuNode} to ensure it implements the Waku protocol.
43
49
  */
44
50
  libp2p?: Partial<Libp2pOptions>;
45
51
  /**
@@ -54,26 +60,49 @@ export type ProtocolCreateOptions = {
54
60
  defaultBootstrap?: boolean;
55
61
  };
56
62
 
57
- export type ProtocolOptions = {
58
- /**
59
- * Optionally specify an PeerId for the protocol request. If not included, will use a random peer.
60
- */
61
- peerId?: PeerId;
62
- };
63
-
64
63
  export type Callback<T extends IDecodedMessage> = (
65
64
  msg: T
66
65
  ) => void | Promise<void>;
67
66
 
68
67
  export enum SendError {
68
+ /** Could not determine the origin of the fault. Best to check connectivity and try again */
69
69
  GENERIC_FAIL = "Generic error",
70
+ /** Failure to protobuf encode the message. This is not recoverable and needs
71
+ * further investigation. */
70
72
  ENCODE_FAILED = "Failed to encode",
73
+ /** Failure to protobuf decode the message. May be due to a remote peer issue,
74
+ * ensuring that messages are sent via several peer enable mitigation of this error.. */
71
75
  DECODE_FAILED = "Failed to decode",
76
+ /** The message size is above the maximum message size allowed on the Waku Network.
77
+ * Compressing the message or using an alternative strategy for large messages is recommended.
78
+ */
72
79
  SIZE_TOO_BIG = "Size is too big",
73
- NO_RPC_RESPONSE = "No RPC response",
80
+ /**
81
+ * The PubSubTopic passed to the send function is not configured on the Waku node.
82
+ * Please ensure that the PubSubTopic is used when initializing the Waku node.
83
+ */
84
+ TOPIC_NOT_CONFIGURED = "Topic not configured",
85
+ /**
86
+ * Failure to find a peer with suitable protocols. This may due to a connection issue.
87
+ * Mitigation can be: retrying after a given time period, display connectivity issue
88
+ * to user or listening for `peer:connected:bootstrap` or `peer:connected:peer-exchange`
89
+ * on the connection manager before retrying.
90
+ */
91
+ NO_PEER_AVAILABLE = "No peer available",
92
+ /**
93
+ * The remote peer did not behave as expected. Mitigation for `NO_PEER_AVAILABLE`
94
+ * or `DECODE_FAILED` can be used.
95
+ */
96
+ REMOTE_PEER_FAULT = "Remote peer fault",
97
+ /**
98
+ * The remote peer rejected the message. Information provided by the remote peer
99
+ * is logged. Review message validity, or mitigation for `NO_PEER_AVAILABLE`
100
+ * or `DECODE_FAILED` can be used.
101
+ */
102
+ REMOTE_PEER_REJECTED = "Remote peer rejected"
74
103
  }
75
104
 
76
105
  export interface SendResult {
77
- error?: SendError;
106
+ errors?: SendError[];
78
107
  recipients: PeerId[];
79
108
  }
package/src/receiver.ts CHANGED
@@ -1,19 +1,20 @@
1
1
  import type { IDecodedMessage, IDecoder } from "./message.js";
2
- import type { IAsyncIterator, PubSubTopic, Unsubscribe } from "./misc.js";
3
- import type { Callback, ProtocolOptions } from "./protocols.js";
4
-
5
- type ContentTopic = string;
2
+ import type {
3
+ ContentTopic,
4
+ IAsyncIterator,
5
+ PubSubTopic,
6
+ Unsubscribe
7
+ } from "./misc.js";
8
+ import type { Callback } from "./protocols.js";
6
9
 
7
10
  export type ActiveSubscriptions = Map<PubSubTopic, ContentTopic[]>;
8
11
 
9
12
  export interface IReceiver {
10
13
  toSubscriptionIterator: <T extends IDecodedMessage>(
11
- decoders: IDecoder<T> | IDecoder<T>[],
12
- opts?: ProtocolOptions
14
+ decoders: IDecoder<T> | IDecoder<T>[]
13
15
  ) => Promise<IAsyncIterator<T>>;
14
16
  subscribe: <T extends IDecodedMessage>(
15
17
  decoders: IDecoder<T> | IDecoder<T>[],
16
- callback: Callback<T>,
17
- opts?: ProtocolOptions
18
+ callback: Callback<T>
18
19
  ) => Unsubscribe | Promise<Unsubscribe>;
19
20
  }
package/src/relay.ts CHANGED
@@ -1,10 +1,19 @@
1
1
  import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
2
2
  import type { PeerIdStr, TopicStr } from "@chainsafe/libp2p-gossipsub/types";
3
3
 
4
+ import { PubSubTopic } from "./misc.js";
4
5
  import { IReceiver } from "./receiver.js";
5
6
  import type { ISender } from "./sender.js";
6
7
 
7
- interface IRelayAPI {
8
+ /**
9
+ * Interface representing the Relay API, providing control and information about the GossipSub protocol.
10
+ *
11
+ * @property gossipSub - The GossipSub instance used for managing pub/sub behavior.
12
+ * @property start - Function to start the relay, returning a Promise that resolves when initialization is complete.
13
+ * @property getMeshPeers - Function to retrieve the mesh peers for a given topic or all topics if none is specified. Returns an array of peer IDs as strings.
14
+ */
15
+ export interface IRelayAPI {
16
+ readonly pubsubTopics: Set<PubSubTopic>;
8
17
  readonly gossipSub: GossipSub;
9
18
  start: () => Promise<void>;
10
19
  getMeshPeers: (topic?: TopicStr) => PeerIdStr[];
package/src/sender.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  import type { IEncoder, IMessage } from "./message.js";
2
- import type { ProtocolOptions, SendResult } from "./protocols.js";
2
+ import type { SendResult } from "./protocols.js";
3
3
 
4
4
  export interface ISender {
5
- send: (
6
- encoder: IEncoder,
7
- message: IMessage,
8
- opts?: ProtocolOptions
9
- ) => Promise<SendResult>;
5
+ send: (encoder: IEncoder, message: IMessage) => Promise<SendResult>;
10
6
  }
package/src/store.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { IDecodedMessage, IDecoder } from "./message.js";
2
- import type { IBaseProtocol, ProtocolOptions } from "./protocols.js";
2
+ import type { IBaseProtocol } from "./protocols.js";
3
3
 
4
4
  export enum PageDirection {
5
5
  BACKWARD = "backward",
6
- FORWARD = "forward",
6
+ FORWARD = "forward"
7
7
  }
8
8
 
9
9
  export interface TimeFilter {
@@ -43,15 +43,15 @@ export type StoreQueryOptions = {
43
43
  * Message.
44
44
  */
45
45
  cursor?: Cursor;
46
- } & ProtocolOptions;
46
+ };
47
47
 
48
48
  export interface IStore extends IBaseProtocol {
49
- queryOrderedCallback: <T extends IDecodedMessage>(
49
+ queryWithOrderedCallback: <T extends IDecodedMessage>(
50
50
  decoders: IDecoder<T>[],
51
51
  callback: (message: T) => Promise<void | boolean> | boolean | void,
52
52
  options?: StoreQueryOptions
53
53
  ) => Promise<void>;
54
- queryCallbackOnPromise: <T extends IDecodedMessage>(
54
+ queryWithPromiseCallback: <T extends IDecodedMessage>(
55
55
  decoders: IDecoder<T>[],
56
56
  callback: (
57
57
  message: Promise<T | undefined>
package/src/waku.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Stream } from "@libp2p/interface-connection";
2
- import type { PeerId } from "@libp2p/interface-peer-id";
1
+ import type { Stream } from "@libp2p/interface/connection";
2
+ import type { PeerId } from "@libp2p/interface/peer-id";
3
3
  import type { Multiaddr } from "@multiformats/multiaddr";
4
4
 
5
5
  import { IConnectionManager } from "./connection_manager.js";