@waku/core 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +66 -1
  2. package/bundle/browser-2f1afe46.js +726 -0
  3. package/bundle/index.js +9166 -12074
  4. package/bundle/lib/base_protocol.js +108 -0
  5. package/bundle/lib/message/topic_only_message.js +3 -2
  6. package/bundle/lib/message/version_0.js +3 -2
  7. package/bundle/peer_exchange-1229c8b0.js +4302 -0
  8. package/bundle/{topic_only_message-b1eddea1.js → topic_only_message-e8406994.js} +12 -8
  9. package/bundle/{version_0-862a05e0.js → version_0-e9a6cfb0.js} +35 -35
  10. package/dist/.tsbuildinfo +1 -0
  11. package/dist/index.d.ts +4 -1
  12. package/dist/index.js +3 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/lib/base_protocol.d.ts +21 -0
  15. package/dist/lib/base_protocol.js +33 -0
  16. package/dist/lib/base_protocol.js.map +1 -0
  17. package/dist/lib/connection_manager.d.ts +31 -0
  18. package/dist/lib/connection_manager.js +146 -0
  19. package/dist/lib/connection_manager.js.map +1 -0
  20. package/dist/lib/filter/filter_rpc.d.ts +8 -8
  21. package/dist/lib/filter/filter_rpc.js +6 -6
  22. package/dist/lib/filter/index.d.ts +5 -22
  23. package/dist/lib/filter/index.js +31 -86
  24. package/dist/lib/filter/index.js.map +1 -1
  25. package/dist/lib/group_by.d.ts +1 -1
  26. package/dist/lib/group_by.js.map +1 -1
  27. package/dist/lib/keep_alive_manager.d.ts +17 -0
  28. package/dist/lib/keep_alive_manager.js +62 -0
  29. package/dist/lib/keep_alive_manager.js.map +1 -0
  30. package/dist/lib/light_push/index.d.ts +3 -19
  31. package/dist/lib/light_push/index.js +13 -39
  32. package/dist/lib/light_push/index.js.map +1 -1
  33. package/dist/lib/light_push/push_rpc.d.ts +5 -5
  34. package/dist/lib/light_push/push_rpc.js +6 -6
  35. package/dist/lib/message/topic_only_message.d.ts +5 -3
  36. package/dist/lib/message/topic_only_message.js +8 -5
  37. package/dist/lib/message/topic_only_message.js.map +1 -1
  38. package/dist/lib/message/version_0.d.ts +12 -12
  39. package/dist/lib/message/version_0.js +29 -30
  40. package/dist/lib/message/version_0.js.map +1 -1
  41. package/dist/lib/predefined_bootstrap_nodes.js +1 -1
  42. package/dist/lib/predefined_bootstrap_nodes.js.map +1 -1
  43. package/dist/lib/relay/index.d.ts +4 -18
  44. package/dist/lib/relay/index.js +47 -26
  45. package/dist/lib/relay/index.js.map +1 -1
  46. package/dist/lib/relay/message_validator.d.ts +4 -0
  47. package/dist/lib/relay/message_validator.js +25 -0
  48. package/dist/lib/relay/message_validator.js.map +1 -0
  49. package/dist/lib/store/history_rpc.d.ts +4 -4
  50. package/dist/lib/store/history_rpc.js +9 -9
  51. package/dist/lib/store/history_rpc.js.map +1 -1
  52. package/dist/lib/store/index.d.ts +4 -25
  53. package/dist/lib/store/index.js +20 -37
  54. package/dist/lib/store/index.js.map +1 -1
  55. package/dist/lib/to_proto_message.js +3 -2
  56. package/dist/lib/to_proto_message.js.map +1 -1
  57. package/dist/lib/wait_for_remote_peer.js +12 -23
  58. package/dist/lib/wait_for_remote_peer.js.map +1 -1
  59. package/dist/lib/waku.d.ts +8 -15
  60. package/dist/lib/waku.js +34 -97
  61. package/dist/lib/waku.js.map +1 -1
  62. package/package.json +50 -61
  63. package/src/index.ts +11 -3
  64. package/src/lib/base_protocol.ts +47 -0
  65. package/src/lib/connection_manager.ts +220 -0
  66. package/src/lib/filter/filter_rpc.ts +10 -10
  67. package/src/lib/filter/index.ts +52 -147
  68. package/src/lib/group_by.ts +1 -1
  69. package/src/lib/keep_alive_manager.ts +89 -0
  70. package/src/lib/light_push/index.ts +17 -78
  71. package/src/lib/light_push/push_rpc.ts +9 -9
  72. package/src/lib/message/topic_only_message.ts +11 -5
  73. package/src/lib/message/version_0.ts +42 -37
  74. package/src/lib/predefined_bootstrap_nodes.ts +1 -1
  75. package/src/lib/relay/index.ts +77 -52
  76. package/src/lib/relay/message_validator.ts +35 -0
  77. package/src/lib/store/history_rpc.ts +12 -12
  78. package/src/lib/store/index.ts +30 -84
  79. package/src/lib/to_proto_message.ts +3 -2
  80. package/src/lib/wait_for_remote_peer.ts +13 -29
  81. package/src/lib/waku.ts +54 -136
  82. package/bundle/peer_exchange-df95c3a7.js +0 -11801
  83. package/dist/lib/random_subset.d.ts +0 -4
  84. package/dist/lib/random_subset.js +0 -25
  85. package/dist/lib/random_subset.js.map +0 -1
  86. package/src/lib/random_subset.ts +0 -30
