@waku/message-encryption 0.0.24-7eb3375.0 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -68,6 +68,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
68
68
  * @waku/interfaces bumped from 0.0.17 to 0.0.18
69
69
  * @waku/utils bumped from 0.0.10 to 0.0.11
70
70
 
71
+ ### Dependencies
72
+
73
+ * The following workspace dependencies were updated
74
+ * dependencies
75
+ * @waku/core bumped from 0.0.26 to 0.0.27
76
+ * @waku/interfaces bumped from 0.0.21 to 0.0.22
77
+ * @waku/utils bumped from 0.0.14 to 0.0.15
78
+
79
+ ## [0.0.24](https://github.com/waku-org/js-waku/compare/message-encryption-v0.0.23...message-encryption-v0.0.24) (2024-01-10)
80
+
81
+
82
+ ### ⚠ BREAKING CHANGES
83
+
84
+ * add support for sharded pubsub topics & remove support for named pubsub topics ([#1697](https://github.com/waku-org/js-waku/issues/1697))
85
+ * export crypto primitives ([#1728](https://github.com/waku-org/js-waku/issues/1728))
86
+ * change all instances of `PubSubTopic` to `PubsubTopic` ([#1703](https://github.com/waku-org/js-waku/issues/1703))
87
+
88
+ ### Features
89
+
90
+ * Add support for autosharded pubsub topics ([2bc3735](https://github.com/waku-org/js-waku/commit/2bc3735e4dcf85f06b3dee542024d7f20a40fac2))
91
+ * Add support for sharded pubsub topics & remove support for named pubsub topics ([#1697](https://github.com/waku-org/js-waku/issues/1697)) ([4cf2ffe](https://github.com/waku-org/js-waku/commit/4cf2ffefa75e0571805036b71644d2cdd4fe3192))
92
+ * Export crypto primitives ([#1728](https://github.com/waku-org/js-waku/issues/1728)) ([7eb3375](https://github.com/waku-org/js-waku/commit/7eb3375f50265240096d70bd2814549c8156a0eb))
93
+ * New `verifySignature` ([2f67a3b](https://github.com/waku-org/js-waku/commit/2f67a3baffc085d61b057f9fdb5ab404bfd70a1b))
94
+
95
+
96
+ ### Miscellaneous Chores
97
+
98
+ * Change all instances of `PubSubTopic` to `PubsubTopic` ([#1703](https://github.com/waku-org/js-waku/issues/1703)) ([3166a51](https://github.com/waku-org/js-waku/commit/3166a5135e77583da4fa722ee2aa47c785854a38))
99
+
100
+
101
+ ### Dependencies
102
+
103
+ * The following workspace dependencies were updated
104
+ * dependencies
105
+ * @waku/core bumped from 0.0.25 to 0.0.26
106
+ * @waku/interfaces bumped from 0.0.20 to 0.0.21
107
+ * @waku/proto bumped from 0.0.5 to 0.0.6
108
+ * @waku/utils bumped from 0.0.13 to 0.0.14
109
+
71
110
  ## [0.0.23](https://github.com/waku-org/js-waku/compare/message-encryption-v0.0.22...message-encryption-v0.0.23) (2023-11-01)
72
111
 
73
112
 
package/bundle/crypto.js CHANGED
@@ -1 +1 @@
1
- export { e as ecies, g as generatePrivateKey, a as generateSymmetricKey, b as getPublicKey, c as getSubtle, k as keccak256, r as randomBytes, s as sha256, d as sign, f as symmetric } from './symmetric-58d457ca.js';
1
+ export { e as ecies, g as generatePrivateKey, a as generateSymmetricKey, b as getPublicKey, c as getSubtle, k as keccak256, r as randomBytes, s as sha256, d as sign, f as symmetric } from './symmetric-Cd3XbaRu.js';
@@ -1,5 +1,5 @@
1
- import { L as Logger, D as DefaultPubsubTopic, W as WakuMessage, p as preCipher, e as encryptAsymmetric, a as Decoder$1, d as decryptAsymmetric, b as postCipher, c as DecodedMessage } from './encryption-d94ff773.js';
2
- import { V as Version, O as OneMillion, g as generatePrivateKey } from './symmetric-58d457ca.js';
1
+ import { L as Logger, d as determinePubsubTopic, D as DefaultPubsubTopic, W as WakuMessage, p as preCipher, e as encryptAsymmetric, a as Decoder$1, b as decryptAsymmetric, c as postCipher, f as DecodedMessage } from './encryption-Cjy0BsYx.js';
2
+ import { V as Version, O as OneMillion, g as generatePrivateKey } from './symmetric-Cd3XbaRu.js';
3
3
 
4
4
  const log = new Logger("message-encryption:ecies");
5
5
  class Encoder {
@@ -58,8 +58,8 @@ class Encoder {
58
58
  * The payload can optionally be signed with the given private key as defined
59
59
  * in [26/WAKU2-PAYLOAD](https://rfc.vac.dev/spec/26/).
60
60
  */
61
- function createEncoder({ pubsubTopic = DefaultPubsubTopic, contentTopic, publicKey, sigPrivKey, ephemeral = false, metaSetter }) {
62
- return new Encoder(pubsubTopic, contentTopic, publicKey, sigPrivKey, ephemeral, metaSetter);
61
+ function createEncoder({ pubsubTopic, pubsubTopicShardInfo, contentTopic, publicKey, sigPrivKey, ephemeral = false, metaSetter }) {
62
+ return new Encoder(determinePubsubTopic(contentTopic, pubsubTopic ?? pubsubTopicShardInfo), contentTopic, publicKey, sigPrivKey, ephemeral, metaSetter);
63
63
  }
64
64
  class Decoder extends Decoder$1 {
65
65
  privateKey;
@@ -106,8 +106,8 @@ class Decoder extends Decoder$1 {
106
106
  * @param contentTopic The resulting decoder will only decode messages with this content topic.
107
107
  * @param privateKey The private key used to decrypt the message.
108
108
  */
109
- function createDecoder(contentTopic, privateKey, pubsubTopic = DefaultPubsubTopic) {
110
- return new Decoder(pubsubTopic, contentTopic, privateKey);
109
+ function createDecoder(contentTopic, privateKey, pubsubTopicShardInfo = DefaultPubsubTopic) {
110
+ return new Decoder(determinePubsubTopic(contentTopic, pubsubTopicShardInfo), contentTopic, privateKey);
111
111
  }
112
112
 
113
113
  var ecies = /*#__PURE__*/Object.freeze({
package/bundle/ecies.js CHANGED
@@ -1,3 +1,3 @@
1
- export { d as decryptAsymmetric, e as encryptAsymmetric, b as postCipher, p as preCipher } from './encryption-d94ff773.js';
2
- export { g as generatePrivateKey } from './symmetric-58d457ca.js';
3
- export { a as createDecoder, c as createEncoder } from './ecies-137fdfde.js';
1
+ export { b as decryptAsymmetric, e as encryptAsymmetric, c as postCipher, p as preCipher } from './encryption-Cjy0BsYx.js';
2
+ export { g as generatePrivateKey } from './symmetric-Cd3XbaRu.js';
3
+ export { a as createDecoder, c as createEncoder } from './ecies-CL5AR7HZ.js';