@waku/interfaces 0.0.7 → 0.0.9
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 +57 -1
- package/dist/.tsbuildinfo +1 -0
- package/dist/connection_manager.d.ts +16 -0
- package/dist/connection_manager.js +6 -0
- package/dist/connection_manager.js.map +1 -0
- package/dist/enr.d.ts +9 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/light_push.d.ts +3 -5
- package/dist/message.d.ts +28 -6
- package/dist/peer_exchange.d.ts +1 -3
- package/dist/protocols.d.ts +38 -5
- package/dist/protocols.js +0 -1
- package/dist/protocols.js.map +1 -1
- package/dist/relay.d.ts +10 -4
- package/dist/sender.d.ts +5 -0
- package/dist/sender.js +2 -0
- package/dist/sender.js.map +1 -0
- package/dist/store.d.ts +8 -12
- package/dist/waku.d.ts +1 -6
- package/package.json +24 -22
- package/src/connection_manager.ts +17 -0
- package/src/enr.ts +5 -1
- package/src/index.ts +2 -0
- package/src/light_push.ts +3 -13
- package/src/message.ts +31 -6
- package/src/peer_exchange.ts +1 -6
- package/src/protocols.ts +40 -4
- package/src/relay.ts +12 -9
- package/src/sender.ts +10 -0
- package/src/store.ts +7 -12
- package/src/waku.ts +1 -6
package/CHANGELOG.md
CHANGED
@@ -2,11 +2,67 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
The
|
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.9](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.8...interfaces-v0.0.9) (2023-03-23)
|
9
|
+
|
10
|
+
|
11
|
+
### ⚠ BREAKING CHANGES
|
12
|
+
|
13
|
+
* use ISender and deprecate Light Push .push ([#1217](https://github.com/waku-org/js-waku/issues/1217))
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* Add getActiveSubscriptions method ([#1249](https://github.com/waku-org/js-waku/issues/1249)) ([45284db](https://github.com/waku-org/js-waku/commit/45284db963d6d4c90a014391551604c236906b88))
|
18
|
+
* Use ISender and deprecate Light Push .push ([#1217](https://github.com/waku-org/js-waku/issues/1217)) ([0f6a594](https://github.com/waku-org/js-waku/commit/0f6a59464426b94dd14841de075ff10a4ad52e33))
|
19
|
+
|
20
|
+
## [0.0.8](https://github.com/waku-org/js-waku/compare/interfaces-v0.0.7...interfaces-v0.0.8) (2023-03-16)
|
21
|
+
|
22
|
+
|
23
|
+
### ⚠ BREAKING CHANGES
|
24
|
+
|
25
|
+
* add custom events to Relay and make observers private ([#1213](https://github.com/waku-org/js-waku/issues/1213))
|
26
|
+
* enable encoding of `meta` field
|
27
|
+
* expose pubsub topic in `IDecodedMessage`
|
28
|
+
* directly convert from ENR to `PeerInfo`, remove unneeded utility
|
29
|
+
* extract encoder code
|
30
|
+
* update store.proto
|
31
|
+
* update message.proto: payload and content topic are always defined
|
32
|
+
* ConnectionManager and KeepAliveManager ([#1135](https://github.com/waku-org/js-waku/issues/1135))
|
33
|
+
* bump typescript
|
34
|
+
* bump libp2p dependencies
|
35
|
+
|
36
|
+
### Features
|
37
|
+
|
38
|
+
* Add custom events to Relay and make observers private ([#1213](https://github.com/waku-org/js-waku/issues/1213)) ([275b166](https://github.com/waku-org/js-waku/commit/275b16641e620956a5f8ebbb3a8c4156149d489e))
|
39
|
+
* Codec as a property of the protocol implementations ([a5ff788](https://github.com/waku-org/js-waku/commit/a5ff788eed419556e11319f22ca9e3109c81df92))
|
40
|
+
* ConnectionManager and KeepAliveManager ([#1135](https://github.com/waku-org/js-waku/issues/1135)) ([24c24cc](https://github.com/waku-org/js-waku/commit/24c24cc27d83ec12de45ef3cf3d00f6eb817e4ca))
|
41
|
+
* Enable encoding of `meta` field ([bd983ea](https://github.com/waku-org/js-waku/commit/bd983ea48ee73fda5a7137d5ef681965aeabb4a5))
|
42
|
+
* Expose pubsub topic in `IDecodedMessage` ([628ac50](https://github.com/waku-org/js-waku/commit/628ac50d7104ec3c1dff44db58077a85db6b6aa1)), closes [#1208](https://github.com/waku-org/js-waku/issues/1208)
|
43
|
+
|
44
|
+
|
45
|
+
### Bug Fixes
|
46
|
+
|
47
|
+
* Prettier and cspell ignore CHANGELOG ([#1235](https://github.com/waku-org/js-waku/issues/1235)) ([4d7b3e3](https://github.com/waku-org/js-waku/commit/4d7b3e39e6761afaf5d05a13cc4b3c23e15f9bd5))
|
48
|
+
* Remove initialising peer-exchange while creating a node ([#1158](https://github.com/waku-org/js-waku/issues/1158)) ([1b41569](https://github.com/waku-org/js-waku/commit/1b4156902387ea35b24b3d6f5d22e4635ea8cf18))
|
49
|
+
|
50
|
+
|
51
|
+
### Miscellaneous Chores
|
52
|
+
|
53
|
+
* Bump libp2p dependencies ([803ae7b](https://github.com/waku-org/js-waku/commit/803ae7bd8ed3de665026446c23cde90e7eba9d36))
|
54
|
+
* Bump typescript ([12d86e6](https://github.com/waku-org/js-waku/commit/12d86e6abcc68e27c39ca86b4f0dc2b68cdd6000))
|
55
|
+
* Directly convert from ENR to `PeerInfo`, remove unneeded utility ([6dbcde0](https://github.com/waku-org/js-waku/commit/6dbcde041ab8fa8c2df75cc25319a0eccf6b0454))
|
56
|
+
* Extract encoder code ([22ffcf5](https://github.com/waku-org/js-waku/commit/22ffcf571aa3998267f0f3b59576abc38f3f4281))
|
57
|
+
* Update message.proto: payload and content topic are always defined ([5cf8ed2](https://github.com/waku-org/js-waku/commit/5cf8ed2030c9efbc4c4b66aa801827482c1e4249))
|
58
|
+
* Update store.proto ([967e6ff](https://github.com/waku-org/js-waku/commit/967e6ffc7ec6f780094e29599c47b723fa222dcc))
|
59
|
+
|
8
60
|
## [Unreleased]
|
9
61
|
|
62
|
+
### Added
|
63
|
+
|
64
|
+
- `multicodec` property on protocol interfaces.
|
65
|
+
|
10
66
|
## [0.0.7] - 2023-01-18
|
11
67
|
|
12
68
|
### Added
|
@@ -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.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.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.esnext.intl.d.ts","../src/connection_manager.ts","../../../node_modules/multiformats/dist/types/src/hashes/interface.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/link/interface.d.ts","../../../node_modules/multiformats/dist/types/src/cid.d.ts","../../../node_modules/@libp2p/interface-peer-id/dist/src/index.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-peer-info/dist/src/index.d.ts","../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../src/enr.ts","../src/message.ts","../../../node_modules/@libp2p/interfaces/dist/src/events.d.ts","../../../node_modules/uint8arraylist/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-record/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-peer-store/dist/src/index.d.ts","../../../node_modules/@libp2p/interfaces/dist/src/index.d.ts","../../../node_modules/it-stream-types/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-connection/dist/src/status.d.ts","../../../node_modules/@libp2p/interface-connection/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-stream-muxer/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-transport/dist/src/index.d.ts","../../../node_modules/@libp2p/interfaces/dist/src/startable.d.ts","../../../node_modules/@libp2p/interface-metrics/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-address-manager/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/transport-manager.d.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/interface-registrar/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-connection-manager/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/identify/index.d.ts","../../../node_modules/@libp2p/interface-peer-discovery/dist/src/index.d.ts","../../../node_modules/libp2p/node_modules/@libp2p/interface-dht/dist/src/index.d.ts","../../../node_modules/interface-store/dist/src/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-datastore/dist/src/index.d.ts","../../../node_modules/libp2p/node_modules/@libp2p/interface-content-routing/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/circuit/index.d.ts","../../../node_modules/@libp2p/interface-connection-encrypter/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-peer-routing/dist/src/index.d.ts","../../../node_modules/it-pushable/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-pubsub/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/ping/index.d.ts","../../../node_modules/libp2p/dist/src/fetch/index.d.ts","../../../node_modules/libp2p/dist/src/components.d.ts","../../../node_modules/@libp2p/interface-libp2p/node_modules/@libp2p/interface-dht/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-libp2p/node_modules/@libp2p/interface-content-routing/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-keychain/dist/src/index.d.ts","../../../node_modules/@libp2p/interface-libp2p/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/keychain/cms.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/codec.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/decode.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/encode.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/codecs/enum.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/codecs/message.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/utils.d.ts","../../../node_modules/@libp2p/crypto/node_modules/protons-runtime/dist/src/index.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/keys.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/interface.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/key-stretcher.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/ecdh.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/ephemeral-keys.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/rsa-class.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/ed25519-class.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/secp256k1-class.d.ts","../../../node_modules/@libp2p/interface-keys/dist/src/index.d.ts","../../../node_modules/@libp2p/crypto/dist/src/keys/index.d.ts","../../../node_modules/libp2p/dist/src/keychain/index.d.ts","../../../node_modules/@achingbrain/nat-port-mapper/dist/src/index.d.ts","../../../node_modules/libp2p/dist/src/nat-manager.d.ts","../../../node_modules/libp2p/dist/src/address-manager/index.d.ts","../../../node_modules/libp2p/dist/src/peer-routing.d.ts","../../../node_modules/libp2p/dist/src/connection-manager/latency-monitor.d.ts","../../../node_modules/libp2p/dist/src/connection-manager/index.d.ts","../../../node_modules/libp2p/dist/src/index.d.ts","../src/protocols.ts","../src/filter.ts","../src/sender.ts","../src/light_push.ts","../src/peer_exchange.ts","../../../node_modules/protobufjs/index.d.ts","../../../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.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","../src/waku.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":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","impliedFormat":1},{"version":"7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","impliedFormat":1},{"version":"8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","impliedFormat":1},{"version":"5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","impliedFormat":1},{"version":"4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","impliedFormat":1},{"version":"1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","impliedFormat":1},{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true,"impliedFormat":1},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true,"impliedFormat":1},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true,"impliedFormat":1},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true,"impliedFormat":1},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"46825bf23c8e345fb809ca11ba8cb987bdf39a46c868b4916d4fe9b0687dabdb","signature":"3e836ec68dd734248c913405f458ed2c66565c4fa4647aa1d0cb8fe5f35e2d66","impliedFormat":99},{"version":"65da6f0b8f50b27e05ebf35c88a8757eb4308751cdf2b1064a0e310a2a485895","impliedFormat":99},{"version":"2e3dc1d28f2467b2af0c931a3b0d2c595746a2f21818fc3c7b5d050996ace788","impliedFormat":99},{"version":"237be372eeb9a7ce07c6b2a21358f22772cde924614d67de175a4ac0ba3eb486","impliedFormat":99},{"version":"862eacc247d6c92524d7879feac6da363f55428cc78270bce7b14f2d3d0b0cef","impliedFormat":99},{"version":"f55f3ab9485b5fd1a3ba3a5a53e680cb8d3acc3552816a5d58a1fa26324262d0","impliedFormat":99},{"version":"ee93f3313289b31afd1544da65086607942df227eb61aedf488b7c072aa1128f","impliedFormat":99},{"version":"5d055d8b54e2dec3fe4aa417f5f664658b78123e83e8735047285f99a1d24065","impliedFormat":99},{"version":"1b03f8d19b753269d85e2e50ec2a2866bf349fb4f6e72aef6559e94c64511dee","impliedFormat":99},{"version":"edb50eace77052203c3bc6eb251fe31f44ab0107e2b6d949ec983a918726aaf4","impliedFormat":99},{"version":"5d055d8b54e2dec3fe4aa417f5f664658b78123e83e8735047285f99a1d24065","impliedFormat":99},{"version":"1b03f8d19b753269d85e2e50ec2a2866bf349fb4f6e72aef6559e94c64511dee","impliedFormat":99},{"version":"d2ed11d46c2c262b12914d93eebddddb4c6d6b24ebd316366afabfc64964759b","signature":"a5419b108da7e4c0241d74ab53bf2041c62e77815965d24605c2407415f11c5d","impliedFormat":99},{"version":"823cda0d9598d25a2d30e3ad87d40a5eb95198d8f866b3b938e760e97da45924","signature":"c9ca50a4faff709bceadf9a51c7e4743d5dff717459a044e3b24193f3988b658","impliedFormat":99},{"version":"4a5612eb59f581a5b8e05d22e668b4199787751266a0291e3e07113fc52abf2a","impliedFormat":99},{"version":"ea86fe238f679714f2b3662d9d932bc3b47a0500894985718243167043f2bda8","impliedFormat":99},{"version":"866f0c4f16380a56653adc6cbeac08c58c626dabb431f0fa6cc2ba07874836d8","impliedFormat":99},{"version":"e8c5b68c1182684e8cfc177430b80fef003976d1dbde326087c28f5125fe4b5d","impliedFormat":99},{"version":"a807c0a82557d68f6f0464d6af0a6566d1ef708f57c7d1d7dd8dde28879635bc","impliedFormat":99},{"version":"a2023e18c62b1109f17241fb1f90a84e75fffcb3ee9265d2e9bc0fa40b6ede42","impliedFormat":99},{"version":"6666d48a46dbfd565490e7f8789093e2392c5bdcc3a380dfdd91c77237e43101","impliedFormat":99},{"version":"6377354dd753557d479933e0bec6ca6836f839c87394ecb071e85f062b708058","impliedFormat":99},{"version":"4c5e54a2d502770a63859a00fbf77e8b91ce76b18080278f62866e7cdb582798","impliedFormat":99},{"version":"71dfda7df8d05d2d54627963af1c3c675ef99363d421b7ff42ae237d038db4ce","impliedFormat":99},{"version":"16c594cd8a44be9f5398d3fc7dbc9575f0b67d91a6553f35bd3576136862b32b","impliedFormat":99},{"version":"0fc1e0effc8ea83ceca9a1ff36c2696489fefea040d33fc5cbe244111333fcd4","impliedFormat":99},{"version":"0dd67171a4a3fa82044faec51befa11ab96f9205fd8cc96be09de275b65d36ab","impliedFormat":99},{"version":"42570779c28480ae0d1fa0695974a888305ee2b2efd37bacdeb57204dec843db","impliedFormat":99},{"version":"20e85d1b2ce7381a938a25a725a90f8610e68862c5a661acfeffaacd6513d392","impliedFormat":99},{"version":"667c9ac7c2f61c4a36220c2fa02f848a170aa96d3a58be32a5831aad86330da2","impliedFormat":99},{"version":"eb15dfd1f8b6da5f546fe29a6a0f0de4ae6dbd4a5577af4eba4c8a54548ef0a2","impliedFormat":99},{"version":"01443e5da049881a99f223c72617d4bb1d8854930d03deceb628e4be83df1e4a","impliedFormat":99},{"version":"76513b0c51c81a929f4f90694edf4dcc85f71bb46121b4192b5530e0601f9d81","impliedFormat":99},{"version":"a0263cc045540023e72c993a26fd1bef3adf8674b9719272009134c56ecfc336","impliedFormat":99},{"version":"df162b6f89985144d8aedccc36dfc366ab5e562ba8615125b2bfa25273f3006b","impliedFormat":99},{"version":"0820608ae5bf3995d77eedf0fa7f987c0d5c7c9592fdc0bcb391fb742d5067a0","impliedFormat":99},{"version":"14b8a1dd226271e6b045d91262602b15820ff871b3dab24510a15e6989d05a5d","impliedFormat":99},{"version":"5fe19747d9189572ddeeac452f5dcda8fa60fcd0f7b423f0f079bdec3cddbafe","impliedFormat":99},{"version":"274b714a925cc417f249f430b9c5c3ec80986044d8322d41e40fd39a7d154fa8","impliedFormat":99},{"version":"70cbb43b1e838bb77b16e1085115494c8b6925a954edf7fbdd494ad56a88adb8","impliedFormat":99},{"version":"ad716342f559ff88871c01a351dbf89fe72c8313f329cd2a714f09f532c50eab","impliedFormat":99},{"version":"6adc54eb855f3fda2603173a431be81830172099df37ddda11b6730c1c8d9147","impliedFormat":1},{"version":"8ad13afb5324460426b210f7c5040d3d19375accd24e22bb52a534c728aca73e","impliedFormat":99},{"version":"e1fe04ff1ffecfb18420f0895d0cd2652f98a27def5c33aae5ef328f186c905b","impliedFormat":99},{"version":"635e7c978a30ab2013a37c4d05d0d081e58e4ad867db46a009412ad24ee426d7","impliedFormat":99},{"version":"b27c2a28daf3e502ae6b631cbf51881247fffd3e0163520bc5904604f9e48096","impliedFormat":99},{"version":"87b44430497cae7542bbd5ac2fb6663df6a465dea7a46be58a49cd9416530439","impliedFormat":99},{"version":"32b67d761db3999f1e482d0add405b695d3ec5607e07ae4c963a96334c331814","impliedFormat":99},{"version":"8747571dae434deca4847b49e09b5421d7068b0956a1df841756812645d4e1ed","impliedFormat":99},{"version":"474ab86e676e0c1b664bfcd21b1e58bed351f3390ba1d892e8da703f371b7a4e","impliedFormat":99},{"version":"fb7a601066e19b5d0c173b564bd46b358cf00c9040e79fb6fd427b7aa223eed1","impliedFormat":99},{"version":"4a8ce4a308482d69bd9032ee59f895a9d91e28ac5324665b31ea3a374b45e686","impliedFormat":99},{"version":"8b097e48fdeabcee00e2aacd4d009dff135c2cd51675a272d74ec25dd853dfee","impliedFormat":99},{"version":"28235440c6b330eb66df3a7badfc11e32cf7e08fbdb17b518a6b775fb269170f","impliedFormat":99},{"version":"247a5bebf668df6d3bb7e0b297ed5a6b6913d9343dcfea5bf77ce4662ab102bf","impliedFormat":99},{"version":"531556008024c69163c0d120823a69e7a6a5be1279ea87fc725a63dc386278b7","impliedFormat":99},{"version":"df99b5b6041e9e37b46c876cd487020e4bc9e02a519fa4a735cbe18f5c4f2f38","impliedFormat":99},{"version":"272cd5e6428b68d973ce707329c3f621ac6b3eb4bf5bd4421b1106299600ddde","impliedFormat":99},{"version":"2202644315d85ab8985d4f72fe136c00e53db91ac06a0646eff7980e55bdacb3","impliedFormat":99},{"version":"cd5ab2f30a27d53001804b7ef51758a79b73e4ccb7716b8e2ab8e17d69a7183b","impliedFormat":99},{"version":"9080b537cd4fa24273477f33faf5f983e5f10aa386c2de8fcb6de837c9cc9763","impliedFormat":99},{"version":"d34a8917095f11006957bed03e1e60dacc0b82906f5d0ddc87b959e283fbb5cc","impliedFormat":99},{"version":"bffe8a5db9410d2f3320df7016f83e9de47328e377aa78b9aaed1fe6d5db9d66","impliedFormat":99},{"version":"a9dc4418352bc4a8d1e9314aba1e29327b17d06c604b397c6140d6488c5b022a","impliedFormat":99},{"version":"6adcf362e079c177ea4730c8b7beb3e9848b3f970ef08b497a641e034b0a0ece","impliedFormat":99},{"version":"114ef8adba09ab579b6bd6d16b2c83ddea02c1f5ff598f3144f2c3853ef3eb7d","impliedFormat":99},{"version":"ad716342f559ff88871c01a351dbf89fe72c8313f329cd2a714f09f532c50eab","impliedFormat":99},{"version":"272cd5e6428b68d973ce707329c3f621ac6b3eb4bf5bd4421b1106299600ddde","impliedFormat":99},{"version":"1217c84b164e559b2371aea1b8c11eea9f95e123dab98942c8a5a4aacc2ad252","impliedFormat":99},{"version":"ff7cac2918f2366662638f93e820f2ec9fd86e5786eb494e6757b707f8a10216","impliedFormat":99},{"version":"995a3938e28f1a7e359847f83b43951c05727b6ca42398982778adc8b9a58609","impliedFormat":99},{"version":"77411d10dad0e74a86ce28dd0f720cce2947421e42f3fb5d1849bc14520f9b5b","impliedFormat":99},{"version":"667c9ac7c2f61c4a36220c2fa02f848a170aa96d3a58be32a5831aad86330da2","impliedFormat":99},{"version":"eb15dfd1f8b6da5f546fe29a6a0f0de4ae6dbd4a5577af4eba4c8a54548ef0a2","impliedFormat":99},{"version":"01443e5da049881a99f223c72617d4bb1d8854930d03deceb628e4be83df1e4a","impliedFormat":99},{"version":"a380f922477db0b9b4a17cde7d29585e2280036fd62ac4564814d4844b64717a","impliedFormat":99},{"version":"a0263cc045540023e72c993a26fd1bef3adf8674b9719272009134c56ecfc336","impliedFormat":99},{"version":"df162b6f89985144d8aedccc36dfc366ab5e562ba8615125b2bfa25273f3006b","impliedFormat":99},{"version":"1a57e52e42a8ff2121d47cba8133c73b4e10ede7252881dc131cf514b28f884e","impliedFormat":99},{"version":"cfb5cd87dcce3ac2d6e4e575ae732791e1d77e047c0018bfc5f9e4d1ba355719","impliedFormat":99},{"version":"a979d3d312f1d879a5c77493697380b6caae9333e2fe0f51bb0fb0473dc211ba","impliedFormat":99},{"version":"aaf4673898dca18c059997aae0e8ae725215c8ee0998e9d4a6fd173384276748","impliedFormat":99},{"version":"b90473059128d1a4c028852a710058a3a8944835188672f5846deba05a1e778e","impliedFormat":99},{"version":"216601fa3da32170d99a6cbdea143a00dfd5a7bfddcf231126493c0ab992daf4","impliedFormat":99},{"version":"06245aedbc73b4f39fabd67ab13f451e009489bd66dac614184c8f97034f8016","impliedFormat":99},{"version":"b3bff8270798e03d00349137271e3f11074ec5281a393289dd8f33f37627828b","impliedFormat":99},{"version":"3b65ca51bc8915ae230bb40cb6a9662bcdcde83c402f57d7f8b8c803d497d0af","impliedFormat":99},{"version":"28393110732dca5855c0fd444777dc978d010ecba3204c4c48cfa26ee612bc13","impliedFormat":99},{"version":"01fd310805f9c29fc38a6580e32f75291d5dd3918e7acdfc7d50548ba0c4bf9b","impliedFormat":99},{"version":"f569da0d6f4c6fb153811dd6b7d34afb4511c7d85f5089e30a1db78004975ec1","impliedFormat":99},{"version":"537b1070107a0454a2fe365a633555700fff55a4b3e15d55520633b93dbf96d1","impliedFormat":99},{"version":"6b616e00e177a11c8054c70c821ca2d0c976403d11ad466385dddc89245e7ade","impliedFormat":99},{"version":"8dac050016c78a797699221c95d569c47ea4176e403b47f9f5a2e95afe26cdd6","impliedFormat":99},{"version":"d8a63ecc9188f8ef5fce8c82ea2c691acce9a152b8bd07d75a6531c7d4c07df9","impliedFormat":99},{"version":"4967ab74e79f8d087627020dd95dd6f803b79a14410acb11b4c8a33db61bdcf3","impliedFormat":99},{"version":"41326ccdc0707b973e3a285711e4d4ff37b999745d1539e346800a8f1db8e702","impliedFormat":99},{"version":"8fb8c36e2092ada3e3bec060a70906215d45271520d8e5696d37791c821345c5","signature":"b70c5f86a62c2c46fa4913b0b5e26842082247f74b97f31b3e87acef5a72a11e","impliedFormat":99},{"version":"29c695f7945550db3ce747a232d3faeecdda1894238741085f177280e87a5d9c","signature":"3d17b221e1c790c0c4e3d9b5273441ce37c565401da264d39b68ded63bc2bcb1","impliedFormat":99},{"version":"a0fd4c6725440b1f75f299266ae46e186809df6817f5c73973d2212d93508a94","signature":"0c5bc6a0a6664bfcb6d53bec072fe1b83e129ea965143e826b7e3f40b0c8fa96","impliedFormat":99},{"version":"9a601b898fe409fd17b07b76461728dbf8c6e787427b46c0d91aa5ca2b908329","signature":"2e1d641e085f3fad3bfaa36a3aa917703f314cd3e52057538554c8f5a1362872","impliedFormat":99},{"version":"bfa8d4e850a1ea4a568424e3aa5b6b76f3e9dee2226e704307c25c50709f7917","signature":"94fc6dd8f95aaf163e5cde84558bf45867fccacfb2632c6e85265efda6dbc0a4","impliedFormat":99},{"version":"1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da","impliedFormat":1},{"version":"925a8770415572378b7b62dcd714e744b7ffed86de59bdbe1d25c68d9d1f7f51","impliedFormat":99},{"version":"95a29532177f932fec5fc4e51577eaae6bd037fd21188fb3060a3e5c9fbc806a","impliedFormat":99},{"version":"53fd58c3edf98bdecd9f4fccab88f8f34b5c7ea3d7411b7c2aeea77419048789","impliedFormat":99},{"version":"831f1ad45e156fa12bf736f4895329cb6e785f1c940fc58043718409d9845a43","impliedFormat":99},{"version":"32ffd3e74601a33cbf6a7596e00338eba67cf598faed2903be4281ba7ec076b5","impliedFormat":99},{"version":"a74df8c2d7267abcce2128511b4260a68eb1a377db38a95ec7e9a58aa98beb02","impliedFormat":99},{"version":"bc78b25c3aaf139ca527952875c53bff67360e6b5812b82a8fa89fdefb720879","impliedFormat":99},{"version":"460f30d6ea494bbf076853e1588d30ec4651efcc26cbfcd2c91362f7efc87e89","impliedFormat":1},{"version":"b96a5c8de20ea0ec0bd266593fdafce71126c8d9f02cb292ed106dccc1bc45b5","impliedFormat":99},{"version":"20c01d0e02f7668253adca2048bf4577071c4fb7ced36f6bc1e4d994c657d54c","impliedFormat":99},{"version":"58e4a27ed43582c3d5322a2460f8016562b709454498c39b1bff15aab648125b","impliedFormat":99},{"version":"4a79e2c6d0d94fcb0f8eff4a518c2b75da5ccf9b9cc67ee80cf2e33e9e0c8aff","impliedFormat":99},{"version":"ce218e7127b5c109cc128316dcafb71146b483c3476cb6e30c4a84e38a4ea7e7","impliedFormat":99},{"version":"989a1bfc460b911efd1e8869871d820b7a75993c8fb39ab71a4d548f1bacf4a8","impliedFormat":99},{"version":"60ca66c2e560e891c4bbac8a6664edeb14a2757c1269bc4a5be91859fe70b14e","impliedFormat":99},{"version":"4554975154067a41dbf852d4d68c887940ad9ff463a9e8415c37c6cf8dc9b10c","impliedFormat":99},{"version":"932cade1c5802123b5831f332ad8a6297f0f7d14d0ee04f5a774408f393e2200","impliedFormat":1},{"version":"1165dc3daad62e737ee6c7016470a4a9a4c751be9f47da494a718a0b428bfe49","impliedFormat":99},{"version":"507246c9be0c2ede6a41b75e144065bf780601d67d2d9816f9b362aeb0e24649","impliedFormat":99},{"version":"5743dc02a8998c840566e599b1b50f7ff8a2797459ae9b6a41cb75aae55d8643","signature":"c7140b5553a6d889510a806f6d669660307fdb313cabe878ac83f70df1fbee9b","impliedFormat":99},{"version":"ee2cae94def1ab5af8a63dd7928bf3bf19a835d439be32d15fa65ec45edaee78","signature":"9baaecd1ece45f7966156fcb69f9d366aed3d1e8e604e58042970de681228929","impliedFormat":99},{"version":"3cfae0013abd187cb974320a4f4201ff9f8527d55b07b1a9919deb2902db2c89","signature":"15a6ebf6dc00e8474f7ee0e2c6321b7ad328b4b59d03ee7b103c94a71bbd3a7e","impliedFormat":99},{"version":"2af293a49d3e84309c3faddb8686caaab9d29755186f3ef66c429c218f0811ee","impliedFormat":99},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true,"impliedFormat":1},{"version":"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f","impliedFormat":1},{"version":"e193e634a99c9c1d71f1c6e4e1567a4a73584328d21ea02dd5cddbaad6693f61","affectsGlobalScope":true,"impliedFormat":1},{"version":"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"5eb881ed2a0d5b17ea36df5cd4c4be500e460c412f270c3170e906bec65580ac","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","impliedFormat":1},{"version":"f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true,"impliedFormat":1},{"version":"80473bd0dd90ca1e166514c2dfead9d5803f9c51418864ca35abbeec6e6847e1","impliedFormat":1},{"version":"1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","impliedFormat":1},{"version":"5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","impliedFormat":1},{"version":"04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","impliedFormat":1},{"version":"7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320","impliedFormat":1},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true,"impliedFormat":1},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true,"impliedFormat":1},{"version":"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","impliedFormat":1},{"version":"ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8d555f3d607ecaa18d55de6995ea8f206342ecc93305919eac945c7c78c78c6","impliedFormat":1},{"version":"677646e2620795c98a539fb12fb531f10331c217cef1492132b2518f894fa92d","affectsGlobalScope":true,"impliedFormat":1}],"options":{"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"module":6,"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":7,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[214],[49,57,60,79,80,105,145,146,147,154,157,158,159,160,162,214],[145,146,214],[145,161,214],[144,214],[105,145,146,149,214],[148,150,214],[148,149,156,214],[152,214],[146,148,150,151,153,154,155,214],[146,214],[58,64,214],[146,154,214],[49,51,105,129,145,214],[122,214],[91,214],[124,214],[121,123,125,126,127,128,129,214],[58,120,214],[120,214],[114,214],[114,120,214],[58,114,214],[114,115,116,117,118,119,214],[51,57,214],[49,62,214],[49,51,57,61,64,214],[49,51,58,61,62,63,214],[45,49,214],[49,51,52,57,60,61,64,67,68,79,83,100,103,105,111,214],[48,52,61,214],[48,49,52,61,82,214],[64,214],[52,57,214],[44,48,214],[49,51,214],[49,52,61,214],[49,51,52,57,59,214],[49,57,58,64,104,214],[49,58,214],[49,64,214],[61,62,64,214],[51,57,61,62,64,65,214],[50,214],[51,214],[168,214],[171,214],[172,177,205,214],[173,184,185,192,202,213,214],[173,174,184,192,214],[175,214],[176,177,185,193,214],[177,202,210,214],[178,180,184,192,214],[179,214],[180,181,214],[184,214],[182,184,214],[184,185,186,202,213,214],[184,185,186,199,202,205,214],[214,218],[180,187,192,202,213,214],[184,185,187,188,192,202,210,213,214],[187,189,202,210,213,214],[168,169,170,171,172,173,174,175,176,177,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],[184,190,214],[191,213,214],[180,184,192,202,214],[193,214],[194,214],[171,195,214],[196,212,214,218],[197,214],[198,214],[184,199,200,214],[199,201,214,216],[172,184,202,203,204,205,214],[172,202,204,214],[202,203,214],[205,214],[206,214],[184,208,209,214],[208,209,214],[177,192,202,210,214],[211,214],[192,212,214],[172,187,198,213,214],[177,214],[202,214,215],[214,216],[214,217],[172,177,184,186,195,202,213,214,216,218],[202,214,219],[84,98,214],[97,214],[49,51,57,66,69,214],[49,60,66,67,79,80,100,214],[49,60,64,66,67,68,69,79,80,83,99,100,103,105,214],[49,51,57,60,61,64,66,67,68,80,136,214],[57,214],[49,61,64,67,79,80,214],[49,51,60,61,64,67,69,78,79,80,214],[58,77,214],[49,52,60,61,64,65,66,68,70,81,82,83,99,100,101,102,103,105,106,107,108,112,131,133,134,135,137,214],[131,214],[49,99,113,130,214],[49,66,67,69,132,214],[49,52,60,61,67,103,214],[49,61,67,79,80,214],[51,57,61,64,66,67,68,69,214],[45,214],[91,92,93,94,214],[47,48,214],[47,214],[46,214],[85,214],[44,214],[44,87,214],[48,86,87,88,89,90,214],[44,45,46,47,85,214],[44,45,46,214],[77,214],[71,214],[71,77,214],[58,71,214],[71,72,73,74,75,76,214],[96,214],[91,95,214],[53,214],[54,214],[49,52,54,214],[56,139,214],[43,55,56,139,140,141,142,143,164,165,166,214],[139,141,214],[49,55,60,80,139,214],[49,56,60,138,214],[56,139,141,163,214],[49,54,64,112,139,140,142,164,165,214],[49,52,54],[56,139],[139,141],[49,55,60,80,139],[49,56,60,138],[56,139,141,163],[49,54,64,112,139,140,142,164,165]],"referencedMap":[[132,1],[159,1],[163,2],[147,3],[162,4],[145,5],[154,6],[151,7],[157,8],[153,9],[148,1],[149,1],[156,10],[150,11],[160,12],[158,13],[146,14],[155,1],[124,15],[127,16],[125,17],[130,18],[122,1],[123,15],[121,19],[126,16],[128,16],[114,20],[117,21],[118,22],[115,23],[116,21],[120,24],[119,20],[69,25],[102,26],[80,27],[64,28],[63,1],[111,29],[129,1],[112,30],[110,31],[109,32],[68,33],[82,34],[49,35],[52,36],[103,37],[60,38],[105,39],[59,40],[79,41],[65,42],[66,43],[57,1],[61,1],[67,1],[51,44],[50,45],[222,1],[168,46],[169,46],[171,47],[172,48],[173,49],[174,50],[175,51],[176,52],[177,53],[178,54],[179,55],[180,56],[181,56],[183,57],[182,58],[184,57],[185,59],[186,60],[170,61],[220,1],[187,62],[188,63],[189,64],[221,65],[190,66],[191,67],[192,68],[193,69],[194,70],[195,71],[196,72],[197,73],[198,74],[199,75],[200,75],[201,76],[202,77],[204,78],[203,79],[205,80],[206,81],[207,1],[208,82],[209,83],[210,84],[211,85],[212,86],[213,87],[214,88],[215,89],[216,90],[217,91],[218,92],[219,93],[152,1],[99,94],[98,95],[84,1],[104,1],[62,1],[134,96],[101,97],[108,98],[137,99],[136,100],[107,101],[81,102],[78,103],[138,104],[113,105],[131,106],[133,107],[135,108],[106,109],[70,110],[100,31],[83,32],[94,111],[45,1],[95,112],[46,113],[90,1],[48,114],[85,115],[93,116],[92,116],[87,117],[88,118],[44,1],[91,119],[86,120],[47,121],[89,1],[144,1],[161,5],[71,122],[74,123],[75,124],[72,125],[73,123],[77,126],[76,122],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[58,1],[97,127],[96,128],[54,129],[53,130],[43,1],[55,131],[140,132],[167,133],[142,134],[56,1],[143,135],[139,136],[164,137],[141,132],[165,132],[166,138]],"exportedModulesMap":[[132,1],[159,1],[163,2],[147,3],[162,4],[145,5],[154,6],[151,7],[157,8],[153,9],[148,1],[149,1],[156,10],[150,11],[160,12],[158,13],[146,14],[155,1],[124,15],[127,16],[125,17],[130,18],[122,1],[123,15],[121,19],[126,16],[128,16],[114,20],[117,21],[118,22],[115,23],[116,21],[120,24],[119,20],[69,25],[102,26],[80,27],[64,28],[63,1],[111,29],[129,1],[112,30],[110,31],[109,32],[68,33],[82,34],[49,35],[52,36],[103,37],[60,38],[105,39],[59,40],[79,41],[65,42],[66,43],[57,1],[61,1],[67,1],[51,44],[50,45],[222,1],[168,46],[169,46],[171,47],[172,48],[173,49],[174,50],[175,51],[176,52],[177,53],[178,54],[179,55],[180,56],[181,56],[183,57],[182,58],[184,57],[185,59],[186,60],[170,61],[220,1],[187,62],[188,63],[189,64],[221,65],[190,66],[191,67],[192,68],[193,69],[194,70],[195,71],[196,72],[197,73],[198,74],[199,75],[200,75],[201,76],[202,77],[204,78],[203,79],[205,80],[206,81],[207,1],[208,82],[209,83],[210,84],[211,85],[212,86],[213,87],[214,88],[215,89],[216,90],[217,91],[218,92],[219,93],[152,1],[99,94],[98,95],[84,1],[104,1],[62,1],[134,96],[101,97],[108,98],[137,99],[136,100],[107,101],[81,102],[78,103],[138,104],[113,105],[131,106],[133,107],[135,108],[106,109],[70,110],[100,31],[83,32],[94,111],[45,1],[95,112],[46,113],[90,1],[48,114],[85,115],[93,116],[92,116],[87,117],[88,118],[44,1],[91,119],[86,120],[47,121],[89,1],[144,1],[161,5],[71,122],[74,123],[75,124],[72,125],[73,123],[77,126],[76,122],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[58,1],[97,127],[96,128],[54,129],[53,130],[55,139],[140,140],[167,133],[142,141],[143,142],[139,143],[164,144],[141,140],[165,140],[166,145]],"semanticDiagnosticsPerFile":[132,159,163,147,162,145,154,151,157,153,148,149,156,150,160,158,146,155,124,127,125,130,122,123,121,126,128,114,117,118,115,116,120,119,69,102,80,64,63,111,129,112,110,109,68,82,49,52,103,60,105,59,79,65,66,57,61,67,51,50,222,168,169,171,172,173,174,175,176,177,178,179,180,181,183,182,184,185,186,170,220,187,188,189,221,190,191,192,193,194,195,196,197,198,199,200,201,202,204,203,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,152,99,98,84,104,62,134,101,108,137,136,107,81,78,138,113,131,133,135,106,70,100,83,94,45,95,46,90,48,85,93,92,87,88,44,91,86,47,89,144,161,71,74,75,72,73,77,76,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,58,97,96,54,53,43,55,140,167,142,56,143,139,164,141,165,166]},"version":"4.9.5"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare enum Tags {
|
2
|
+
BOOTSTRAP = "bootstrap",
|
3
|
+
PEER_EXCHANGE = "peer-exchange"
|
4
|
+
}
|
5
|
+
export interface ConnectionManagerOptions {
|
6
|
+
/**
|
7
|
+
* Number of attempts before a peer is considered non-dialable
|
8
|
+
* This is used to not spam a peer with dial attempts when it is not dialable
|
9
|
+
*/
|
10
|
+
maxDialAttemptsForPeer: number;
|
11
|
+
/**
|
12
|
+
* Max number of bootstrap peers allowed to be connected to, initially
|
13
|
+
* This is used to increase intention of dialing non-bootstrap peers, found using other discovery mechanisms (like Peer Exchange)
|
14
|
+
*/
|
15
|
+
maxBootstrapPeersAllowed: number;
|
16
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"connection_manager.js","sourceRoot":"","sources":["../src/connection_manager.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,+BAAuB,CAAA;IACvB,uCAA+B,CAAA;AACjC,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf"}
|
package/dist/enr.d.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
2
|
+
import type { PeerInfo } from "@libp2p/interface-peer-info";
|
2
3
|
import type { Multiaddr } from "@multiformats/multiaddr";
|
3
|
-
export
|
4
|
-
export
|
4
|
+
export type ENRKey = string;
|
5
|
+
export type ENRValue = Uint8Array;
|
5
6
|
/**
|
6
7
|
* We represent NodeId as a hex string, since node equality is used very heavily
|
7
8
|
* and it is convenient to index data by NodeId
|
8
9
|
*/
|
9
|
-
export
|
10
|
-
export
|
10
|
+
export type NodeId = string;
|
11
|
+
export type SequenceNumber = bigint;
|
11
12
|
export interface Waku2 {
|
12
13
|
relay: boolean;
|
13
14
|
store: boolean;
|
@@ -29,6 +30,9 @@ export interface IEnr extends Map<ENRKey, ENRValue> {
|
|
29
30
|
udp6?: number;
|
30
31
|
multiaddrs?: Multiaddr[];
|
31
32
|
waku2?: Waku2;
|
32
|
-
|
33
|
+
peerInfo: PeerInfo | undefined;
|
34
|
+
/**
|
35
|
+
* @deprecated: use { @link IEnr.peerInfo } instead.
|
36
|
+
*/
|
33
37
|
getFullMultiaddrs(): Multiaddr[];
|
34
38
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
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"}
|
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"}
|
package/dist/light_push.d.ts
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
export
|
4
|
-
push: (encoder: IEncoder, message: IMessage, opts?: ProtocolOptions) => Promise<SendResult>;
|
5
|
-
}
|
1
|
+
import type { PointToPointProtocol } from "./protocols.js";
|
2
|
+
import type { ISender } from "./sender.js";
|
3
|
+
export type ILightPush = ISender & PointToPointProtocol;
|
package/dist/message.d.ts
CHANGED
@@ -12,10 +12,11 @@ export interface IRateLimitProof {
|
|
12
12
|
* Field types matches the protobuf type over the wire
|
13
13
|
*/
|
14
14
|
export interface IProtoMessage {
|
15
|
-
payload: Uint8Array
|
16
|
-
contentTopic: string
|
15
|
+
payload: Uint8Array;
|
16
|
+
contentTopic: string;
|
17
17
|
version: number | undefined;
|
18
18
|
timestamp: bigint | undefined;
|
19
|
+
meta: Uint8Array | undefined;
|
19
20
|
rateLimitProof: IRateLimitProof | undefined;
|
20
21
|
ephemeral: boolean | undefined;
|
21
22
|
}
|
@@ -23,10 +24,30 @@ export interface IProtoMessage {
|
|
23
24
|
* Interface for messages to encode and send.
|
24
25
|
*/
|
25
26
|
export interface IMessage {
|
26
|
-
payload
|
27
|
+
payload: Uint8Array;
|
27
28
|
timestamp?: Date;
|
28
29
|
rateLimitProof?: IRateLimitProof;
|
29
30
|
}
|
31
|
+
export interface IMetaSetter {
|
32
|
+
(message: IProtoMessage & {
|
33
|
+
meta: undefined;
|
34
|
+
}): Uint8Array;
|
35
|
+
}
|
36
|
+
export interface EncoderOptions {
|
37
|
+
/** The content topic to set on outgoing messages. */
|
38
|
+
contentTopic: string;
|
39
|
+
/**
|
40
|
+
* An optional flag to mark message as ephemeral, i.e., not to be stored by Waku Store nodes.
|
41
|
+
* @defaultValue `false`
|
42
|
+
*/
|
43
|
+
ephemeral?: boolean;
|
44
|
+
/**
|
45
|
+
* A function called when encoding messages to set the meta field.
|
46
|
+
* @param IProtoMessage The message encoded for wire, without the meta field.
|
47
|
+
* If encryption is used, `metaSetter` only accesses _encrypted_ payload.
|
48
|
+
*/
|
49
|
+
metaSetter?: IMetaSetter;
|
50
|
+
}
|
30
51
|
export interface IEncoder {
|
31
52
|
contentTopic: string;
|
32
53
|
ephemeral: boolean;
|
@@ -34,8 +55,9 @@ export interface IEncoder {
|
|
34
55
|
toProtoObj: (message: IMessage) => Promise<IProtoMessage | undefined>;
|
35
56
|
}
|
36
57
|
export interface IDecodedMessage {
|
37
|
-
payload: Uint8Array
|
38
|
-
contentTopic: string
|
58
|
+
payload: Uint8Array;
|
59
|
+
contentTopic: string;
|
60
|
+
pubSubTopic: string;
|
39
61
|
timestamp: Date | undefined;
|
40
62
|
rateLimitProof: IRateLimitProof | undefined;
|
41
63
|
ephemeral: boolean | undefined;
|
@@ -43,5 +65,5 @@ export interface IDecodedMessage {
|
|
43
65
|
export interface IDecoder<T extends IDecodedMessage> {
|
44
66
|
contentTopic: string;
|
45
67
|
fromWireToProtoObj: (bytes: Uint8Array) => Promise<IProtoMessage | undefined>;
|
46
|
-
fromProtoObj: (proto: IProtoMessage) => Promise<T | undefined>;
|
68
|
+
fromProtoObj: (pubSubTopic: string, proto: IProtoMessage) => Promise<T | undefined>;
|
47
69
|
}
|
package/dist/peer_exchange.d.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import type { ConnectionManager } from "@libp2p/interface-connection-manager";
|
2
2
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
3
3
|
import type { PeerStore } from "@libp2p/interface-peer-store";
|
4
|
-
import type { Registrar } from "@libp2p/interface-registrar";
|
5
4
|
import { IEnr } from "./enr.js";
|
6
5
|
import { PointToPointProtocol } from "./protocols.js";
|
7
6
|
export interface IPeerExchange extends PointToPointProtocol {
|
8
|
-
query(params: PeerExchangeQueryParams
|
7
|
+
query(params: PeerExchangeQueryParams): Promise<PeerInfo[] | undefined>;
|
9
8
|
}
|
10
9
|
export interface PeerExchangeQueryParams {
|
11
10
|
numPeers: number;
|
@@ -20,5 +19,4 @@ export interface PeerInfo {
|
|
20
19
|
export interface PeerExchangeComponents {
|
21
20
|
connectionManager: ConnectionManager;
|
22
21
|
peerStore: PeerStore;
|
23
|
-
registrar: Registrar;
|
24
22
|
}
|
package/dist/protocols.d.ts
CHANGED
@@ -1,25 +1,58 @@
|
|
1
1
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
2
2
|
import type { Peer, PeerStore } from "@libp2p/interface-peer-store";
|
3
|
-
import type {
|
3
|
+
import type { Libp2pOptions } from "libp2p";
|
4
|
+
import type { IDecodedMessage } from "./message.js";
|
4
5
|
export declare enum Protocols {
|
5
6
|
Relay = "relay",
|
6
7
|
Store = "store",
|
7
8
|
LightPush = "lightpush",
|
8
|
-
Filter = "filter"
|
9
|
-
PeerExchange = "peer-exchange"
|
9
|
+
Filter = "filter"
|
10
10
|
}
|
11
11
|
export interface PointToPointProtocol {
|
12
|
+
multicodec: string;
|
12
13
|
peerStore: PeerStore;
|
13
14
|
peers: () => Promise<Peer[]>;
|
14
15
|
}
|
15
|
-
export
|
16
|
+
export type ProtocolCreateOptions = {
|
17
|
+
/**
|
18
|
+
* The PubSub Topic to use. Defaults to {@link @waku/core.DefaultPubSubTopic }.
|
19
|
+
*
|
20
|
+
* One and only one pubsub topic is used by Waku. This is used by:
|
21
|
+
* - WakuRelay to receive, route and send messages,
|
22
|
+
* - WakuLightPush to send messages,
|
23
|
+
* - WakuStore to retrieve messages.
|
24
|
+
*
|
25
|
+
* The usage of the default pubsub topic is recommended.
|
26
|
+
* See [Waku v2 Topic Usage Recommendations](https://rfc.vac.dev/spec/23/) for details.
|
27
|
+
*
|
28
|
+
*/
|
16
29
|
pubSubTopic?: string;
|
30
|
+
/**
|
31
|
+
* You can pass options to the `Libp2p` instance used by {@link @waku/core.WakuNode} using the `libp2p` property.
|
32
|
+
* 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)
|
33
|
+
* apart that we made the `modules` property optional and partial,
|
34
|
+
* allowing its omission and letting Waku set good defaults.
|
35
|
+
* Notes that some values are overridden by {@link @waku/core.WakuNode} to ensure it implements the Waku protocol.
|
36
|
+
*/
|
37
|
+
libp2p?: Partial<Libp2pOptions>;
|
38
|
+
/**
|
39
|
+
* Byte array used as key for the noise protocol used for connection encryption
|
40
|
+
* by [`Libp2p.create`](https://github.com/libp2p/js-libp2p/blob/master/doc/API.md#create)
|
41
|
+
* This is only used for test purposes to not run out of entropy during CI runs.
|
42
|
+
*/
|
43
|
+
staticNoiseKey?: Uint8Array;
|
44
|
+
/**
|
45
|
+
* Use recommended bootstrap method to discovery and connect to new nodes.
|
46
|
+
*/
|
47
|
+
defaultBootstrap?: boolean;
|
48
|
+
};
|
49
|
+
export type ProtocolOptions = {
|
17
50
|
/**
|
18
51
|
* Optionally specify an PeerId for the protocol request. If not included, will use a random peer.
|
19
52
|
*/
|
20
53
|
peerId?: PeerId;
|
21
54
|
};
|
22
|
-
export
|
55
|
+
export type Callback<T extends IDecodedMessage> = (msg: T) => void | Promise<void>;
|
23
56
|
export interface SendResult {
|
24
57
|
recipients: PeerId[];
|
25
58
|
}
|
package/dist/protocols.js
CHANGED
package/dist/protocols.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"protocols.js","sourceRoot":"","sources":["../src/protocols.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"protocols.js","sourceRoot":"","sources":["../src/protocols.ts"],"names":[],"mappings":"AAMA,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"}
|
package/dist/relay.d.ts
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
|
2
|
-
import type { IDecodedMessage, IDecoder
|
3
|
-
import type { Callback
|
4
|
-
|
5
|
-
|
2
|
+
import type { IDecodedMessage, IDecoder } from "./message.js";
|
3
|
+
import type { Callback } from "./protocols.js";
|
4
|
+
import type { ISender } from "./sender.js";
|
5
|
+
type PubSubTopic = string;
|
6
|
+
type ContentTopic = string;
|
7
|
+
export type ActiveSubscriptions = Map<PubSubTopic, ContentTopic[]>;
|
8
|
+
interface IRelayAPI {
|
6
9
|
addObserver: <T extends IDecodedMessage>(decoder: IDecoder<T>, callback: Callback<T>) => () => void;
|
7
10
|
getMeshPeers: () => string[];
|
11
|
+
getActiveSubscriptions: () => ActiveSubscriptions | undefined;
|
8
12
|
}
|
13
|
+
export type IRelay = IRelayAPI & GossipSub & ISender;
|
14
|
+
export {};
|
package/dist/sender.d.ts
ADDED
package/dist/sender.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sender.js","sourceRoot":"","sources":["../src/sender.ts"],"names":[],"mappings":""}
|
package/dist/store.d.ts
CHANGED
@@ -8,18 +8,13 @@ export interface TimeFilter {
|
|
8
8
|
startTime: Date;
|
9
9
|
endTime: Date;
|
10
10
|
}
|
11
|
-
export interface
|
12
|
-
digest
|
13
|
-
|
14
|
-
senderTime
|
15
|
-
pubsubTopic
|
11
|
+
export interface Cursor {
|
12
|
+
digest: Uint8Array;
|
13
|
+
receiverTime: bigint;
|
14
|
+
senderTime: bigint;
|
15
|
+
pubsubTopic: string;
|
16
16
|
}
|
17
|
-
export
|
18
|
-
digest?: Uint8Array;
|
19
|
-
senderTime?: bigint;
|
20
|
-
pubsubTopic?: string;
|
21
|
-
};
|
22
|
-
export declare type StoreQueryOptions = {
|
17
|
+
export type StoreQueryOptions = {
|
23
18
|
/**
|
24
19
|
* The direction in which pages are retrieved:
|
25
20
|
* - { @link PageDirection.BACKWARD }: Most recent page first.
|
@@ -40,7 +35,8 @@ export declare type StoreQueryOptions = {
|
|
40
35
|
*/
|
41
36
|
timeFilter?: TimeFilter;
|
42
37
|
/**
|
43
|
-
* Cursor as an index to start a query from.
|
38
|
+
* Cursor as an index to start a query from. Must be generated from a Waku
|
39
|
+
* Message.
|
44
40
|
*/
|
45
41
|
cursor?: Cursor;
|
46
42
|
} & ProtocolOptions;
|
package/dist/waku.d.ts
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
import type { Stream } from "@libp2p/interface-connection";
|
2
|
+
import type { Libp2p } from "@libp2p/interface-libp2p";
|
2
3
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
3
4
|
import type { Multiaddr } from "@multiformats/multiaddr";
|
4
|
-
import type { Libp2p } from "libp2p";
|
5
5
|
import type { IFilter } from "./filter.js";
|
6
6
|
import type { ILightPush } from "./light_push.js";
|
7
|
-
import type { IPeerExchange } from "./peer_exchange.js";
|
8
7
|
import { Protocols } from "./protocols.js";
|
9
8
|
import type { IRelay } from "./relay.js";
|
10
9
|
import type { IStore } from "./store.js";
|
@@ -14,7 +13,6 @@ export interface Waku {
|
|
14
13
|
store?: IStore;
|
15
14
|
filter?: IFilter;
|
16
15
|
lightPush?: ILightPush;
|
17
|
-
peerExchange?: IPeerExchange;
|
18
16
|
dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
|
19
17
|
start(): Promise<void>;
|
20
18
|
stop(): Promise<void>;
|
@@ -25,19 +23,16 @@ export interface LightNode extends Waku {
|
|
25
23
|
store: IStore;
|
26
24
|
filter: IFilter;
|
27
25
|
lightPush: ILightPush;
|
28
|
-
peerExchange: IPeerExchange;
|
29
26
|
}
|
30
27
|
export interface RelayNode extends Waku {
|
31
28
|
relay: IRelay;
|
32
29
|
store: undefined;
|
33
30
|
filter: undefined;
|
34
31
|
lightPush: undefined;
|
35
|
-
peerExchange: undefined;
|
36
32
|
}
|
37
33
|
export interface FullNode extends Waku {
|
38
34
|
relay: IRelay;
|
39
35
|
store: IStore;
|
40
36
|
filter: IFilter;
|
41
37
|
lightPush: ILightPush;
|
42
|
-
peerExchange: IPeerExchange;
|
43
38
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@waku/interfaces",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.9",
|
4
4
|
"description": "Definition of Waku interfaces",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"module": "./dist/index.js",
|
@@ -32,12 +32,13 @@
|
|
32
32
|
"privacy"
|
33
33
|
],
|
34
34
|
"scripts": {
|
35
|
-
"build": "
|
35
|
+
"build": "run-s build:**",
|
36
|
+
"build:esm": "tsc",
|
36
37
|
"fix": "run-s fix:*",
|
37
38
|
"fix:prettier": "prettier . --write",
|
38
|
-
"fix:lint": "eslint src --
|
39
|
+
"fix:lint": "eslint src --fix",
|
39
40
|
"check": "run-s check:*",
|
40
|
-
"check:lint": "eslint src
|
41
|
+
"check:lint": "eslint src",
|
41
42
|
"check:prettier": "prettier . --list-different",
|
42
43
|
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
|
43
44
|
"check:tsc": "tsc -p tsconfig.dev.json",
|
@@ -47,27 +48,28 @@
|
|
47
48
|
"engines": {
|
48
49
|
"node": ">=16"
|
49
50
|
},
|
50
|
-
"dependencies": {
|
51
|
-
"@chainsafe/libp2p-gossipsub": "^5.2.1",
|
52
|
-
"@libp2p/interface-connection": "^3.0.2",
|
53
|
-
"@libp2p/interface-peer-id": "^1.0.5",
|
54
|
-
"@libp2p/interface-peer-store": "^1.2.3",
|
55
|
-
"@multiformats/multiaddr": "^11.0.6",
|
56
|
-
"libp2p": "0.40.0"
|
57
|
-
},
|
58
51
|
"devDependencies": {
|
59
|
-
"@
|
60
|
-
"@
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
52
|
+
"@chainsafe/libp2p-gossipsub": "^6.1.0",
|
53
|
+
"@libp2p/interface-connection": "^3.0.8",
|
54
|
+
"@libp2p/interface-connection-manager": "^1.3.7",
|
55
|
+
"@libp2p/interface-libp2p": "^1.1.1",
|
56
|
+
"@libp2p/interface-peer-id": "^2.0.1",
|
57
|
+
"@libp2p/interface-peer-info": "^1.0.8",
|
58
|
+
"@libp2p/interface-peer-store": "^1.2.8",
|
59
|
+
"@libp2p/interface-registrar": "^2.0.8",
|
60
|
+
"@multiformats/multiaddr": "^12.0.0",
|
61
|
+
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
62
|
+
"@typescript-eslint/parser": "^5.51.0",
|
63
|
+
"cspell": "^6.28.0",
|
64
|
+
"eslint": "^8.35.0",
|
65
|
+
"eslint-config-prettier": "^8.6.0",
|
64
66
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
65
|
-
"eslint-plugin-functional": "^
|
66
|
-
"eslint-plugin-import": "^2.
|
67
|
-
"eslint-plugin-prettier": "^4.
|
67
|
+
"eslint-plugin-functional": "^5.0.4",
|
68
|
+
"eslint-plugin-import": "^2.27.5",
|
69
|
+
"eslint-plugin-prettier": "^4.2.1",
|
68
70
|
"npm-run-all": "^4.1.5",
|
69
|
-
"prettier": "^2.
|
70
|
-
"typescript": "^4.
|
71
|
+
"prettier": "^2.8.4",
|
72
|
+
"typescript": "^4.9.5"
|
71
73
|
},
|
72
74
|
"typedoc": {
|
73
75
|
"entryPoint": "./src/index.ts"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export enum Tags {
|
2
|
+
BOOTSTRAP = "bootstrap",
|
3
|
+
PEER_EXCHANGE = "peer-exchange",
|
4
|
+
}
|
5
|
+
|
6
|
+
export interface ConnectionManagerOptions {
|
7
|
+
/**
|
8
|
+
* Number of attempts before a peer is considered non-dialable
|
9
|
+
* This is used to not spam a peer with dial attempts when it is not dialable
|
10
|
+
*/
|
11
|
+
maxDialAttemptsForPeer: number;
|
12
|
+
/**
|
13
|
+
* Max number of bootstrap peers allowed to be connected to, initially
|
14
|
+
* This is used to increase intention of dialing non-bootstrap peers, found using other discovery mechanisms (like Peer Exchange)
|
15
|
+
*/
|
16
|
+
maxBootstrapPeersAllowed: number;
|
17
|
+
}
|
package/src/enr.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
2
|
+
import type { PeerInfo } from "@libp2p/interface-peer-info";
|
2
3
|
import type { Multiaddr } from "@multiformats/multiaddr";
|
3
4
|
|
4
5
|
export type ENRKey = string;
|
@@ -32,7 +33,10 @@ export interface IEnr extends Map<ENRKey, ENRValue> {
|
|
32
33
|
udp6?: number;
|
33
34
|
multiaddrs?: Multiaddr[];
|
34
35
|
waku2?: Waku2;
|
36
|
+
peerInfo: PeerInfo | undefined;
|
35
37
|
|
36
|
-
|
38
|
+
/**
|
39
|
+
* @deprecated: use { @link IEnr.peerInfo } instead.
|
40
|
+
*/
|
37
41
|
getFullMultiaddrs(): Multiaddr[];
|
38
42
|
}
|
package/src/index.ts
CHANGED
package/src/light_push.ts
CHANGED
@@ -1,14 +1,4 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
PointToPointProtocol,
|
4
|
-
ProtocolOptions,
|
5
|
-
SendResult,
|
6
|
-
} from "./protocols.js";
|
1
|
+
import type { PointToPointProtocol } from "./protocols.js";
|
2
|
+
import type { ISender } from "./sender.js";
|
7
3
|
|
8
|
-
export
|
9
|
-
push: (
|
10
|
-
encoder: IEncoder,
|
11
|
-
message: IMessage,
|
12
|
-
opts?: ProtocolOptions
|
13
|
-
) => Promise<SendResult>;
|
14
|
-
}
|
4
|
+
export type ILightPush = ISender & PointToPointProtocol;
|
package/src/message.ts
CHANGED
@@ -13,10 +13,11 @@ export interface IRateLimitProof {
|
|
13
13
|
* Field types matches the protobuf type over the wire
|
14
14
|
*/
|
15
15
|
export interface IProtoMessage {
|
16
|
-
payload: Uint8Array
|
17
|
-
contentTopic: string
|
16
|
+
payload: Uint8Array;
|
17
|
+
contentTopic: string;
|
18
18
|
version: number | undefined;
|
19
19
|
timestamp: bigint | undefined;
|
20
|
+
meta: Uint8Array | undefined;
|
20
21
|
rateLimitProof: IRateLimitProof | undefined;
|
21
22
|
ephemeral: boolean | undefined;
|
22
23
|
}
|
@@ -25,11 +26,31 @@ export interface IProtoMessage {
|
|
25
26
|
* Interface for messages to encode and send.
|
26
27
|
*/
|
27
28
|
export interface IMessage {
|
28
|
-
payload
|
29
|
+
payload: Uint8Array;
|
29
30
|
timestamp?: Date;
|
30
31
|
rateLimitProof?: IRateLimitProof;
|
31
32
|
}
|
32
33
|
|
34
|
+
export interface IMetaSetter {
|
35
|
+
(message: IProtoMessage & { meta: undefined }): Uint8Array;
|
36
|
+
}
|
37
|
+
|
38
|
+
export interface EncoderOptions {
|
39
|
+
/** The content topic to set on outgoing messages. */
|
40
|
+
contentTopic: string;
|
41
|
+
/**
|
42
|
+
* An optional flag to mark message as ephemeral, i.e., not to be stored by Waku Store nodes.
|
43
|
+
* @defaultValue `false`
|
44
|
+
*/
|
45
|
+
ephemeral?: boolean;
|
46
|
+
/**
|
47
|
+
* A function called when encoding messages to set the meta field.
|
48
|
+
* @param IProtoMessage The message encoded for wire, without the meta field.
|
49
|
+
* If encryption is used, `metaSetter` only accesses _encrypted_ payload.
|
50
|
+
*/
|
51
|
+
metaSetter?: IMetaSetter;
|
52
|
+
}
|
53
|
+
|
33
54
|
export interface IEncoder {
|
34
55
|
contentTopic: string;
|
35
56
|
ephemeral: boolean;
|
@@ -38,8 +59,9 @@ export interface IEncoder {
|
|
38
59
|
}
|
39
60
|
|
40
61
|
export interface IDecodedMessage {
|
41
|
-
payload: Uint8Array
|
42
|
-
contentTopic: string
|
62
|
+
payload: Uint8Array;
|
63
|
+
contentTopic: string;
|
64
|
+
pubSubTopic: string;
|
43
65
|
timestamp: Date | undefined;
|
44
66
|
rateLimitProof: IRateLimitProof | undefined;
|
45
67
|
ephemeral: boolean | undefined;
|
@@ -48,5 +70,8 @@ export interface IDecodedMessage {
|
|
48
70
|
export interface IDecoder<T extends IDecodedMessage> {
|
49
71
|
contentTopic: string;
|
50
72
|
fromWireToProtoObj: (bytes: Uint8Array) => Promise<IProtoMessage | undefined>;
|
51
|
-
fromProtoObj: (
|
73
|
+
fromProtoObj: (
|
74
|
+
pubSubTopic: string,
|
75
|
+
proto: IProtoMessage
|
76
|
+
) => Promise<T | undefined>;
|
52
77
|
}
|
package/src/peer_exchange.ts
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
import type { ConnectionManager } from "@libp2p/interface-connection-manager";
|
2
2
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
3
3
|
import type { PeerStore } from "@libp2p/interface-peer-store";
|
4
|
-
import type { Registrar } from "@libp2p/interface-registrar";
|
5
4
|
|
6
5
|
import { IEnr } from "./enr.js";
|
7
6
|
import { PointToPointProtocol } from "./protocols.js";
|
8
7
|
|
9
8
|
export interface IPeerExchange extends PointToPointProtocol {
|
10
|
-
query(
|
11
|
-
params: PeerExchangeQueryParams,
|
12
|
-
callback: (response: PeerExchangeResponse) => Promise<void> | void
|
13
|
-
): Promise<void>;
|
9
|
+
query(params: PeerExchangeQueryParams): Promise<PeerInfo[] | undefined>;
|
14
10
|
}
|
15
11
|
|
16
12
|
export interface PeerExchangeQueryParams {
|
@@ -29,5 +25,4 @@ export interface PeerInfo {
|
|
29
25
|
export interface PeerExchangeComponents {
|
30
26
|
connectionManager: ConnectionManager;
|
31
27
|
peerStore: PeerStore;
|
32
|
-
registrar: Registrar;
|
33
28
|
}
|
package/src/protocols.ts
CHANGED
@@ -1,30 +1,66 @@
|
|
1
1
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
2
2
|
import type { Peer, PeerStore } from "@libp2p/interface-peer-store";
|
3
|
+
import type { Libp2pOptions } from "libp2p";
|
3
4
|
|
4
|
-
import type {
|
5
|
+
import type { IDecodedMessage } from "./message.js";
|
5
6
|
|
6
7
|
export enum Protocols {
|
7
8
|
Relay = "relay",
|
8
9
|
Store = "store",
|
9
10
|
LightPush = "lightpush",
|
10
11
|
Filter = "filter",
|
11
|
-
PeerExchange = "peer-exchange",
|
12
12
|
}
|
13
13
|
|
14
14
|
export interface PointToPointProtocol {
|
15
|
+
multicodec: string;
|
15
16
|
peerStore: PeerStore;
|
16
17
|
peers: () => Promise<Peer[]>;
|
17
18
|
}
|
18
19
|
|
19
|
-
export type
|
20
|
+
export type ProtocolCreateOptions = {
|
21
|
+
/**
|
22
|
+
* The PubSub Topic to use. Defaults to {@link @waku/core.DefaultPubSubTopic }.
|
23
|
+
*
|
24
|
+
* One and only one pubsub topic is used by Waku. This is used by:
|
25
|
+
* - WakuRelay to receive, route and send messages,
|
26
|
+
* - WakuLightPush to send messages,
|
27
|
+
* - WakuStore to retrieve messages.
|
28
|
+
*
|
29
|
+
* The usage of the default pubsub topic is recommended.
|
30
|
+
* See [Waku v2 Topic Usage Recommendations](https://rfc.vac.dev/spec/23/) for details.
|
31
|
+
*
|
32
|
+
*/
|
20
33
|
pubSubTopic?: string;
|
34
|
+
/**
|
35
|
+
* You can pass options to the `Libp2p` instance used by {@link @waku/core.WakuNode} using the `libp2p` property.
|
36
|
+
* 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)
|
37
|
+
* apart that we made the `modules` property optional and partial,
|
38
|
+
* allowing its omission and letting Waku set good defaults.
|
39
|
+
* Notes that some values are overridden by {@link @waku/core.WakuNode} to ensure it implements the Waku protocol.
|
40
|
+
*/
|
41
|
+
libp2p?: Partial<Libp2pOptions>;
|
42
|
+
/**
|
43
|
+
* Byte array used as key for the noise protocol used for connection encryption
|
44
|
+
* by [`Libp2p.create`](https://github.com/libp2p/js-libp2p/blob/master/doc/API.md#create)
|
45
|
+
* This is only used for test purposes to not run out of entropy during CI runs.
|
46
|
+
*/
|
47
|
+
staticNoiseKey?: Uint8Array;
|
48
|
+
/**
|
49
|
+
* Use recommended bootstrap method to discovery and connect to new nodes.
|
50
|
+
*/
|
51
|
+
defaultBootstrap?: boolean;
|
52
|
+
};
|
53
|
+
|
54
|
+
export type ProtocolOptions = {
|
21
55
|
/**
|
22
56
|
* Optionally specify an PeerId for the protocol request. If not included, will use a random peer.
|
23
57
|
*/
|
24
58
|
peerId?: PeerId;
|
25
59
|
};
|
26
60
|
|
27
|
-
export type Callback<T extends
|
61
|
+
export type Callback<T extends IDecodedMessage> = (
|
62
|
+
msg: T
|
63
|
+
) => void | Promise<void>;
|
28
64
|
|
29
65
|
export interface SendResult {
|
30
66
|
recipients: PeerId[];
|
package/src/relay.ts
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
|
2
2
|
|
3
|
-
import type {
|
4
|
-
|
5
|
-
|
6
|
-
IEncoder,
|
7
|
-
IMessage,
|
8
|
-
} from "./message.js";
|
9
|
-
import type { Callback, SendResult } from "./protocols.js";
|
3
|
+
import type { IDecodedMessage, IDecoder } from "./message.js";
|
4
|
+
import type { Callback } from "./protocols.js";
|
5
|
+
import type { ISender } from "./sender.js";
|
10
6
|
|
11
|
-
|
12
|
-
|
7
|
+
type PubSubTopic = string;
|
8
|
+
type ContentTopic = string;
|
9
|
+
|
10
|
+
export type ActiveSubscriptions = Map<PubSubTopic, ContentTopic[]>;
|
11
|
+
|
12
|
+
interface IRelayAPI {
|
13
13
|
addObserver: <T extends IDecodedMessage>(
|
14
14
|
decoder: IDecoder<T>,
|
15
15
|
callback: Callback<T>
|
16
16
|
) => () => void;
|
17
17
|
getMeshPeers: () => string[];
|
18
|
+
getActiveSubscriptions: () => ActiveSubscriptions | undefined;
|
18
19
|
}
|
20
|
+
|
21
|
+
export type IRelay = IRelayAPI & GossipSub & ISender;
|
package/src/sender.ts
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { IEncoder, IMessage } from "./message.js";
|
2
|
+
import type { ProtocolOptions, SendResult } from "./protocols.js";
|
3
|
+
|
4
|
+
export interface ISender {
|
5
|
+
send: (
|
6
|
+
encoder: IEncoder,
|
7
|
+
message: IMessage,
|
8
|
+
opts?: ProtocolOptions
|
9
|
+
) => Promise<SendResult>;
|
10
|
+
}
|
package/src/store.ts
CHANGED
@@ -11,19 +11,13 @@ export interface TimeFilter {
|
|
11
11
|
endTime: Date;
|
12
12
|
}
|
13
13
|
|
14
|
-
export interface
|
15
|
-
digest
|
16
|
-
|
17
|
-
senderTime
|
18
|
-
pubsubTopic
|
14
|
+
export interface Cursor {
|
15
|
+
digest: Uint8Array;
|
16
|
+
receiverTime: bigint;
|
17
|
+
senderTime: bigint;
|
18
|
+
pubsubTopic: string;
|
19
19
|
}
|
20
20
|
|
21
|
-
export type Cursor = {
|
22
|
-
digest?: Uint8Array;
|
23
|
-
senderTime?: bigint;
|
24
|
-
pubsubTopic?: string;
|
25
|
-
};
|
26
|
-
|
27
21
|
export type StoreQueryOptions = {
|
28
22
|
/**
|
29
23
|
* The direction in which pages are retrieved:
|
@@ -45,7 +39,8 @@ export type StoreQueryOptions = {
|
|
45
39
|
*/
|
46
40
|
timeFilter?: TimeFilter;
|
47
41
|
/**
|
48
|
-
* Cursor as an index to start a query from.
|
42
|
+
* Cursor as an index to start a query from. Must be generated from a Waku
|
43
|
+
* Message.
|
49
44
|
*/
|
50
45
|
cursor?: Cursor;
|
51
46
|
} & ProtocolOptions;
|
package/src/waku.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import type { Stream } from "@libp2p/interface-connection";
|
2
|
+
import type { Libp2p } from "@libp2p/interface-libp2p";
|
2
3
|
import type { PeerId } from "@libp2p/interface-peer-id";
|
3
4
|
import type { Multiaddr } from "@multiformats/multiaddr";
|
4
|
-
import type { Libp2p } from "libp2p";
|
5
5
|
|
6
6
|
import type { IFilter } from "./filter.js";
|
7
7
|
import type { ILightPush } from "./light_push.js";
|
8
|
-
import type { IPeerExchange } from "./peer_exchange.js";
|
9
8
|
import { Protocols } from "./protocols.js";
|
10
9
|
import type { IRelay } from "./relay.js";
|
11
10
|
import type { IStore } from "./store.js";
|
@@ -16,7 +15,6 @@ export interface Waku {
|
|
16
15
|
store?: IStore;
|
17
16
|
filter?: IFilter;
|
18
17
|
lightPush?: ILightPush;
|
19
|
-
peerExchange?: IPeerExchange;
|
20
18
|
|
21
19
|
dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
|
22
20
|
|
@@ -32,7 +30,6 @@ export interface LightNode extends Waku {
|
|
32
30
|
store: IStore;
|
33
31
|
filter: IFilter;
|
34
32
|
lightPush: ILightPush;
|
35
|
-
peerExchange: IPeerExchange;
|
36
33
|
}
|
37
34
|
|
38
35
|
export interface RelayNode extends Waku {
|
@@ -40,7 +37,6 @@ export interface RelayNode extends Waku {
|
|
40
37
|
store: undefined;
|
41
38
|
filter: undefined;
|
42
39
|
lightPush: undefined;
|
43
|
-
peerExchange: undefined;
|
44
40
|
}
|
45
41
|
|
46
42
|
export interface FullNode extends Waku {
|
@@ -48,5 +44,4 @@ export interface FullNode extends Waku {
|
|
48
44
|
store: IStore;
|
49
45
|
filter: IFilter;
|
50
46
|
lightPush: ILightPush;
|
51
|
-
peerExchange: IPeerExchange;
|
52
47
|
}
|