@waku/message-encryption 0.0.5 → 0.0.7
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 +15 -1
- package/bundle/ecies.js +1 -1
- package/bundle/{index-80756c1f.js → index-1b28e2e5.js} +2 -2
- package/bundle/index.js +1 -1
- package/bundle/symmetric.js +1 -1
- package/dist/ecies.js +3 -2
- package/dist/ecies.js.map +1 -1
- package/dist/symmetric.js +3 -2
- package/dist/symmetric.js.map +1 -1
- package/package.json +14 -4
- package/src/ecies.ts +3 -2
- package/src/symmetric.ts +3 -2
package/CHANGELOG.md
CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.0.7] - 2022-12-19
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Incorrect `proto` import.
|
15
|
+
|
16
|
+
## [0.0.6] - 2022-12-16
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- Type resolution when using `moduleResolution: node`.
|
21
|
+
|
10
22
|
## [0.0.5] - 2022-12-15
|
11
23
|
|
12
24
|
### Added
|
@@ -28,7 +40,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
28
40
|
|
29
41
|
- Alpha version of `@waku/message-encryption`.
|
30
42
|
|
31
|
-
[unreleased]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.
|
43
|
+
[unreleased]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.7...HEAD
|
44
|
+
[0.0.7]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.6...@waku/message-encryption@0.0.7
|
45
|
+
[0.0.6]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.5...@waku/message-encryption@0.0.6
|
32
46
|
[0.0.5]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.4...@waku/message-encryption@0.0.5
|
33
47
|
[0.0.4]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.3...@waku/message-encryption@0.0.4
|
34
48
|
[0.0.3]: https://github.com/waku-org/js-waku/compare/@waku/message-encryption@0.0.2...%40waku/message-encryption@0.0.3
|
package/bundle/ecies.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { D as DecodedMessage, b as createDecoder, c as createEncoder, g as generatePrivateKey, a as getPublicKey } from './index-
|
1
|
+
export { D as DecodedMessage, b as createDecoder, c as createEncoder, g as generatePrivateKey, a as getPublicKey } from './index-1b28e2e5.js';
|
@@ -15047,7 +15047,7 @@ class Encoder$1 {
|
|
15047
15047
|
const protoMessage = await this.toProtoObj(message);
|
15048
15048
|
if (!protoMessage)
|
15049
15049
|
return;
|
15050
|
-
return WakuMessage$
|
15050
|
+
return WakuMessage$2.encode(protoMessage);
|
15051
15051
|
}
|
15052
15052
|
async toProtoObj(message) {
|
15053
15053
|
const timestamp = message.timestamp ?? new Date();
|
@@ -15162,7 +15162,7 @@ class Encoder {
|
|
15162
15162
|
const protoMessage = await this.toProtoObj(message);
|
15163
15163
|
if (!protoMessage)
|
15164
15164
|
return;
|
15165
|
-
return WakuMessage$
|
15165
|
+
return WakuMessage$2.encode(protoMessage);
|
15166
15166
|
}
|
15167
15167
|
async toProtoObj(message) {
|
15168
15168
|
const timestamp = message.timestamp ?? new Date();
|
package/bundle/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { D as DecodedMessage, O as OneMillion, V as Version, h as ecies, g as generatePrivateKey, d as generateSymmetricKey, a as getPublicKey, s as symmetric } from './index-
|
1
|
+
export { D as DecodedMessage, O as OneMillion, V as Version, h as ecies, g as generatePrivateKey, d as generateSymmetricKey, a as getPublicKey, s as symmetric } from './index-1b28e2e5.js';
|
package/bundle/symmetric.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { D as DecodedMessage, f as createDecoder, e as createEncoder, d as generateSymmetricKey } from './index-
|
1
|
+
export { D as DecodedMessage, f as createDecoder, e as createEncoder, d as generateSymmetricKey } from './index-1b28e2e5.js';
|
package/dist/ecies.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { Decoder as DecoderV0
|
1
|
+
import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0";
|
2
|
+
import { WakuMessage } from "@waku/proto";
|
2
3
|
import debug from "debug";
|
3
4
|
import { decryptAsymmetric, encryptAsymmetric, postCipher, preCipher, } from "./waku_payload.js";
|
4
5
|
import { DecodedMessage, generatePrivateKey, getPublicKey, OneMillion, Version, } from "./index.js";
|
@@ -15,7 +16,7 @@ class Encoder {
|
|
15
16
|
const protoMessage = await this.toProtoObj(message);
|
16
17
|
if (!protoMessage)
|
17
18
|
return;
|
18
|
-
return
|
19
|
+
return WakuMessage.encode(protoMessage);
|
19
20
|
}
|
20
21
|
async toProtoObj(message) {
|
21
22
|
const timestamp = message.timestamp ?? new Date();
|
package/dist/ecies.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ecies.js","sourceRoot":"","sources":["../src/ecies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"ecies.js","sourceRoot":"","sources":["../src/ecies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAOxE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC;AAE5D,MAAM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EACX,GAAG,CAAC,GAAG,EAAE,SAAS,EAClB,GAAG,CAAC,GAAG,EAAE,SAAS,CACnB,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAC3B,YAAoB,EACpB,UAAsB;IAEtB,OAAO,IAAI,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/symmetric.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { Decoder as DecoderV0
|
1
|
+
import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0";
|
2
|
+
import { WakuMessage } from "@waku/proto";
|
2
3
|
import debug from "debug";
|
3
4
|
import { decryptSymmetric, encryptSymmetric, postCipher, preCipher, } from "./waku_payload.js";
|
4
5
|
import { DecodedMessage, generateSymmetricKey, OneMillion, Version, } from "./index.js";
|
@@ -15,7 +16,7 @@ class Encoder {
|
|
15
16
|
const protoMessage = await this.toProtoObj(message);
|
16
17
|
if (!protoMessage)
|
17
18
|
return;
|
18
|
-
return
|
19
|
+
return WakuMessage.encode(protoMessage);
|
19
20
|
}
|
20
21
|
async toProtoObj(message) {
|
21
22
|
const timestamp = message.timestamp ?? new Date();
|
package/dist/symmetric.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"symmetric.js","sourceRoot":"","sources":["../src/symmetric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"symmetric.js","sourceRoot":"","sources":["../src/symmetric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAOxE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE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AAE,CAAC,CAAC;YACtE,OAAO;SACR;QAED,GAAG,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;QACvC,OAAO,IAAI,cAAc,CACvB,YAAY,EACZ,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,GAAG,EAAE,SAAS,EAClB,GAAG,CAAC,GAAG,EAAE,SAAS,CACnB,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAC3B,YAAoB,EACpB,MAAkB;IAElB,OAAO,IAAI,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@waku/message-encryption",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.7",
|
4
4
|
"description": "Waku Message Payload Encryption",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"module": "./dist/index.js",
|
@@ -18,6 +18,15 @@
|
|
18
18
|
"import": "./dist/symmetric.js"
|
19
19
|
}
|
20
20
|
},
|
21
|
+
"typesVersions": {
|
22
|
+
"*": {
|
23
|
+
"*": [
|
24
|
+
"*",
|
25
|
+
"dist/*",
|
26
|
+
"dist/*/index"
|
27
|
+
]
|
28
|
+
}
|
29
|
+
},
|
21
30
|
"type": "module",
|
22
31
|
"author": "Waku Team",
|
23
32
|
"homepage": "https://github.com/waku-org/js-waku/tree/master/packages/message-encryption#readme",
|
@@ -66,12 +75,12 @@
|
|
66
75
|
"dependencies": {
|
67
76
|
"@noble/secp256k1": "^1.3.4",
|
68
77
|
"@waku/byte-utils": "*",
|
78
|
+
"@waku/core": "*",
|
69
79
|
"@waku/interfaces": "*",
|
70
|
-
"
|
71
|
-
"
|
80
|
+
"@waku/proto": "*",
|
81
|
+
"js-sha3": "^0.8.0"
|
72
82
|
},
|
73
83
|
"devDependencies": {
|
74
|
-
"fast-check": "^2.14.0",
|
75
84
|
"@rollup/plugin-commonjs": "^22.0.0",
|
76
85
|
"@rollup/plugin-json": "^4.1.0",
|
77
86
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
@@ -85,6 +94,7 @@
|
|
85
94
|
"eslint-plugin-functional": "^4.0.2",
|
86
95
|
"eslint-plugin-import": "^2.25.3",
|
87
96
|
"eslint-plugin-prettier": "^4.0.0",
|
97
|
+
"fast-check": "^2.14.0",
|
88
98
|
"npm-run-all": "^4.1.5",
|
89
99
|
"prettier": "^2.1.1",
|
90
100
|
"rollup": "^2.75.0",
|
package/src/ecies.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Decoder as DecoderV0
|
1
|
+
import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0";
|
2
2
|
import type {
|
3
3
|
IDecoder,
|
4
4
|
IEncoder,
|
5
5
|
IMessage,
|
6
6
|
IProtoMessage,
|
7
7
|
} from "@waku/interfaces";
|
8
|
+
import { WakuMessage } from "@waku/proto";
|
8
9
|
import debug from "debug";
|
9
10
|
|
10
11
|
import {
|
@@ -38,7 +39,7 @@ class Encoder implements IEncoder {
|
|
38
39
|
const protoMessage = await this.toProtoObj(message);
|
39
40
|
if (!protoMessage) return;
|
40
41
|
|
41
|
-
return
|
42
|
+
return WakuMessage.encode(protoMessage);
|
42
43
|
}
|
43
44
|
|
44
45
|
async toProtoObj(message: IMessage): Promise<IProtoMessage | undefined> {
|
package/src/symmetric.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Decoder as DecoderV0
|
1
|
+
import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0";
|
2
2
|
import type {
|
3
3
|
IDecoder,
|
4
4
|
IEncoder,
|
5
5
|
IMessage,
|
6
6
|
IProtoMessage,
|
7
7
|
} from "@waku/interfaces";
|
8
|
+
import { WakuMessage } from "@waku/proto";
|
8
9
|
import debug from "debug";
|
9
10
|
|
10
11
|
import {
|
@@ -37,7 +38,7 @@ class Encoder implements IEncoder {
|
|
37
38
|
const protoMessage = await this.toProtoObj(message);
|
38
39
|
if (!protoMessage) return;
|
39
40
|
|
40
|
-
return
|
41
|
+
return WakuMessage.encode(protoMessage);
|
41
42
|
}
|
42
43
|
|
43
44
|
async toProtoObj(message: IMessage): Promise<IProtoMessage | undefined> {
|