@waku/sds 0.0.3-ff0222a.0 → 0.0.4-b7e9b08.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/sds.d.ts +41 -7
- package/dist/sds.js +87 -25
- package/dist/sds.js.map +1 -1
- package/package.json +1 -1
- package/src/sds.ts +121 -31
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.0.3](https://github.com/waku-org/js-waku/compare/sds-v0.0.2...sds-v0.0.3) (2025-04-23)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **sds:** Add retrieval hint to causal history ([4da382d](https://github.com/waku-org/js-waku/commit/4da382d59489645802d9efeb68e8eb05cdc95ec1))
|
9
|
+
* **sds:** Add retrieval hint to causal history ([408be95](https://github.com/waku-org/js-waku/commit/408be95a1317210e43a2caff3ecff40d457d17c4))
|
10
|
+
* **sds:** Adds ephemeral messages, delivered message callback and event ([18e08f9](https://github.com/waku-org/js-waku/commit/18e08f94dfb20538ebf6575acb7e7e395a08d2c1))
|
11
|
+
* **sds:** Adds ephemeral messages, delivered message callback and event ([6b4848c](https://github.com/waku-org/js-waku/commit/6b4848c8536d39914915dba011d4a075bfed0e4a))
|
12
|
+
|
13
|
+
|
14
|
+
### Dependencies
|
15
|
+
|
16
|
+
* The following workspace dependencies were updated
|
17
|
+
* dependencies
|
18
|
+
* @waku/message-hash bumped from ^0.1.18 to ^0.1.19
|
19
|
+
* @waku/proto bumped from ^0.0.9 to ^0.0.10
|
20
|
+
* @waku/utils bumped from ^0.0.22 to ^0.0.23
|
21
|
+
|
3
22
|
## [0.0.2](https://github.com/waku-org/js-waku/compare/sds-v0.0.1...sds-v0.0.2) (2025-03-24)
|
4
23
|
|
5
24
|
|
package/dist/.tsbuildinfo
CHANGED
@@ -1 +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.es2016.intl.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.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/nim_hashn/nim_hashn.mjs.d.ts","../src/probabilities.ts","../src/bloom.ts","../src/index.ts","../../../node_modules/@noble/hashes/utils.d.ts","../../../node_modules/@noble/hashes/_md.d.ts","../../../node_modules/@noble/hashes/sha256.d.ts","../../../node_modules/protons-runtime/dist/src/codec.d.ts","../../../node_modules/uint8arraylist/dist/src/index.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/reader.d.ts","../../../node_modules/protons-runtime/dist/src/utils/writer.d.ts","../../../node_modules/protons-runtime/dist/src/index.d.ts","../../proto/dist/generated/message.d.ts","../../proto/dist/generated/filter.d.ts","../../proto/dist/generated/topic_only_message.d.ts","../../proto/dist/generated/filter_v2.d.ts","../../proto/dist/generated/light_push.d.ts","../../proto/dist/generated/store_v3.d.ts","../../proto/dist/generated/peer_exchange.d.ts","../../proto/dist/generated/metadata.d.ts","../../proto/dist/generated/sds_message.d.ts","../../proto/dist/index.d.ts","../src/sds.ts","../src/nim_hashn/nim_hashn.mjs","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.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/sea.d.ts","../../../node_modules/@types/node/sqlite.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/ts5.6/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc",{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7b45dadaf995d67b156f2f01aa4bf176903e45233ebc48ca9faccf35188fe076",{"version":"f33914752ace04d12fe05a0af671b07350a73bb2c0f862a45c179b4b0fad7bce","signature":"8559244d350f56ccebd44938ca03c249b3ba51fc093f2583fa5c12110b7012dd"},{"version":"c3fa361927070a9a3b3e82a0ec524aff13d0b3a36aa49edd3dde061e6205865c","signature":"4c94ccf15375d40c0fae342e0b775ae63b7c6a47590667bc4b916ff776d91c25"},{"version":"b5cf9b88e100b3ffc715874a40c4e689d56b32defda133c429ba52af87820afe","signature":"79dc41a99830c1e1d9a1739569ee0a1222d10dd280136d218a35f0e683945c45"},"de6166d1f3098af78fe1bd1206e875fd1f02b19eb6bef83431467aff80731380","4bc1b3495cfec279d9c4f1e01d9289d2a31b59bfcae9d59d0d1f944448e08805","180467ed987aa942e66b2673206debf3c42b25445184551dc3d35eebe5f4b5f5","6d268309f0e15dd820b2df9806234166554cb4e2fe00d11737adcb4e5489f700","d35b5db21a04a45ae6323c4d4b25acc983dfe2870fc670fd05249eb19d839a5e","58cf96187feb10cc8ad3bb080871cd30888ef63bc5db131f11458850ef8f6245","9102986ff52326a2016e8cddc1cf3092f0808ac916dcc8dc2d2c7195cd181987","fa82b7b22d9df87323e31e9e2ad75911028f3e544647fd212424b3c4452fee3f","01f20dac9dc14f0d306e5d1215c5c1c3b4d1805905e60ae92fabac4031eae7da","9ceec2a882368c0160a8a3879aa0efce0fb985751fc23ff6191006030969cfa4","cad5d6451789234434c28dd2d6a8267b0d64c479b1ad267321faa31ba90d570b","6516fc98fa10b0cb22c7e332bacea4a7ea80257e113f6cdddd924d03bfde218e","13122c2f3f51d08b986460444b9860d00fd38fee39e862ad6d61bf873525ae0a","88c836190daddad5257c0963159a2cd9ced899f7a3262271583703034caba890","ba7c356f3fa418d4486b3b4e405c01c6d529c274e1e877b98166c46dd7cc0f0d","433b9953d8e0864997b5aaf7cc102f80c98304758244731c3fd0a5d6d645033c","366563a75f042b1a7c61d504a90a8a79810c694e445f038310303f232b6dc89a","f9facf2db5c46c5524f53472e03169f3e13e4f83ee14b98d46248c76146fca14","2945b371f6e04c29e3f96b611ecbf7ed75e172f8aeb603aee5e50510b4bc68a7","1ddbb5149b9d13b2c0441835f41a1b20561339264b05c6902966fc698d7d2863","28d51f937939edd0bd0dc8c63b5d0e57cd6082381cf98d5df941d9efc485d175","3f55047f1cd741d4abdbc4c8aafec026521a2c8dcad872dc99162b6eefb4e4a6",{"version":"d2ea4f95fb320214f6183a97147dfc9b8fb3b045b14ff3fcdde5d0e53646c5fd","signature":"9e43964cc212dd26d6e1a0189681a33540c2ce321cf21ce1efc0d6d40f66ae33"},{"version":"8cde84dd9b2725de0cbe54aa044b40921fa3d751b175a8503cea0f08330a80a7","signature":"7e477b06ac34b6ba360319bc93d834e48abc5d042b2f49c79fa2abce5496424e"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true},"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a",{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true},{"version":"20fb08397d22742771868b52f647cddfbf44b263f26b6519b449257f8c9f7364","affectsGlobalScope":true},"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107",{"version":"d2bc987ae352271d0d615a420dcf98cc886aa16b87fb2b569358c1fe0ca0773d","affectsGlobalScope":true},"4f0539c58717cbc8b73acb29f9e992ab5ff20adba5f9b57130691c7f9b186a4d","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0",{"version":"f9677e434b7a3b14f0a9367f9dfa1227dfe3ee661792d0085523c3191ae6a1a4","affectsGlobalScope":true},"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7",{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true},"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a",{"version":"9057f224b79846e3a95baf6dad2c8103278de2b0c5eebda23fc8188171ad2398","affectsGlobalScope":true},"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true},"f09e61b364c7fa6af5a31f3dd99bfa32e334c6128c414850a85e2f14fcf166af","1e289f30a48126935a5d408a91129a13a59c9b0f8c007a816f9f16ef821e144e","f96a023e442f02cf551b4cfe435805ccb0a7e13c81619d4da61ec835d03fe512","5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6",{"version":"f579f267a2f4c2278cca2ec84613e95059368b503ce96586972d304e5e40125b","affectsGlobalScope":true},"23459c1915878a7c1e86e8bdb9c187cddd3aea105b8b1dfce512f093c969bc7e","b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0",{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true},{"version":"5f6f1d54779d0b9ed152b0516b0958cd34889764c1190434bbf18e7a8bb884cd","affectsGlobalScope":true},"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","f7b1df115dbd1b8522cba4f404a9f4fdcd5169e2137129187ffeee9d287e4fd1","c878f74b6d10b267f6075c51ac1d8becd15b4aa6a58f79c0cfe3b24908357f60","37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093",{"version":"fbf68fc8057932b1c30107ebc37420f8d8dc4bef1253c4c2f9e141886c0df5ab","affectsGlobalScope":true},"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada",{"version":"993985beef40c7d113f6dd8f0ba26eed63028b691fbfeb6a5b63f26408dd2c6d","affectsGlobalScope":true},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true},"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4",{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true},{"version":"cb094bb347d7df3380299eb69836c2c8758626ecf45917577707c03cf816b6f4","affectsGlobalScope":true},"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","b02784111b3fc9c38590cd4339ff8718f9329a6f4d3fd66e9744a1dcd1d7e191","ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a",{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true},"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4",{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true}],"root":[[59,62],85,86],"options":{"allowJs":true,"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"module":99,"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":[[63,92,135],[63,64,92,135],[92,135],[92,132,135],[92,134,135],[92,135,140,170],[92,135,136,141,147,148,155,167,178],[92,135,136,137,147,155],[87,88,89,92,135],[92,135,138,179],[92,135,139,140,148,156],[92,135,140,167,175],[92,135,141,143,147,155],[92,134,135,142],[92,135,143,144],[92,135,147],[92,135,145,147],[92,134,135,147],[92,135,147,148,149,167,178],[92,135,147,148,149,162,167,170],[92,130,135,183],[92,130,135,143,147,150,155,167,178],[92,135,147,148,150,151,155,167,175,178],[92,135,150,152,167,175,178],[92,135,147,153],[92,135,154,178],[92,135,143,147,155,167],[92,135,156],[92,135,157],[92,134,135,158],[92,132,133,134,135,136,137,138,139,140,141,142,143,144,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184],[92,135,160],[92,135,161],[92,135,147,162,163],[92,135,162,164,179,181],[92,135,147,167,168,170],[92,135,169,170],[92,135,167,168],[92,135,170],[92,135,171],[92,132,135,167],[92,135,147,173,174],[92,135,173,174],[92,135,140,155,167,175],[92,135,176],[135],[90,91,92,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184],[92,135,155,177],[92,135,150,161,178],[92,135,140,179],[92,135,167,180],[92,135,154,181],[92,135,182],[92,135,140,147,149,158,167,178,181,183],[92,135,167,184],[74,92,135],[66,92,135],[66,67,92,135],[66,68,69,70,71,72,73,92,135],[67,74,92,135],[92,102,106,135,178],[92,102,135,167,178],[92,97,135],[92,99,102,135,175,178],[92,135,155,175],[92,135,185],[92,97,135,185],[92,99,102,135,155,178],[92,94,95,98,101,135,147,167,178],[92,102,109,135],[92,94,100,135],[92,102,123,124,135],[92,98,102,135,170,178,185],[92,123,135,185],[92,96,97,135,185],[92,102,135],[92,96,97,98,99,100,101,102,103,104,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,124,125,126,127,128,129,135],[92,102,117,135],[92,102,109,110,135],[92,100,102,110,111,135],[92,101,135],[92,94,97,102,135],[92,102,106,110,111,135],[92,106,135],[92,100,102,105,135,178],[92,94,99,102,109,135],[92,135,167],[92,97,102,123,135,183,185],[75,76,77,78,79,80,81,82,83,92,135],[59,60,92,135],[61,92,135],[61,63,65,84,92,135],[61],[84]],"referencedMap":[[64,1],[65,2],[63,3],[186,3],[132,4],[133,4],[134,5],[135,6],[136,7],[137,8],[87,3],[90,9],[88,3],[89,3],[138,10],[139,11],[140,12],[141,13],[142,14],[143,15],[144,15],[146,16],[145,17],[147,18],[148,19],[149,20],[131,21],[150,22],[151,23],[152,24],[153,25],[154,26],[155,27],[156,28],[157,29],[158,30],[159,31],[160,32],[161,33],[162,34],[163,34],[164,35],[165,3],[166,3],[167,36],[169,37],[168,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,45],[92,46],[91,3],[185,47],[177,48],[178,49],[179,50],[180,51],[181,52],[182,53],[183,54],[184,55],[93,3],[66,56],[70,57],[71,57],[68,58],[69,57],[74,59],[72,60],[73,56],[57,3],[58,3],[10,3],[12,3],[11,3],[2,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[19,3],[20,3],[3,3],[21,3],[4,3],[22,3],[26,3],[23,3],[24,3],[25,3],[27,3],[28,3],[29,3],[5,3],[30,3],[31,3],[32,3],[33,3],[6,3],[37,3],[34,3],[35,3],[36,3],[38,3],[7,3],[39,3],[44,3],[45,3],[40,3],[41,3],[42,3],[43,3],[8,3],[49,3],[46,3],[47,3],[48,3],[50,3],[9,3],[51,3],[52,3],[53,3],[56,3],[54,3],[55,3],[1,3],[67,3],[109,61],[119,62],[108,61],[129,63],[100,64],[99,65],[128,66],[122,67],[127,68],[102,69],[116,70],[101,71],[125,72],[97,73],[96,66],[126,74],[98,75],[103,76],[104,3],[107,76],[94,3],[130,77],[120,78],[111,79],[112,80],[114,81],[110,82],[113,83],[123,66],[105,84],[106,85],[115,86],[95,87],[118,78],[117,76],[121,3],[124,88],[76,60],[78,60],[79,60],[75,60],[82,60],[81,60],[83,60],[80,60],[77,60],[84,89],[61,90],[62,91],[86,3],[59,3],[60,3],[85,92]],"exportedModulesMap":[[64,1],[65,2],[63,3],[186,3],[132,4],[133,4],[134,5],[135,6],[136,7],[137,8],[87,3],[90,9],[88,3],[89,3],[138,10],[139,11],[140,12],[141,13],[142,14],[143,15],[144,15],[146,16],[145,17],[147,18],[148,19],[149,20],[131,21],[150,22],[151,23],[152,24],[153,25],[154,26],[155,27],[156,28],[157,29],[158,30],[159,31],[160,32],[161,33],[162,34],[163,34],[164,35],[165,3],[166,3],[167,36],[169,37],[168,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,45],[92,46],[91,3],[185,47],[177,48],[178,49],[179,50],[180,51],[181,52],[182,53],[183,54],[184,55],[93,3],[66,56],[70,57],[71,57],[68,58],[69,57],[74,59],[72,60],[73,56],[57,3],[58,3],[10,3],[12,3],[11,3],[2,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[19,3],[20,3],[3,3],[21,3],[4,3],[22,3],[26,3],[23,3],[24,3],[25,3],[27,3],[28,3],[29,3],[5,3],[30,3],[31,3],[32,3],[33,3],[6,3],[37,3],[34,3],[35,3],[36,3],[38,3],[7,3],[39,3],[44,3],[45,3],[40,3],[41,3],[42,3],[43,3],[8,3],[49,3],[46,3],[47,3],[48,3],[50,3],[9,3],[51,3],[52,3],[53,3],[56,3],[54,3],[55,3],[1,3],[67,3],[109,61],[119,62],[108,61],[129,63],[100,64],[99,65],[128,66],[122,67],[127,68],[102,69],[116,70],[101,71],[125,72],[97,73],[96,66],[126,74],[98,75],[103,76],[104,3],[107,76],[94,3],[130,77],[120,78],[111,79],[112,80],[114,81],[110,82],[113,83],[123,66],[105,84],[106,85],[115,86],[95,87],[118,78],[117,76],[121,3],[124,88],[76,60],[78,60],[79,60],[75,60],[82,60],[81,60],[83,60],[80,60],[77,60],[84,89],[62,93],[59,3],[85,94]],"semanticDiagnosticsPerFile":[64,65,63,186,132,133,134,135,136,137,87,90,88,89,138,139,140,141,142,143,144,146,145,147,148,149,131,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,169,168,170,171,172,173,174,175,176,92,91,185,177,178,179,180,181,182,183,184,93,66,70,71,68,69,74,72,73,57,58,10,12,11,2,13,14,15,16,17,18,19,20,3,21,4,22,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,1,67,109,119,108,129,100,99,128,122,127,102,116,101,125,97,96,126,98,103,104,107,94,130,120,111,112,114,110,113,123,105,106,115,95,118,117,121,124,76,78,79,75,82,81,83,80,77,84,61,62,86,59,60,85]},"version":"5.4.5"}
|
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.es2016.intl.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.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/nim_hashn/nim_hashn.mjs.d.ts","../src/probabilities.ts","../src/bloom.ts","../src/index.ts","../../../node_modules/multiformats/dist/src/bases/interface.d.ts","../../../node_modules/multiformats/dist/src/block/interface.d.ts","../../../node_modules/multiformats/dist/src/hashes/interface.d.ts","../../../node_modules/multiformats/dist/src/link/interface.d.ts","../../../node_modules/multiformats/dist/src/cid.d.ts","../../../node_modules/uint8arraylist/dist/src/index.d.ts","../node_modules/@libp2p/interface/dist/src/keys.d.ts","../node_modules/@libp2p/interface/dist/src/peer-id.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../../../node_modules/@multiformats/dns/dist/src/resolvers/dns-over-https.d.ts","../../../node_modules/@multiformats/dns/dist/src/resolvers/dns-json-over-https.d.ts","../../../node_modules/@multiformats/dns/dist/src/resolvers/index.d.ts","../../../node_modules/progress-events/dist/src/index.d.ts","../../../node_modules/@multiformats/dns/dist/src/index.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/resolvers/dnsaddr.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/resolvers/index.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../../../node_modules/it-stream-types/dist/src/index.d.ts","../node_modules/@libp2p/interface/dist/src/connection.d.ts","../node_modules/@libp2p/interface/dist/src/peer-info.d.ts","../node_modules/@libp2p/interface/dist/src/content-routing.d.ts","../node_modules/@libp2p/interface/dist/src/event-target.d.ts","../node_modules/@libp2p/interface/dist/src/metrics.d.ts","../node_modules/@libp2p/interface/dist/src/peer-routing.d.ts","../node_modules/@libp2p/interface/dist/src/peer-store.d.ts","../node_modules/@libp2p/interface/dist/src/startable.d.ts","../node_modules/@libp2p/interface/dist/src/stream-handler.d.ts","../node_modules/@libp2p/interface/dist/src/topology.d.ts","../node_modules/@libp2p/interface/dist/src/stream-muxer.d.ts","../node_modules/@libp2p/interface/dist/src/transport.d.ts","../node_modules/@libp2p/interface/dist/src/connection-encrypter.d.ts","../node_modules/@libp2p/interface/dist/src/connection-gater.d.ts","../node_modules/@libp2p/interface/dist/src/peer-discovery.d.ts","../../../node_modules/it-pushable/dist/src/index.d.ts","../node_modules/@libp2p/interface/dist/src/pubsub.d.ts","../node_modules/@libp2p/interface/dist/src/record.d.ts","../node_modules/@libp2p/interface/dist/src/errors.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.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/sea.d.ts","../../../node_modules/@types/node/sqlite.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/ts5.6/index.d.ts","../node_modules/@libp2p/interface/dist/src/events.d.ts","../node_modules/@libp2p/interface/dist/src/index.d.ts","../../../node_modules/@noble/hashes/utils.d.ts","../../../node_modules/@noble/hashes/_md.d.ts","../../../node_modules/@noble/hashes/sha2.d.ts","../../../node_modules/@noble/hashes/sha256.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/reader.d.ts","../../../node_modules/protons-runtime/dist/src/utils/writer.d.ts","../../../node_modules/protons-runtime/dist/src/index.d.ts","../../proto/dist/generated/message.d.ts","../../proto/dist/generated/filter.d.ts","../../proto/dist/generated/topic_only_message.d.ts","../../proto/dist/generated/filter_v2.d.ts","../../proto/dist/generated/light_push.d.ts","../../proto/dist/generated/store_v3.d.ts","../../proto/dist/generated/peer_exchange.d.ts","../../proto/dist/generated/metadata.d.ts","../../proto/dist/generated/sds_message.d.ts","../../proto/dist/index.d.ts","../src/sds.ts","../src/nim_hashn/nim_hashn.mjs","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc",{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7b45dadaf995d67b156f2f01aa4bf176903e45233ebc48ca9faccf35188fe076",{"version":"f33914752ace04d12fe05a0af671b07350a73bb2c0f862a45c179b4b0fad7bce","signature":"8559244d350f56ccebd44938ca03c249b3ba51fc093f2583fa5c12110b7012dd"},{"version":"c3fa361927070a9a3b3e82a0ec524aff13d0b3a36aa49edd3dde061e6205865c","signature":"4c94ccf15375d40c0fae342e0b775ae63b7c6a47590667bc4b916ff776d91c25"},{"version":"b5cf9b88e100b3ffc715874a40c4e689d56b32defda133c429ba52af87820afe","signature":"79dc41a99830c1e1d9a1739569ee0a1222d10dd280136d218a35f0e683945c45"},"4a3605bef1a5ef29fd5a1696dd95b0b4e2259e2d07a4d88fac79f3a9765c44a2","370079895f1acdd4bb5194a403c85bf60cfbb2654bced9430a6c7210e7246be8","90240231e730deed31569f6c686766a538e4a024bbc33ea1738fe924f477ba61","552223520e823223ee13c5764e9b69b1819c985818a8bcda435d8d1dbd909bee","49b7c3ddd683c09aa437dd92681699387441f522524b14d2331ce494a9bf2f27","d35b5db21a04a45ae6323c4d4b25acc983dfe2870fc670fd05249eb19d839a5e","ae34b0761f88cf20e922e338970944f0e3abf193cfd4c5589bb03dddd3ca6fc0","72b129e625a479942a4f9e8a1bc12c45c09bbbf6ebae147418584441eb9fba18","5212dd78d1d63ab33332c8846a0ea5ce248159e74033cde16de48373036b4704","954b3c04ee9f94ca1e262f3e5a6e833b0da0066514b3d4b97b92b7f0c85f8700","a2fc9ce1ae5bed7068d701d8aeebf13321de0f42c217dc2e10f1622dcaa53a7f","8e81f220cb935d551e88cff11541d5e89d3a3494a52fe6247e98016a9dbd4c2d","6b2576a04253626ba41b7dc7ec5977bec07f3b6952b16249d9fa8a3a0d79901c","9de17491f2bfbccea92500e174079d53bdedae34dbebe5d4a12a06ab09814710","e88481085a8576fa52efc913e631c1a833d16179486469b8538d8c4fab2f7381","cc8c0bbe9fa2399c83e9f5492f82c55fe184380a371dd6fa462586c6563b054b","d71577e78c7a4257074aaf82f595724175210c89e8b467ef82f949a6cbd891bc","52e78315d331eeec07e0fabb68af969e7cdb28eafeeda17fca75897764a53f0b","c84146dbc9d2e5f43d2cbf15485a4eabf90219dbb66c0d481f20f12d3851bffc","99e58b8cfcc96db650fc7ee19e343d0a51bd3359dc149f7394448c17f191a545","c7bdf13966d47b3b3cf9de4ce1647184717579990cc7143602f02ab224e9bfc6","1caea122dbc7febedf852183deb445487389b9e5a45f7d882514d0b265a96b5d","4105fa0ecfaffb578c8051c3de22e8c984191aac8de14641ee99beed9c5e5bd9","2c19a03df944b85c8c7a77d1f2b1e77d5b26b50bde7e57debb6c1ed785e92f18","1bbbb729d5e059dd824378618907b92dab35947f0a76ecb538891b4d9f5cc0a7","b04614c3b8ee002251cd53eab5360ad5f4826b647ff7471880622862d5edc6d1","87bf184334d223bd9bfa40396fbf691a293107450007937da6939be5ff6f26c7","76b9fa1e321d1a3df90391e97234009ab3a36e55965a53a74038949994b8fb23","203ec8a834b94ec13b9ef098b53024571e1870435d766b9d3614de00591d97a4","44fa41130045a0256c73b8f94d0885d1a170063b543ddf7324293b21af4b18b6","e366f299ffda4f8edc5505de39658396ed0854d2de1588ae94ad5ffc11505ae9","246fb40cb2ddfc0c7112ec82965837e6d0db12f3abed4a3fcd942c6c431bee1c","89346453b46aeb38468711a4880156f29b1eea4eab823bd53802965b3d3fc27d","b3817c7c3c5bb0e9b7eda3c5db73195f953b2369da71e2807218a86075ca31e5","fac83d4c6898d5bf90c508cc84409ded40fdc14611cf42d7fb750fb2c7847979","f08fe1c58de495300c4770cc782f7f1253db35942680427000bcc582b6adedf7","87294fac7de723d78ac6572f168446d0df2698259e7d88526493046df05cc103","75848e9f0cfb046e64bc8610b0b07e97288d340196a2d5bc6bcbf01e595a81d9",{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true},"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a",{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true},{"version":"109b9c280e8848c08bf4a78fff1fed0750a6ca1735671b5cf08b71bae5448c03","affectsGlobalScope":true},"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107",{"version":"3b724a66c071d616203133f8d099a0cb881b0b43fd42e8621e611243c5f30cd6","affectsGlobalScope":true},"a38efe83ff77c34e0f418a806a01ca3910c02ee7d64212a59d59bca6c2c38fa1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","3fe4022ba1e738034e38ad9afacbf0f1f16b458ed516326f5bf9e4a31e9be1dc",{"version":"a957197054b074bcdf5555d26286e8461680c7c878040d0f4e2d5509a7524944","affectsGlobalScope":true},"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","e9b97d69510658d2f4199b7d384326b7c4053b9e6645f5c19e1c2a54ede427fc",{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true},"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a",{"version":"f478f6f5902dc144c0d6d7bdc919c5177cac4d17a8ca8653c2daf6d7dc94317f","affectsGlobalScope":true},"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","b200675fd112ffef97c166d0341fb33f6e29e9f27660adde7868e95c5bc98beb","a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true},"a0a1dda070290b92da5a50113b73ecc4dd6bcbffad66e3c86503d483eafbadcf","59dcad36c4549175a25998f6a8b33c1df8e18df9c12ebad1dfb25af13fd4b1ce","9ba5b6a30cb7961b68ad4fb18dca148db151c2c23b8d0a260fc18b83399d19d3","3f3edb8e44e3b9df3b7ca3219ab539710b6a7f4fe16bd884d441af207e03cd57","528b62e4272e3ddfb50e8eed9e359dedea0a4d171c3eb8f337f4892aac37b24b","d71535813e39c23baa113bc4a29a0e187b87d1105ccc8c5a6ebaca38d9a9bff2",{"version":"8cf7e92bdb2862c2d28ba4535c43dc599cfbc0025db5ed9973d9b708dcbe3d98","affectsGlobalScope":true},"8a410a7fa4baf13dd45c9bba6d71806027dc0e4e5027cdf74f36466ae9b240b7","b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0",{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true},{"version":"636302a00dfd1f9fe6e8e91e4e9350c6518dcc8d51a474e4fc3a9ba07135100b","affectsGlobalScope":true},"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","e1ce1d622f1e561f6cdf246372ead3bbc07ce0342024d0e9c7caf3136f712698","c878f74b6d10b267f6075c51ac1d8becd15b4aa6a58f79c0cfe3b24908357f60","37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093",{"version":"27e4532aaaa1665d0dd19023321e4dc12a35a741d6b8e1ca3517fcc2544e0efe","affectsGlobalScope":true},"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada",{"version":"8c2ad42d5d1a2e8e6112625767f8794d9537f1247907378543106f7ba6c7df90","affectsGlobalScope":true},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true},"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","98ffdf93dfdd206516971d28e3e473f417a5cfd41172e46b4ce45008f640588e","66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4",{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true},{"version":"12e8ce658dd17662d82fb0509d2057afc5e6ee30369a2e9e0957eff725b1f11d","affectsGlobalScope":true},"74736930d108365d7bbe740c7154706ccfb1b2a3855a897963ab3e5c07ecbf19","858f999b3e4a45a4e74766d43030941466460bf8768361d254234d5870480a53","ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a",{"version":"63b05afa6121657f25e99e1519596b0826cda026f09372c9100dfe21417f4bd6","affectsGlobalScope":true},"3797dd6f4ea3dc15f356f8cdd3128bfa18122213b38a80d6c1f05d8e13cbdad8","171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4","05f95704d66f66f9368dc98d2da27016ed24ed11d521be55e32d167b88bc56fa","22672b675a503d25f875fe89500c7817e491b7a1d8fdedf3af06487333c372c4","b0bf8f866d3c05dce6c2778455252391bbc3fa0e8c1675e78dcee8fab2e1dd96","675058f412cecd4e2c028e1a74aa34d5510ab03ed78dae712437890bb0aba6ba","cf6dc97686cc424e560bc9938f79964cccecd270ad144ac0ba85f2d8caa1115d","906ffd3898da72d32978e9fad75567c66ce5346ed249e0ebf1acfbb424d4c3f6","6d268309f0e15dd820b2df9806234166554cb4e2fe00d11737adcb4e5489f700","58cf96187feb10cc8ad3bb080871cd30888ef63bc5db131f11458850ef8f6245","9102986ff52326a2016e8cddc1cf3092f0808ac916dcc8dc2d2c7195cd181987","fa82b7b22d9df87323e31e9e2ad75911028f3e544647fd212424b3c4452fee3f","01f20dac9dc14f0d306e5d1215c5c1c3b4d1805905e60ae92fabac4031eae7da","9ceec2a882368c0160a8a3879aa0efce0fb985751fc23ff6191006030969cfa4","cad5d6451789234434c28dd2d6a8267b0d64c479b1ad267321faa31ba90d570b","6516fc98fa10b0cb22c7e332bacea4a7ea80257e113f6cdddd924d03bfde218e","13122c2f3f51d08b986460444b9860d00fd38fee39e862ad6d61bf873525ae0a","88c836190daddad5257c0963159a2cd9ced899f7a3262271583703034caba890","ba7c356f3fa418d4486b3b4e405c01c6d529c274e1e877b98166c46dd7cc0f0d","433b9953d8e0864997b5aaf7cc102f80c98304758244731c3fd0a5d6d645033c","366563a75f042b1a7c61d504a90a8a79810c694e445f038310303f232b6dc89a","f9facf2db5c46c5524f53472e03169f3e13e4f83ee14b98d46248c76146fca14","2945b371f6e04c29e3f96b611ecbf7ed75e172f8aeb603aee5e50510b4bc68a7","1ddbb5149b9d13b2c0441835f41a1b20561339264b05c6902966fc698d7d2863","c1e6646d81daf51ee06818677caa6a509ebee91c9329fbde76643d57f7af82b8","3f55047f1cd741d4abdbc4c8aafec026521a2c8dcad872dc99162b6eefb4e4a6",{"version":"43b28b87ce2d0146a1d4d7674b0b617ef086c2c24806e6f25a869a44e467f5ab","signature":"000fe39912235f255a2f33efcb10abcabd3f0c5cc878b7b471d6e0b66e362377"},{"version":"8cde84dd9b2725de0cbe54aa044b40921fa3d751b175a8503cea0f08330a80a7","signature":"7e477b06ac34b6ba360319bc93d834e48abc5d042b2f49c79fa2abce5496424e"},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true}],"root":[[59,62],224,225],"options":{"allowJs":true,"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"module":99,"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":[[74,75,106,149],[74,106,149],[72,73,76,106,149],[80,106,149],[71,76,78,79,106,149],[76,78,80,106,149],[77,80,106,149],[106,149,202],[106,149,202,203],[106,149,204],[106,149],[106,146,149],[106,148,149],[106,149,154,184],[106,149,150,155,161,162,169,181,192],[106,149,150,151,161,169],[101,102,103,106,149],[106,149,152,193],[106,149,153,154,162,170],[106,149,154,181,189],[106,149,155,157,161,169],[106,148,149,156],[106,149,157,158],[106,149,161],[106,149,159,161],[106,148,149,161],[106,149,161,162,163,181,192],[106,149,161,162,163,176,181,184],[106,144,149,197],[106,144,149,157,161,164,169,181,192],[106,149,161,162,164,165,169,181,189,192],[106,149,164,166,181,189,192],[106,149,161,167],[106,149,168,192],[106,149,157,161,169,181],[106,149,170],[106,149,171],[106,148,149,172],[106,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,167,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],[106,149,174],[106,149,175],[106,149,161,176,177],[106,149,176,178,193,195],[106,149,161,181,182,184],[106,149,183,184],[106,149,181,182],[106,149,184],[106,149,185],[106,146,149,181],[106,149,161,187,188],[106,149,187,188],[106,149,154,169,181,189],[106,149,190],[149],[104,105,106,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,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],[106,149,169,191],[106,149,164,175,192],[106,149,154,193],[106,149,181,194],[106,149,168,195],[106,149,196],[106,149,154,161,163,172,181,192,195,197],[106,149,181,198],[66,67,106,149],[66,106,149],[63,64,65,106,149],[106,149,213],[106,149,206],[68,106,149,206],[106,149,206,207,208,209,210,211,212],[68,106,149,213],[106,116,120,149,192],[106,116,149,181,192],[106,111,149],[106,113,116,149,189,192],[106,149,169,189],[106,149,199],[106,111,149,199],[106,113,116,149,169,192],[106,108,109,112,115,149,161,181,192],[106,116,123,149],[106,108,114,149],[106,116,137,138,149],[106,112,116,149,184,192,199],[106,137,149,199],[106,110,111,149,199],[106,116,149],[106,110,111,112,113,114,115,116,117,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,138,139,140,141,142,143,149],[106,116,131,149],[106,116,123,124,149],[106,114,116,124,125,149],[106,115,149],[106,108,111,116,149],[106,116,120,124,125,149],[106,120,149],[106,114,116,119,149,192],[106,108,113,116,123,149],[106,149,181],[106,111,116,137,149,197,199],[106,149,214,215,216,217,218,219,220,221,222],[68,70,81,82,106,149,201],[70,80,82,106,149],[68,70,80,81,106,149,201],[67,83,106,149,201],[106,149,161,199],[69,70,75,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,98,99,100,106,149,200],[65,67,68,106,149],[82,106,149],[83,85,106,149],[65,67,69,106,149],[70,80,106,149],[70,83,106,149,201],[69,70,80,106,149],[68,69,70,82,85,97,106,149],[68,69,106,149],[68,81,82,106,149,201],[70,82,106,149],[75,80,82,85,92,106,149,201],[59,60,106,149],[61,106,149],[61,106,149,201,202,205,223],[61],[201,223]],"referencedMap":[[76,1],[73,2],[72,2],[74,3],[79,4],[80,5],[71,4],[77,6],[78,7],[203,8],[204,9],[205,10],[202,11],[226,11],[146,12],[147,12],[148,13],[149,14],[150,15],[151,16],[101,11],[104,17],[102,11],[103,11],[152,18],[153,19],[154,20],[155,21],[156,22],[157,23],[158,23],[160,24],[159,25],[161,26],[162,27],[163,28],[145,29],[164,30],[165,31],[166,32],[167,33],[168,34],[169,35],[170,36],[171,37],[172,38],[173,39],[174,40],[175,41],[176,42],[177,42],[178,43],[179,11],[180,11],[181,44],[183,45],[182,46],[184,47],[185,48],[186,49],[187,50],[188,51],[189,52],[190,53],[106,54],[105,11],[199,55],[191,56],[192,57],[193,58],[194,59],[195,60],[196,61],[197,62],[198,63],[107,11],[97,11],[81,11],[63,11],[64,64],[67,65],[65,11],[66,66],[75,11],[206,67],[209,68],[210,68],[207,69],[208,68],[213,70],[211,71],[212,67],[57,11],[58,11],[10,11],[12,11],[11,11],[2,11],[13,11],[14,11],[15,11],[16,11],[17,11],[18,11],[19,11],[20,11],[3,11],[21,11],[4,11],[22,11],[26,11],[23,11],[24,11],[25,11],[27,11],[28,11],[29,11],[5,11],[30,11],[31,11],[32,11],[33,11],[6,11],[37,11],[34,11],[35,11],[36,11],[38,11],[7,11],[39,11],[44,11],[45,11],[40,11],[41,11],[42,11],[43,11],[8,11],[49,11],[46,11],[47,11],[48,11],[50,11],[9,11],[51,11],[52,11],[53,11],[56,11],[54,11],[55,11],[1,11],[68,11],[123,72],[133,73],[122,72],[143,74],[114,75],[113,76],[142,77],[136,78],[141,79],[116,80],[130,81],[115,82],[139,83],[111,84],[110,77],[140,85],[112,86],[117,87],[118,11],[121,87],[108,11],[144,88],[134,89],[125,90],[126,91],[128,92],[124,93],[127,94],[137,77],[119,95],[120,96],[129,97],[109,98],[132,89],[131,87],[135,11],[138,99],[215,71],[217,71],[218,71],[214,71],[221,71],[220,71],[222,71],[219,71],[216,71],[223,100],[94,101],[95,102],[82,103],[84,104],[100,11],[85,11],[200,105],[201,106],[69,107],[86,108],[96,109],[70,110],[83,111],[87,112],[88,113],[98,114],[99,115],[89,11],[90,108],[92,116],[91,117],[93,118],[61,119],[62,120],[225,11],[59,11],[60,11],[224,121]],"exportedModulesMap":[[76,1],[73,2],[72,2],[74,3],[79,4],[80,5],[71,4],[77,6],[78,7],[203,8],[204,9],[205,10],[202,11],[226,11],[146,12],[147,12],[148,13],[149,14],[150,15],[151,16],[101,11],[104,17],[102,11],[103,11],[152,18],[153,19],[154,20],[155,21],[156,22],[157,23],[158,23],[160,24],[159,25],[161,26],[162,27],[163,28],[145,29],[164,30],[165,31],[166,32],[167,33],[168,34],[169,35],[170,36],[171,37],[172,38],[173,39],[174,40],[175,41],[176,42],[177,42],[178,43],[179,11],[180,11],[181,44],[183,45],[182,46],[184,47],[185,48],[186,49],[187,50],[188,51],[189,52],[190,53],[106,54],[105,11],[199,55],[191,56],[192,57],[193,58],[194,59],[195,60],[196,61],[197,62],[198,63],[107,11],[97,11],[81,11],[63,11],[64,64],[67,65],[65,11],[66,66],[75,11],[206,67],[209,68],[210,68],[207,69],[208,68],[213,70],[211,71],[212,67],[57,11],[58,11],[10,11],[12,11],[11,11],[2,11],[13,11],[14,11],[15,11],[16,11],[17,11],[18,11],[19,11],[20,11],[3,11],[21,11],[4,11],[22,11],[26,11],[23,11],[24,11],[25,11],[27,11],[28,11],[29,11],[5,11],[30,11],[31,11],[32,11],[33,11],[6,11],[37,11],[34,11],[35,11],[36,11],[38,11],[7,11],[39,11],[44,11],[45,11],[40,11],[41,11],[42,11],[43,11],[8,11],[49,11],[46,11],[47,11],[48,11],[50,11],[9,11],[51,11],[52,11],[53,11],[56,11],[54,11],[55,11],[1,11],[68,11],[123,72],[133,73],[122,72],[143,74],[114,75],[113,76],[142,77],[136,78],[141,79],[116,80],[130,81],[115,82],[139,83],[111,84],[110,77],[140,85],[112,86],[117,87],[118,11],[121,87],[108,11],[144,88],[134,89],[125,90],[126,91],[128,92],[124,93],[127,94],[137,77],[119,95],[120,96],[129,97],[109,98],[132,89],[131,87],[135,11],[138,99],[215,71],[217,71],[218,71],[214,71],[221,71],[220,71],[222,71],[219,71],[216,71],[223,100],[94,101],[95,102],[82,103],[84,104],[100,11],[85,11],[200,105],[201,106],[69,107],[86,108],[96,109],[70,110],[83,111],[87,112],[88,113],[98,114],[99,115],[89,11],[90,108],[92,116],[91,117],[93,118],[62,122],[59,11],[224,123]],"semanticDiagnosticsPerFile":[76,73,72,74,79,80,71,77,78,203,204,205,202,226,146,147,148,149,150,151,101,104,102,103,152,153,154,155,156,157,158,160,159,161,162,163,145,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,183,182,184,185,186,187,188,189,190,106,105,199,191,192,193,194,195,196,197,198,107,97,81,63,64,67,65,66,75,206,209,210,207,208,213,211,212,57,58,10,12,11,2,13,14,15,16,17,18,19,20,3,21,4,22,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,1,68,123,133,122,143,114,113,142,136,141,116,130,115,139,111,110,140,112,117,118,121,108,144,134,125,126,128,124,127,137,119,120,129,109,132,131,135,138,215,217,218,214,221,220,222,219,216,223,94,95,82,84,100,85,200,201,69,86,96,70,83,87,88,98,99,89,90,92,91,93,61,62,225,59,60,224]},"version":"5.4.5"}
|
package/dist/sds.d.ts
CHANGED
@@ -1,24 +1,39 @@
|
|
1
|
+
import { TypedEventEmitter } from "@libp2p/interface";
|
1
2
|
import { proto_sds_message } from "@waku/proto";
|
3
|
+
export declare enum MessageChannelEvent {
|
4
|
+
MessageDelivered = "messageDelivered"
|
5
|
+
}
|
6
|
+
type MessageChannelEvents = {
|
7
|
+
[MessageChannelEvent.MessageDelivered]: CustomEvent<string>;
|
8
|
+
};
|
2
9
|
export type Message = proto_sds_message.SdsMessage;
|
10
|
+
export type HistoryEntry = proto_sds_message.HistoryEntry;
|
3
11
|
export type ChannelId = string;
|
4
12
|
export declare const DEFAULT_BLOOM_FILTER_OPTIONS: {
|
5
13
|
capacity: number;
|
6
14
|
errorRate: number;
|
7
15
|
};
|
8
|
-
|
9
|
-
|
10
|
-
|
16
|
+
interface MessageChannelOptions {
|
17
|
+
causalHistorySize?: number;
|
18
|
+
receivedMessageTimeoutEnabled?: boolean;
|
19
|
+
receivedMessageTimeout?: number;
|
20
|
+
deliveredMessageCallback?: (messageId: string) => void;
|
21
|
+
}
|
22
|
+
export declare class MessageChannel extends TypedEventEmitter<MessageChannelEvents> {
|
11
23
|
private lamportTimestamp;
|
12
24
|
private filter;
|
13
25
|
private outgoingBuffer;
|
14
26
|
private acknowledgements;
|
15
27
|
private incomingBuffer;
|
16
|
-
private
|
28
|
+
private localHistory;
|
17
29
|
private channelId;
|
18
30
|
private causalHistorySize;
|
19
31
|
private acknowledgementCount;
|
20
32
|
private timeReceived;
|
21
|
-
|
33
|
+
private receivedMessageTimeoutEnabled;
|
34
|
+
private receivedMessageTimeout;
|
35
|
+
private deliveredMessageCallback?;
|
36
|
+
constructor(channelId: ChannelId, options?: MessageChannelOptions);
|
22
37
|
static getMessageId(payload: Uint8Array): string;
|
23
38
|
/**
|
24
39
|
* Send a message to the SDS channel.
|
@@ -36,7 +51,24 @@ export declare class MessageChannel {
|
|
36
51
|
* @param payload - The payload to send.
|
37
52
|
* @param callback - A callback function that returns a boolean indicating whether the message was sent successfully.
|
38
53
|
*/
|
39
|
-
sendMessage(payload: Uint8Array, callback?: (message: Message) => Promise<
|
54
|
+
sendMessage(payload: Uint8Array, callback?: (message: Message) => Promise<{
|
55
|
+
success: boolean;
|
56
|
+
retrievalHint?: Uint8Array;
|
57
|
+
}>): Promise<void>;
|
58
|
+
/**
|
59
|
+
* Sends a short-lived message without synchronization or reliability requirements.
|
60
|
+
*
|
61
|
+
* Sends a message without a timestamp, causal history, or bloom filter.
|
62
|
+
* Ephemeral messages are not added to the outgoing buffer.
|
63
|
+
* Upon reception, ephemeral messages are delivered immediately without
|
64
|
+
* checking for causal dependencies or including in the local log.
|
65
|
+
*
|
66
|
+
* See https://rfc.vac.dev/vac/raw/sds/#ephemeral-messages
|
67
|
+
*
|
68
|
+
* @param payload - The payload to send.
|
69
|
+
* @param callback - A callback function that returns a boolean indicating whether the message was sent successfully.
|
70
|
+
*/
|
71
|
+
sendEphemeralMessage(payload: Uint8Array, callback?: (message: Message) => boolean): void;
|
40
72
|
/**
|
41
73
|
* Process a received SDS message for this channel.
|
42
74
|
*
|
@@ -52,7 +84,7 @@ export declare class MessageChannel {
|
|
52
84
|
* @param message - The received SDS message.
|
53
85
|
*/
|
54
86
|
receiveMessage(message: Message): void;
|
55
|
-
sweepIncomingBuffer():
|
87
|
+
sweepIncomingBuffer(): HistoryEntry[];
|
56
88
|
sweepOutgoingBuffer(): {
|
57
89
|
unacknowledged: Message[];
|
58
90
|
possiblyAcknowledged: Message[];
|
@@ -71,4 +103,6 @@ export declare class MessageChannel {
|
|
71
103
|
private deliverMessage;
|
72
104
|
private reviewAckStatus;
|
73
105
|
private getAcknowledgementCount;
|
106
|
+
private notifyDeliveredMessage;
|
74
107
|
}
|
108
|
+
export {};
|
package/dist/sds.js
CHANGED
@@ -1,38 +1,49 @@
|
|
1
|
+
import { TypedEventEmitter } from "@libp2p/interface";
|
1
2
|
import { sha256 } from "@noble/hashes/sha256";
|
2
3
|
import { bytesToHex } from "@noble/hashes/utils";
|
3
4
|
import { DefaultBloomFilter } from "./bloom.js";
|
5
|
+
export var MessageChannelEvent;
|
6
|
+
(function (MessageChannelEvent) {
|
7
|
+
MessageChannelEvent["MessageDelivered"] = "messageDelivered";
|
8
|
+
})(MessageChannelEvent || (MessageChannelEvent = {}));
|
4
9
|
export const DEFAULT_BLOOM_FILTER_OPTIONS = {
|
5
10
|
capacity: 10000,
|
6
11
|
errorRate: 0.001
|
7
12
|
};
|
8
13
|
const DEFAULT_CAUSAL_HISTORY_SIZE = 2;
|
9
14
|
const DEFAULT_RECEIVED_MESSAGE_TIMEOUT = 1000 * 60 * 5; // 5 minutes
|
10
|
-
export class MessageChannel {
|
11
|
-
receivedMessageTimeoutEnabled;
|
12
|
-
receivedMessageTimeout;
|
15
|
+
export class MessageChannel extends TypedEventEmitter {
|
13
16
|
lamportTimestamp;
|
14
17
|
filter;
|
15
18
|
outgoingBuffer;
|
16
19
|
acknowledgements;
|
17
20
|
incomingBuffer;
|
18
|
-
|
21
|
+
localHistory;
|
19
22
|
channelId;
|
20
23
|
causalHistorySize;
|
21
24
|
acknowledgementCount;
|
22
25
|
timeReceived;
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
+
receivedMessageTimeoutEnabled;
|
27
|
+
receivedMessageTimeout;
|
28
|
+
deliveredMessageCallback;
|
29
|
+
constructor(channelId, options = {}) {
|
30
|
+
super();
|
26
31
|
this.channelId = channelId;
|
27
32
|
this.lamportTimestamp = 0;
|
28
33
|
this.filter = new DefaultBloomFilter(DEFAULT_BLOOM_FILTER_OPTIONS);
|
29
34
|
this.outgoingBuffer = [];
|
30
35
|
this.acknowledgements = new Map();
|
31
36
|
this.incomingBuffer = [];
|
32
|
-
this.
|
33
|
-
this.causalHistorySize =
|
37
|
+
this.localHistory = [];
|
38
|
+
this.causalHistorySize =
|
39
|
+
options.causalHistorySize ?? DEFAULT_CAUSAL_HISTORY_SIZE;
|
34
40
|
this.acknowledgementCount = this.getAcknowledgementCount();
|
35
41
|
this.timeReceived = new Map();
|
42
|
+
this.receivedMessageTimeoutEnabled =
|
43
|
+
options.receivedMessageTimeoutEnabled ?? false;
|
44
|
+
this.receivedMessageTimeout =
|
45
|
+
options.receivedMessageTimeout ?? DEFAULT_RECEIVED_MESSAGE_TIMEOUT;
|
46
|
+
this.deliveredMessageCallback = options.deliveredMessageCallback;
|
36
47
|
}
|
37
48
|
static getMessageId(payload) {
|
38
49
|
return bytesToHex(sha256(payload));
|
@@ -60,21 +71,53 @@ export class MessageChannel {
|
|
60
71
|
messageId,
|
61
72
|
channelId: this.channelId,
|
62
73
|
lamportTimestamp: this.lamportTimestamp,
|
63
|
-
causalHistory: this.
|
74
|
+
causalHistory: this.localHistory
|
64
75
|
.slice(-this.causalHistorySize)
|
65
|
-
.map(({
|
76
|
+
.map(({ historyEntry }) => historyEntry),
|
66
77
|
bloomFilter: this.filter.toBytes(),
|
67
78
|
content: payload
|
68
79
|
};
|
69
80
|
this.outgoingBuffer.push(message);
|
70
81
|
if (callback) {
|
71
|
-
const success = await callback(message);
|
82
|
+
const { success, retrievalHint } = await callback(message);
|
72
83
|
if (success) {
|
73
84
|
this.filter.insert(messageId);
|
74
|
-
this.
|
85
|
+
this.localHistory.push({
|
86
|
+
timestamp: this.lamportTimestamp,
|
87
|
+
historyEntry: {
|
88
|
+
messageId,
|
89
|
+
retrievalHint
|
90
|
+
}
|
91
|
+
});
|
75
92
|
}
|
76
93
|
}
|
77
94
|
}
|
95
|
+
/**
|
96
|
+
* Sends a short-lived message without synchronization or reliability requirements.
|
97
|
+
*
|
98
|
+
* Sends a message without a timestamp, causal history, or bloom filter.
|
99
|
+
* Ephemeral messages are not added to the outgoing buffer.
|
100
|
+
* Upon reception, ephemeral messages are delivered immediately without
|
101
|
+
* checking for causal dependencies or including in the local log.
|
102
|
+
*
|
103
|
+
* See https://rfc.vac.dev/vac/raw/sds/#ephemeral-messages
|
104
|
+
*
|
105
|
+
* @param payload - The payload to send.
|
106
|
+
* @param callback - A callback function that returns a boolean indicating whether the message was sent successfully.
|
107
|
+
*/
|
108
|
+
sendEphemeralMessage(payload, callback) {
|
109
|
+
const message = {
|
110
|
+
messageId: MessageChannel.getMessageId(payload),
|
111
|
+
channelId: this.channelId,
|
112
|
+
content: payload,
|
113
|
+
lamportTimestamp: undefined,
|
114
|
+
causalHistory: [],
|
115
|
+
bloomFilter: undefined
|
116
|
+
};
|
117
|
+
if (callback) {
|
118
|
+
callback(message);
|
119
|
+
}
|
120
|
+
}
|
78
121
|
/**
|
79
122
|
* Process a received SDS message for this channel.
|
80
123
|
*
|
@@ -90,6 +133,11 @@ export class MessageChannel {
|
|
90
133
|
* @param message - The received SDS message.
|
91
134
|
*/
|
92
135
|
receiveMessage(message) {
|
136
|
+
if (!message.lamportTimestamp) {
|
137
|
+
// Messages with no timestamp are ephemeral messages and should be delivered immediately
|
138
|
+
this.deliverMessage(message);
|
139
|
+
return;
|
140
|
+
}
|
93
141
|
// review ack status
|
94
142
|
this.reviewAckStatus(message);
|
95
143
|
// add to bloom filter (skip for messages with empty content)
|
@@ -97,7 +145,7 @@ export class MessageChannel {
|
|
97
145
|
this.filter.insert(message.messageId);
|
98
146
|
}
|
99
147
|
// verify causal history
|
100
|
-
const dependenciesMet = message.causalHistory.every((
|
148
|
+
const dependenciesMet = message.causalHistory.every((historyEntry) => this.localHistory.some(({ historyEntry: { messageId } }) => messageId === historyEntry.messageId));
|
101
149
|
if (!dependenciesMet) {
|
102
150
|
this.incomingBuffer.push(message);
|
103
151
|
this.timeReceived.set(message.messageId, Date.now());
|
@@ -110,7 +158,7 @@ export class MessageChannel {
|
|
110
158
|
sweepIncomingBuffer() {
|
111
159
|
const { buffer, missing } = this.incomingBuffer.reduce(({ buffer, missing }, message) => {
|
112
160
|
// Check each message for missing dependencies
|
113
|
-
const missingDependencies = message.causalHistory.filter((
|
161
|
+
const missingDependencies = message.causalHistory.filter((messageHistoryEntry) => !this.localHistory.some(({ historyEntry: { messageId } }) => messageId === messageHistoryEntry.messageId));
|
114
162
|
if (missingDependencies.length === 0) {
|
115
163
|
// Any message with no missing dependencies is delivered
|
116
164
|
// and removed from the buffer (implicitly by not adding it to the new incoming buffer)
|
@@ -173,9 +221,9 @@ export class MessageChannel {
|
|
173
221
|
messageId: MessageChannel.getMessageId(emptyMessage),
|
174
222
|
channelId: this.channelId,
|
175
223
|
lamportTimestamp: this.lamportTimestamp,
|
176
|
-
causalHistory: this.
|
224
|
+
causalHistory: this.localHistory
|
177
225
|
.slice(-this.causalHistorySize)
|
178
|
-
.map(({
|
226
|
+
.map(({ historyEntry }) => historyEntry),
|
179
227
|
bloomFilter: this.filter.toBytes(),
|
180
228
|
content: emptyMessage
|
181
229
|
};
|
@@ -185,13 +233,16 @@ export class MessageChannel {
|
|
185
233
|
return Promise.resolve(false);
|
186
234
|
}
|
187
235
|
// See https://rfc.vac.dev/vac/raw/sds/#deliver-message
|
188
|
-
deliverMessage(message) {
|
236
|
+
deliverMessage(message, retrievalHint) {
|
237
|
+
this.notifyDeliveredMessage(message.messageId);
|
189
238
|
const messageLamportTimestamp = message.lamportTimestamp ?? 0;
|
190
239
|
if (messageLamportTimestamp > this.lamportTimestamp) {
|
191
240
|
this.lamportTimestamp = messageLamportTimestamp;
|
192
241
|
}
|
193
|
-
if (message.content?.length === 0
|
242
|
+
if (message.content?.length === 0 ||
|
243
|
+
message.lamportTimestamp === undefined) {
|
194
244
|
// Messages with empty content are sync messages.
|
245
|
+
// Messages with no timestamp are ephemeral messages.
|
195
246
|
// They are not added to the local log or bloom filter.
|
196
247
|
return;
|
197
248
|
}
|
@@ -200,15 +251,18 @@ export class MessageChannel {
|
|
200
251
|
// If one or more message IDs with the same Lamport timestamp already exists,
|
201
252
|
// the participant MUST follow the Resolve Conflicts procedure.
|
202
253
|
// https://rfc.vac.dev/vac/raw/sds/#resolve-conflicts
|
203
|
-
this.
|
254
|
+
this.localHistory.push({
|
204
255
|
timestamp: messageLamportTimestamp,
|
205
|
-
|
256
|
+
historyEntry: {
|
257
|
+
messageId: message.messageId,
|
258
|
+
retrievalHint
|
259
|
+
}
|
206
260
|
});
|
207
|
-
this.
|
261
|
+
this.localHistory.sort((a, b) => {
|
208
262
|
if (a.timestamp !== b.timestamp) {
|
209
263
|
return a.timestamp - b.timestamp;
|
210
264
|
}
|
211
|
-
return a.messageId.localeCompare(b.messageId);
|
265
|
+
return a.historyEntry.messageId.localeCompare(b.historyEntry.messageId);
|
212
266
|
});
|
213
267
|
}
|
214
268
|
// For each received message (including sync messages), inspect the causal history and bloom filter
|
@@ -216,8 +270,8 @@ export class MessageChannel {
|
|
216
270
|
// See https://rfc.vac.dev/vac/raw/sds/#review-ack-status
|
217
271
|
reviewAckStatus(receivedMessage) {
|
218
272
|
// the participant MUST mark all messages in the received causal_history as acknowledged.
|
219
|
-
receivedMessage.causalHistory.forEach((messageId) => {
|
220
|
-
this.outgoingBuffer = this.outgoingBuffer.filter((
|
273
|
+
receivedMessage.causalHistory.forEach(({ messageId }) => {
|
274
|
+
this.outgoingBuffer = this.outgoingBuffer.filter(({ messageId: outgoingMessageId }) => outgoingMessageId !== messageId);
|
221
275
|
this.acknowledgements.delete(messageId);
|
222
276
|
if (!this.filter.lookup(messageId)) {
|
223
277
|
this.filter.insert(messageId);
|
@@ -248,5 +302,13 @@ export class MessageChannel {
|
|
248
302
|
getAcknowledgementCount() {
|
249
303
|
return 2;
|
250
304
|
}
|
305
|
+
notifyDeliveredMessage(messageId) {
|
306
|
+
if (this.deliveredMessageCallback) {
|
307
|
+
this.deliveredMessageCallback(messageId);
|
308
|
+
}
|
309
|
+
this.dispatchEvent(new CustomEvent(MessageChannelEvent.MessageDelivered, {
|
310
|
+
detail: messageId
|
311
|
+
}));
|
312
|
+
}
|
251
313
|
}
|
252
314
|
//# sourceMappingURL=sds.js.map
|
package/dist/sds.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sds.js","sourceRoot":"","sources":["../src/sds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"sds.js","sourceRoot":"","sources":["../src/sds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,4DAAqC,CAAA;AACvC,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B;AASD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,QAAQ,EAAE,KAAK;IACf,SAA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gBACtC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBACpD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAChD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IAED,4FAA4F;IACpF,uBAAuB;QAC7B,OAAO,CAAC,CAAC;IACX,CAAC;IAEO,sBAAsB,CAAC,SAAiB;QAC9C,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAClC,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,mBAAmB,CAAC,gBAAgB,EAAE;YACpD,MAAM,EAAE,SAAS;SAClB,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@waku/sds","version":"0.0.
|
1
|
+
{"name":"@waku/sds","version":"0.0.4-b7e9b08.0","description":"Scalable Data Sync implementation for the browser. Based on https://github.com/vacp2p/rfc-index/blob/main/vac/raw/sds.md","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"typesVersions":{"*":{"*":["*","dist/*","dist/*/index"]}},"type":"module","author":"Waku Team","homepage":"https://github.com/waku-org/js-waku/tree/master/packages/scalable-data-sync#readme","repository":{"type":"git","url":"https://github.com/waku-org/js-waku.git"},"bugs":{"url":"https://github.com/waku-org/js-waku/issues"},"license":"MIT OR Apache-2.0","keywords":["waku","decentralized","secure","communication","web3","ethereum","dapps","privacy"],"scripts":{"build":"run-s build:**","build:esm":"tsc","build:bundle":"rollup --config rollup.config.js","fix":"run-s fix:*","fix:lint":"eslint src *.js --fix","check":"run-s check:*","check:lint":"eslint src *.js","check:spelling":"cspell \"{README.md,src/**/*.ts}\"","check:tsc":"tsc -p tsconfig.dev.json","prepublish":"npm run build","reset-hard":"git clean -dfx -e .idea && git reset --hard && npm i && npm run build","test":"NODE_ENV=test run-s test:*","test:node":"NODE_ENV=test TS_NODE_PROJECT=./tsconfig.dev.json mocha"},"engines":{"node":">=20"},"dependencies":{"@libp2p/interface":"2.7.0","@noble/hashes":"^1.7.1","@waku/message-hash":"0.1.20-b7e9b08.0","@waku/proto":"0.0.11-b7e9b08.0","@waku/utils":"0.0.24-b7e9b08.0","chai":"^5.1.2"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.2.3","@waku/build-utils":"*","allure-commandline":"^2.27.0","allure-mocha":"^2.9.2","cspell":"^8.6.1","fast-check":"^3.19.0","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5","rollup":"^4.12.0"},"files":["dist","bundle","src/**/*.ts","!**/*.spec.*","!**/*.json","CHANGELOG.md","LICENSE","README.md"]}
|
package/src/sds.ts
CHANGED
@@ -1,10 +1,19 @@
|
|
1
|
+
import { TypedEventEmitter } from "@libp2p/interface";
|
1
2
|
import { sha256 } from "@noble/hashes/sha256";
|
2
3
|
import { bytesToHex } from "@noble/hashes/utils";
|
3
4
|
import { proto_sds_message } from "@waku/proto";
|
4
5
|
|
5
6
|
import { DefaultBloomFilter } from "./bloom.js";
|
6
7
|
|
8
|
+
export enum MessageChannelEvent {
|
9
|
+
MessageDelivered = "messageDelivered"
|
10
|
+
}
|
11
|
+
type MessageChannelEvents = {
|
12
|
+
[MessageChannelEvent.MessageDelivered]: CustomEvent<string>;
|
13
|
+
};
|
14
|
+
|
7
15
|
export type Message = proto_sds_message.SdsMessage;
|
16
|
+
export type HistoryEntry = proto_sds_message.HistoryEntry;
|
8
17
|
export type ChannelId = string;
|
9
18
|
|
10
19
|
export const DEFAULT_BLOOM_FILTER_OPTIONS = {
|
@@ -15,34 +24,49 @@ export const DEFAULT_BLOOM_FILTER_OPTIONS = {
|
|
15
24
|
const DEFAULT_CAUSAL_HISTORY_SIZE = 2;
|
16
25
|
const DEFAULT_RECEIVED_MESSAGE_TIMEOUT = 1000 * 60 * 5; // 5 minutes
|
17
26
|
|
18
|
-
|
27
|
+
interface MessageChannelOptions {
|
28
|
+
causalHistorySize?: number;
|
29
|
+
receivedMessageTimeoutEnabled?: boolean;
|
30
|
+
receivedMessageTimeout?: number;
|
31
|
+
deliveredMessageCallback?: (messageId: string) => void;
|
32
|
+
}
|
33
|
+
|
34
|
+
export class MessageChannel extends TypedEventEmitter<MessageChannelEvents> {
|
19
35
|
private lamportTimestamp: number;
|
20
36
|
private filter: DefaultBloomFilter;
|
21
37
|
private outgoingBuffer: Message[];
|
22
38
|
private acknowledgements: Map<string, number>;
|
23
39
|
private incomingBuffer: Message[];
|
24
|
-
private
|
40
|
+
private localHistory: { timestamp: number; historyEntry: HistoryEntry }[];
|
25
41
|
private channelId: ChannelId;
|
26
42
|
private causalHistorySize: number;
|
27
43
|
private acknowledgementCount: number;
|
28
44
|
private timeReceived: Map<string, number>;
|
45
|
+
private receivedMessageTimeoutEnabled: boolean;
|
46
|
+
private receivedMessageTimeout: number;
|
47
|
+
private deliveredMessageCallback?: (messageId: string) => void;
|
29
48
|
|
30
49
|
public constructor(
|
31
50
|
channelId: ChannelId,
|
32
|
-
|
33
|
-
private receivedMessageTimeoutEnabled: boolean = false,
|
34
|
-
private receivedMessageTimeout: number = DEFAULT_RECEIVED_MESSAGE_TIMEOUT
|
51
|
+
options: MessageChannelOptions = {}
|
35
52
|
) {
|
53
|
+
super();
|
36
54
|
this.channelId = channelId;
|
37
55
|
this.lamportTimestamp = 0;
|
38
56
|
this.filter = new DefaultBloomFilter(DEFAULT_BLOOM_FILTER_OPTIONS);
|
39
57
|
this.outgoingBuffer = [];
|
40
58
|
this.acknowledgements = new Map();
|
41
59
|
this.incomingBuffer = [];
|
42
|
-
this.
|
43
|
-
this.causalHistorySize =
|
60
|
+
this.localHistory = [];
|
61
|
+
this.causalHistorySize =
|
62
|
+
options.causalHistorySize ?? DEFAULT_CAUSAL_HISTORY_SIZE;
|
44
63
|
this.acknowledgementCount = this.getAcknowledgementCount();
|
45
64
|
this.timeReceived = new Map();
|
65
|
+
this.receivedMessageTimeoutEnabled =
|
66
|
+
options.receivedMessageTimeoutEnabled ?? false;
|
67
|
+
this.receivedMessageTimeout =
|
68
|
+
options.receivedMessageTimeout ?? DEFAULT_RECEIVED_MESSAGE_TIMEOUT;
|
69
|
+
this.deliveredMessageCallback = options.deliveredMessageCallback;
|
46
70
|
}
|
47
71
|
|
48
72
|
public static getMessageId(payload: Uint8Array): string {
|
@@ -67,7 +91,10 @@ export class MessageChannel {
|
|
67
91
|
*/
|
68
92
|
public async sendMessage(
|
69
93
|
payload: Uint8Array,
|
70
|
-
callback?: (message: Message) => Promise<
|
94
|
+
callback?: (message: Message) => Promise<{
|
95
|
+
success: boolean;
|
96
|
+
retrievalHint?: Uint8Array;
|
97
|
+
}>
|
71
98
|
): Promise<void> {
|
72
99
|
this.lamportTimestamp++;
|
73
100
|
|
@@ -77,9 +104,9 @@ export class MessageChannel {
|
|
77
104
|
messageId,
|
78
105
|
channelId: this.channelId,
|
79
106
|
lamportTimestamp: this.lamportTimestamp,
|
80
|
-
causalHistory: this.
|
107
|
+
causalHistory: this.localHistory
|
81
108
|
.slice(-this.causalHistorySize)
|
82
|
-
.map(({
|
109
|
+
.map(({ historyEntry }) => historyEntry),
|
83
110
|
bloomFilter: this.filter.toBytes(),
|
84
111
|
content: payload
|
85
112
|
};
|
@@ -87,14 +114,50 @@ export class MessageChannel {
|
|
87
114
|
this.outgoingBuffer.push(message);
|
88
115
|
|
89
116
|
if (callback) {
|
90
|
-
const success = await callback(message);
|
117
|
+
const { success, retrievalHint } = await callback(message);
|
91
118
|
if (success) {
|
92
119
|
this.filter.insert(messageId);
|
93
|
-
this.
|
120
|
+
this.localHistory.push({
|
121
|
+
timestamp: this.lamportTimestamp,
|
122
|
+
historyEntry: {
|
123
|
+
messageId,
|
124
|
+
retrievalHint
|
125
|
+
}
|
126
|
+
});
|
94
127
|
}
|
95
128
|
}
|
96
129
|
}
|
97
130
|
|
131
|
+
/**
|
132
|
+
* Sends a short-lived message without synchronization or reliability requirements.
|
133
|
+
*
|
134
|
+
* Sends a message without a timestamp, causal history, or bloom filter.
|
135
|
+
* Ephemeral messages are not added to the outgoing buffer.
|
136
|
+
* Upon reception, ephemeral messages are delivered immediately without
|
137
|
+
* checking for causal dependencies or including in the local log.
|
138
|
+
*
|
139
|
+
* See https://rfc.vac.dev/vac/raw/sds/#ephemeral-messages
|
140
|
+
*
|
141
|
+
* @param payload - The payload to send.
|
142
|
+
* @param callback - A callback function that returns a boolean indicating whether the message was sent successfully.
|
143
|
+
*/
|
144
|
+
public sendEphemeralMessage(
|
145
|
+
payload: Uint8Array,
|
146
|
+
callback?: (message: Message) => boolean
|
147
|
+
): void {
|
148
|
+
const message: Message = {
|
149
|
+
messageId: MessageChannel.getMessageId(payload),
|
150
|
+
channelId: this.channelId,
|
151
|
+
content: payload,
|
152
|
+
lamportTimestamp: undefined,
|
153
|
+
causalHistory: [],
|
154
|
+
bloomFilter: undefined
|
155
|
+
};
|
156
|
+
|
157
|
+
if (callback) {
|
158
|
+
callback(message);
|
159
|
+
}
|
160
|
+
}
|
98
161
|
/**
|
99
162
|
* Process a received SDS message for this channel.
|
100
163
|
*
|
@@ -110,6 +173,11 @@ export class MessageChannel {
|
|
110
173
|
* @param message - The received SDS message.
|
111
174
|
*/
|
112
175
|
public receiveMessage(message: Message): void {
|
176
|
+
if (!message.lamportTimestamp) {
|
177
|
+
// Messages with no timestamp are ephemeral messages and should be delivered immediately
|
178
|
+
this.deliverMessage(message);
|
179
|
+
return;
|
180
|
+
}
|
113
181
|
// review ack status
|
114
182
|
this.reviewAckStatus(message);
|
115
183
|
// add to bloom filter (skip for messages with empty content)
|
@@ -117,9 +185,10 @@ export class MessageChannel {
|
|
117
185
|
this.filter.insert(message.messageId);
|
118
186
|
}
|
119
187
|
// verify causal history
|
120
|
-
const dependenciesMet = message.causalHistory.every((
|
121
|
-
this.
|
122
|
-
({
|
188
|
+
const dependenciesMet = message.causalHistory.every((historyEntry) =>
|
189
|
+
this.localHistory.some(
|
190
|
+
({ historyEntry: { messageId } }) =>
|
191
|
+
messageId === historyEntry.messageId
|
123
192
|
)
|
124
193
|
);
|
125
194
|
if (!dependenciesMet) {
|
@@ -131,17 +200,18 @@ export class MessageChannel {
|
|
131
200
|
}
|
132
201
|
|
133
202
|
// https://rfc.vac.dev/vac/raw/sds/#periodic-incoming-buffer-sweep
|
134
|
-
public sweepIncomingBuffer():
|
203
|
+
public sweepIncomingBuffer(): HistoryEntry[] {
|
135
204
|
const { buffer, missing } = this.incomingBuffer.reduce<{
|
136
205
|
buffer: Message[];
|
137
|
-
missing:
|
206
|
+
missing: HistoryEntry[];
|
138
207
|
}>(
|
139
208
|
({ buffer, missing }, message) => {
|
140
209
|
// Check each message for missing dependencies
|
141
210
|
const missingDependencies = message.causalHistory.filter(
|
142
|
-
(
|
143
|
-
!this.
|
144
|
-
({
|
211
|
+
(messageHistoryEntry) =>
|
212
|
+
!this.localHistory.some(
|
213
|
+
({ historyEntry: { messageId } }) =>
|
214
|
+
messageId === messageHistoryEntry.messageId
|
145
215
|
)
|
146
216
|
);
|
147
217
|
if (missingDependencies.length === 0) {
|
@@ -169,7 +239,7 @@ export class MessageChannel {
|
|
169
239
|
missing: missing.concat(missingDependencies)
|
170
240
|
};
|
171
241
|
},
|
172
|
-
{ buffer: new Array<Message>(), missing: new Array<
|
242
|
+
{ buffer: new Array<Message>(), missing: new Array<HistoryEntry>() }
|
173
243
|
);
|
174
244
|
// Update the incoming buffer to only include messages with no missing dependencies
|
175
245
|
this.incomingBuffer = buffer;
|
@@ -226,9 +296,9 @@ export class MessageChannel {
|
|
226
296
|
messageId: MessageChannel.getMessageId(emptyMessage),
|
227
297
|
channelId: this.channelId,
|
228
298
|
lamportTimestamp: this.lamportTimestamp,
|
229
|
-
causalHistory: this.
|
299
|
+
causalHistory: this.localHistory
|
230
300
|
.slice(-this.causalHistorySize)
|
231
|
-
.map(({
|
301
|
+
.map(({ historyEntry }) => historyEntry),
|
232
302
|
bloomFilter: this.filter.toBytes(),
|
233
303
|
content: emptyMessage
|
234
304
|
};
|
@@ -240,14 +310,20 @@ export class MessageChannel {
|
|
240
310
|
}
|
241
311
|
|
242
312
|
// See https://rfc.vac.dev/vac/raw/sds/#deliver-message
|
243
|
-
private deliverMessage(message: Message): void {
|
313
|
+
private deliverMessage(message: Message, retrievalHint?: Uint8Array): void {
|
314
|
+
this.notifyDeliveredMessage(message.messageId);
|
315
|
+
|
244
316
|
const messageLamportTimestamp = message.lamportTimestamp ?? 0;
|
245
317
|
if (messageLamportTimestamp > this.lamportTimestamp) {
|
246
318
|
this.lamportTimestamp = messageLamportTimestamp;
|
247
319
|
}
|
248
320
|
|
249
|
-
if (
|
321
|
+
if (
|
322
|
+
message.content?.length === 0 ||
|
323
|
+
message.lamportTimestamp === undefined
|
324
|
+
) {
|
250
325
|
// Messages with empty content are sync messages.
|
326
|
+
// Messages with no timestamp are ephemeral messages.
|
251
327
|
// They are not added to the local log or bloom filter.
|
252
328
|
return;
|
253
329
|
}
|
@@ -257,15 +333,18 @@ export class MessageChannel {
|
|
257
333
|
// If one or more message IDs with the same Lamport timestamp already exists,
|
258
334
|
// the participant MUST follow the Resolve Conflicts procedure.
|
259
335
|
// https://rfc.vac.dev/vac/raw/sds/#resolve-conflicts
|
260
|
-
this.
|
336
|
+
this.localHistory.push({
|
261
337
|
timestamp: messageLamportTimestamp,
|
262
|
-
|
338
|
+
historyEntry: {
|
339
|
+
messageId: message.messageId,
|
340
|
+
retrievalHint
|
341
|
+
}
|
263
342
|
});
|
264
|
-
this.
|
343
|
+
this.localHistory.sort((a, b) => {
|
265
344
|
if (a.timestamp !== b.timestamp) {
|
266
345
|
return a.timestamp - b.timestamp;
|
267
346
|
}
|
268
|
-
return a.messageId.localeCompare(b.messageId);
|
347
|
+
return a.historyEntry.messageId.localeCompare(b.historyEntry.messageId);
|
269
348
|
});
|
270
349
|
}
|
271
350
|
|
@@ -274,9 +353,9 @@ export class MessageChannel {
|
|
274
353
|
// See https://rfc.vac.dev/vac/raw/sds/#review-ack-status
|
275
354
|
private reviewAckStatus(receivedMessage: Message): void {
|
276
355
|
// the participant MUST mark all messages in the received causal_history as acknowledged.
|
277
|
-
receivedMessage.causalHistory.forEach((messageId) => {
|
356
|
+
receivedMessage.causalHistory.forEach(({ messageId }) => {
|
278
357
|
this.outgoingBuffer = this.outgoingBuffer.filter(
|
279
|
-
(
|
358
|
+
({ messageId: outgoingMessageId }) => outgoingMessageId !== messageId
|
280
359
|
);
|
281
360
|
this.acknowledgements.delete(messageId);
|
282
361
|
if (!this.filter.lookup(messageId)) {
|
@@ -312,4 +391,15 @@ export class MessageChannel {
|
|
312
391
|
private getAcknowledgementCount(): number {
|
313
392
|
return 2;
|
314
393
|
}
|
394
|
+
|
395
|
+
private notifyDeliveredMessage(messageId: string): void {
|
396
|
+
if (this.deliveredMessageCallback) {
|
397
|
+
this.deliveredMessageCallback(messageId);
|
398
|
+
}
|
399
|
+
this.dispatchEvent(
|
400
|
+
new CustomEvent(MessageChannelEvent.MessageDelivered, {
|
401
|
+
detail: messageId
|
402
|
+
})
|
403
|
+
);
|
404
|
+
}
|
315
405
|
}
|