package/CHANGELOG.md CHANGED
@@ -2,11 +2,76 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ The file is maintained by [Release Please](https://github.com/googleapis/release-please) based on [Conventional Commits](https://www.conventionalcommits.org) specification,
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.11](https://github.com/waku-org/js-waku/compare/core-v0.0.10...core-v0.0.11) (2023-03-16)
9
+
10
+
11
+ ### ⚠ BREAKING CHANGES
12
+
13
+ * add custom events to Relay and make observers private ([#1213](https://github.com/waku-org/js-waku/issues/1213))
14
+ * add exports map to @waku/utils ([#1201](https://github.com/waku-org/js-waku/issues/1201))
15
+ * enable encoding of `meta` field
16
+ * expose pubsub topic in `IDecodedMessage`
17
+ * update store.proto
18
+ * update message.proto: payload and content topic are always defined
19
+ * ConnectionManager and KeepAliveManager ([#1135](https://github.com/waku-org/js-waku/issues/1135))
20
+ * bump typescript
21
+ * bump all prod dependencies
22
+ * bump libp2p dependencies
23
+
24
+ ### Features
25
+
26
+ * Add custom events to Relay and make observers private ([#1213](https://github.com/waku-org/js-waku/issues/1213)) ([275b166](https://github.com/waku-org/js-waku/commit/275b16641e620956a5f8ebbb3a8c4156149d489e))
27
+ * Codec as a property of the protocol implementations ([a5ff788](https://github.com/waku-org/js-waku/commit/a5ff788eed419556e11319f22ca9e3109c81df92))
28
+ * ConnectionManager and KeepAliveManager ([#1135](https://github.com/waku-org/js-waku/issues/1135)) ([24c24cc](https://github.com/waku-org/js-waku/commit/24c24cc27d83ec12de45ef3cf3d00f6eb817e4ca))
29
+ * Enable encoding of `meta` field ([bd983ea](https://github.com/waku-org/js-waku/commit/bd983ea48ee73fda5a7137d5ef681965aeabb4a5))
30
+ * Export `Decoder`, `Encoder` and `DecodedMessage` types from root ([da1b18d](https://github.com/waku-org/js-waku/commit/da1b18d9956259af4cb2e6f7c1f06de52b6ec3ac)), closes [#1010](https://github.com/waku-org/js-waku/issues/1010)
31
+ * Expose pubsub topic in `IDecodedMessage` ([628ac50](https://github.com/waku-org/js-waku/commit/628ac50d7104ec3c1dff44db58077a85db6b6aa1)), closes [#1208](https://github.com/waku-org/js-waku/issues/1208)
32
+ * **relay:** Validate waku message at gossip layer ([9684737](https://github.com/waku-org/js-waku/commit/96847374d6c61f3372a16185d9fff93e582505bb))
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * Add payload to relay ping messages to avoid poor relay peer scoring ([560c393](https://github.com/waku-org/js-waku/commit/560c39366259f9902cac7f2afd0d301c49e13f4c))
38
+ * Prettier and cspell ignore CHANGELOG ([#1235](https://github.com/waku-org/js-waku/issues/1235)) ([4d7b3e3](https://github.com/waku-org/js-waku/commit/4d7b3e39e6761afaf5d05a13cc4b3c23e15f9bd5))
39
+ * Remove initialising peer-exchange while creating a node ([#1158](https://github.com/waku-org/js-waku/issues/1158)) ([1b41569](https://github.com/waku-org/js-waku/commit/1b4156902387ea35b24b3d6f5d22e4635ea8cf18))
40
+
41
+
42
+ ### Miscellaneous Chores
43
+
44
+ * Add exports map to @waku/utils ([#1201](https://github.com/waku-org/js-waku/issues/1201)) ([a30b2bd](https://github.com/waku-org/js-waku/commit/a30b2bd747dedeef69b46cfafb88898ba35d8f67))
45
+ * Bump all prod dependencies ([88cc76d](https://github.com/waku-org/js-waku/commit/88cc76d2b811e1fa4460207f38704ecfe18fb260))
46
+ * Bump libp2p dependencies ([803ae7b](https://github.com/waku-org/js-waku/commit/803ae7bd8ed3de665026446c23cde90e7eba9d36))
47
+ * Bump typescript ([12d86e6](https://github.com/waku-org/js-waku/commit/12d86e6abcc68e27c39ca86b4f0dc2b68cdd6000))
48
+ * Update message.proto: payload and content topic are always defined ([5cf8ed2](https://github.com/waku-org/js-waku/commit/5cf8ed2030c9efbc4c4b66aa801827482c1e4249))
49
+ * Update store.proto ([967e6ff](https://github.com/waku-org/js-waku/commit/967e6ffc7ec6f780094e29599c47b723fa222dcc))
50
+
51
+
52
+ ### Dependencies
53
+
54
+ * The following workspace dependencies were updated
55
+ * dependencies
56
+ * @waku/interfaces bumped from * to 0.0.8
57
+ * @waku/proto bumped from * to 0.0.3
58
+ * @waku/utils bumped from * to 0.0.2
59
+
8
60
  ## [Unreleased]
9
61
 
62
+ ### Added
63
+
64
+ - `multicodec` property from protocol interfaces.
65
+
66
+ ### Removed
67
+
68
+ - Dependency on `@waku/peer-exchange`.
69
+
70
+ ### Changed
71
+
72
+ - `Filter`, `LightPush` and `Store` classes now takes in `options` of type `ProtocolCreateOptions` as the second argument, instead of `pubSubTopic`
73
+ - `Relay` class now takes in `options` of type `Partial<RealyCreateOptions>` as the second argument, instead of `pubSubTopic`
74
+
10
75
  ## [@waku/core@0.0.10] - 2023-01-25
11
76
 
12
77
  ### Changed