@waku/message-encryption 0.0.24-7eb3375.0 → 0.0.24
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 +31 -0
- package/bundle/crypto.js +1 -1
- package/bundle/{ecies-137fdfde.js → ecies-R65pUoo3.js} +6 -6
- package/bundle/ecies.js +3 -3
- package/bundle/encryption-zFGfcjHZ.js +6356 -0
- package/bundle/{index-268375db.js → index-alzPvot7.js} +1 -1
- package/bundle/index.js +5 -5
- package/bundle/{symmetric-d25c7b7a.js → symmetric-7aAyizy_.js} +6 -6
- package/bundle/{symmetric-58d457ca.js → symmetric-CXVjdTdV.js} +7 -28
- package/bundle/symmetric.js +3 -3
- package/dist/.tsbuildinfo +1 -1
- package/dist/crypto/ecies.js.map +1 -1
- package/dist/crypto/utils.js.map +1 -1
- package/dist/decoded_message.d.ts +6 -0
- package/dist/decoded_message.js +12 -0
- package/dist/decoded_message.js.map +1 -1
- package/dist/ecies.d.ts +7 -3
- package/dist/ecies.js +6 -6
- package/dist/ecies.js.map +1 -1
- package/dist/encryption.js.map +1 -1
- package/dist/symmetric.d.ts +3 -3
- package/dist/symmetric.js +6 -6
- package/dist/symmetric.js.map +1 -1
- package/package.json +112 -1
- package/src/decoded_message.ts +13 -0
- package/src/ecies.ts +24 -14
- package/src/symmetric.ts +19 -13
- package/bundle/encryption-d94ff773.js +0 -21078
package/CHANGELOG.md
CHANGED
@@ -68,6 +68,37 @@ 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
|
+
## [0.0.24](https://github.com/waku-org/js-waku/compare/message-encryption-v0.0.23...message-encryption-v0.0.24) (2024-01-10)
|
72
|
+
|
73
|
+
|
74
|
+
### ⚠ BREAKING CHANGES
|
75
|
+
|
76
|
+
* add support for sharded pubsub topics & remove support for named pubsub topics ([#1697](https://github.com/waku-org/js-waku/issues/1697))
|
77
|
+
* export crypto primitives ([#1728](https://github.com/waku-org/js-waku/issues/1728))
|
78
|
+
* change all instances of `PubSubTopic` to `PubsubTopic` ([#1703](https://github.com/waku-org/js-waku/issues/1703))
|
79
|
+
|
80
|
+
### Features
|
81
|
+
|
82
|
+
* Add support for autosharded pubsub topics ([2bc3735](https://github.com/waku-org/js-waku/commit/2bc3735e4dcf85f06b3dee542024d7f20a40fac2))
|
83
|
+
* 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))
|
84
|
+
* Export crypto primitives ([#1728](https://github.com/waku-org/js-waku/issues/1728)) ([7eb3375](https://github.com/waku-org/js-waku/commit/7eb3375f50265240096d70bd2814549c8156a0eb))
|
85
|
+
* New `verifySignature` ([2f67a3b](https://github.com/waku-org/js-waku/commit/2f67a3baffc085d61b057f9fdb5ab404bfd70a1b))
|
86
|
+
|
87
|
+
|
88
|
+
### Miscellaneous Chores
|
89
|
+
|
90
|
+
* 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))
|
91
|
+
|
92
|
+
|
93
|
+
### Dependencies
|
94
|
+
|
95
|
+
* The following workspace dependencies were updated
|
96
|
+
* dependencies
|
97
|
+
* @waku/core bumped from 0.0.25 to 0.0.26
|
98
|
+
* @waku/interfaces bumped from 0.0.20 to 0.0.21
|
99
|
+
* @waku/proto bumped from 0.0.5 to 0.0.6
|
100
|
+
* @waku/utils bumped from 0.0.13 to 0.0.14
|
101
|
+
|
71
102
|
## [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
103
|
|
73
104
|
|
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-
|
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-CXVjdTdV.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,
|
2
|
-
import { V as Version, O as OneMillion, g as generatePrivateKey } from './symmetric-
|
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-zFGfcjHZ.js';
|
2
|
+
import { V as Version, O as OneMillion, g as generatePrivateKey } from './symmetric-CXVjdTdV.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
|
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,
|
110
|
-
return new Decoder(
|
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 {
|
2
|
-
export { g as generatePrivateKey } from './symmetric-
|
3
|
-
export { a as createDecoder, c as createEncoder } from './ecies-
|
1
|
+
export { b as decryptAsymmetric, e as encryptAsymmetric, c as postCipher, p as preCipher } from './encryption-zFGfcjHZ.js';
|
2
|
+
export { g as generatePrivateKey } from './symmetric-CXVjdTdV.js';
|
3
|
+
export { a as createDecoder, c as createEncoder } from './ecies-R65pUoo3.js';
|