mirror of https://github.com/waku-org/js-waku.git
fix: incorrect `proto` import
This commit is contained in:
parent
e292855742
commit
75c8e2be8d
|
@ -27397,6 +27397,7 @@
|
|||
"@waku/byte-utils": "*",
|
||||
"@waku/core": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"@waku/proto": "*",
|
||||
"js-sha3": "^0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -31449,6 +31450,7 @@
|
|||
"@waku/byte-utils": "*",
|
||||
"@waku/core": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"@waku/proto": "*",
|
||||
"chai": "^4.3.6",
|
||||
"cspell": "^6.17.0",
|
||||
"eslint": "^8.6.0",
|
||||
|
|
|
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
|
||||
- Type resolution when using `moduleResolution: node`.
|
||||
- Incorrect `proto` import.
|
||||
|
||||
## [0.0.5] - 2022-12-15
|
||||
|
||||
|
|
|
@ -75,12 +75,12 @@
|
|||
"dependencies": {
|
||||
"@noble/secp256k1": "^1.3.4",
|
||||
"@waku/byte-utils": "*",
|
||||
"@waku/core": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"js-sha3": "^0.8.0",
|
||||
"@waku/core": "*"
|
||||
"@waku/proto": "*",
|
||||
"js-sha3": "^0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"fast-check": "^2.14.0",
|
||||
"@rollup/plugin-commonjs": "^22.0.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||
|
@ -94,6 +94,7 @@
|
|||
"eslint-plugin-functional": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"fast-check": "^2.14.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.1.1",
|
||||
"rollup": "^2.75.0",
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { Decoder as DecoderV0, proto } from "@waku/core/lib/message/version_0";
|
||||
import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0";
|
||||
import type {
|
||||
IDecoder,
|
||||
IEncoder,
|
||||
IMessage,
|
||||
IProtoMessage,
|
||||
} from "@waku/interfaces";
|
||||
import { WakuMessage } from "@waku/proto";
|
||||
import debug from "debug";
|
||||
|
||||
import {
|
||||
|
@ -38,7 +39,7 @@ class Encoder implements IEncoder {
|
|||
const protoMessage = await this.toProtoObj(message);
|
||||
if (!protoMessage) return;
|
||||
|
||||
return proto.WakuMessage.encode(protoMessage);
|
||||
return WakuMessage.encode(protoMessage);
|
||||
}
|
||||
|
||||
async toProtoObj(message: IMessage): Promise<IProtoMessage | undefined> {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { Decoder as DecoderV0, proto } from "@waku/core/lib/message/version_0";
|
||||
import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0";
|
||||
import type {
|
||||
IDecoder,
|
||||
IEncoder,
|
||||
IMessage,
|
||||
IProtoMessage,
|
||||
} from "@waku/interfaces";
|
||||
import { WakuMessage } from "@waku/proto";
|
||||
import debug from "debug";
|
||||
|
||||
import {
|
||||
|
@ -37,7 +38,7 @@ class Encoder implements IEncoder {
|
|||
const protoMessage = await this.toProtoObj(message);
|
||||
if (!protoMessage) return;
|
||||
|
||||
return proto.WakuMessage.encode(protoMessage);
|
||||
return WakuMessage.encode(protoMessage);
|
||||
}
|
||||
|
||||
async toProtoObj(message: IMessage): Promise<IProtoMessage | undefined> {
|
||||
|
|
Loading…
Reference in New Issue