mirror of https://github.com/waku-org/js-waku.git
chore: fix tests
This commit is contained in:
parent
e6efd0438c
commit
1a09aa18d5
|
@ -22949,7 +22949,8 @@
|
|||
"@waku/core": "*",
|
||||
"@waku/create": "*",
|
||||
"@waku/enr": "*",
|
||||
"@waku/interfaces": "*"
|
||||
"@waku/interfaces": "*",
|
||||
"@waku/message-encryption": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
|
@ -27702,6 +27703,7 @@
|
|||
"@waku/create": "*",
|
||||
"@waku/enr": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"@waku/message-encryption": "*",
|
||||
"cspell": "^5.14.0",
|
||||
"eslint": "^8.6.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
|
|
|
@ -9,7 +9,14 @@ import type { Decoder, Encoder, Message, ProtoMessage } from "@waku/interfaces";
|
|||
import debug from "debug";
|
||||
|
||||
import { Symmetric } from "./constants.js";
|
||||
import { keccak256, randomBytes, sign } from "./crypto.js";
|
||||
import {
|
||||
generatePrivateKey,
|
||||
generateSymmetricKey,
|
||||
getPublicKey,
|
||||
keccak256,
|
||||
randomBytes,
|
||||
sign,
|
||||
} from "./crypto.js";
|
||||
import * as ecies from "./ecies.js";
|
||||
import * as symmetric from "./symmetric.js";
|
||||
|
||||
|
@ -22,6 +29,8 @@ const PaddingTarget = 256;
|
|||
const SignatureLength = 65;
|
||||
const OneMillion = BigInt(1_000_000);
|
||||
|
||||
export { generatePrivateKey, generateSymmetricKey, getPublicKey };
|
||||
|
||||
export const Version = 1;
|
||||
|
||||
export type Signature = {
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
"@waku/enr": "*",
|
||||
"@waku/create": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"@waku/byte-utils": "*"
|
||||
"@waku/byte-utils": "*",
|
||||
"@waku/message-encryption": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
import { PeerId } from "@libp2p/interface-peer-id";
|
||||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import {
|
||||
DefaultPubSubTopic,
|
||||
generatePrivateKey,
|
||||
generateSymmetricKey,
|
||||
getPublicKey,
|
||||
} from "@waku/core";
|
||||
import { DefaultPubSubTopic } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import {
|
||||
DecoderV0,
|
||||
EncoderV0,
|
||||
MessageV0,
|
||||
} from "@waku/core/lib/waku_message/version_0";
|
||||
import {
|
||||
AsymDecoder,
|
||||
AsymEncoder,
|
||||
SymDecoder,
|
||||
SymEncoder,
|
||||
} from "@waku/core/lib/waku_message/version_1";
|
||||
import { createPrivacyNode } from "@waku/create";
|
||||
import type { Message, WakuPrivacy } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
import {
|
||||
AsymDecoder,
|
||||
AsymEncoder,
|
||||
generatePrivateKey,
|
||||
generateSymmetricKey,
|
||||
getPublicKey,
|
||||
SymDecoder,
|
||||
SymEncoder,
|
||||
} from "@waku/message-encryption";
|
||||
import { expect } from "chai";
|
||||
import debug from "debug";
|
||||
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import {
|
||||
generatePrivateKey,
|
||||
generateSymmetricKey,
|
||||
getPublicKey,
|
||||
} from "@waku/core";
|
||||
import { PageDirection } from "@waku/core";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import { DecoderV0, EncoderV0 } from "@waku/core/lib/waku_message/version_0";
|
||||
import {
|
||||
AsymDecoder,
|
||||
AsymEncoder,
|
||||
SymDecoder,
|
||||
SymEncoder,
|
||||
} from "@waku/core/lib/waku_message/version_1";
|
||||
import { createFullNode } from "@waku/create";
|
||||
import type { Message, WakuFull } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
import {
|
||||
AsymDecoder,
|
||||
AsymEncoder,
|
||||
generatePrivateKey,
|
||||
generateSymmetricKey,
|
||||
getPublicKey,
|
||||
SymDecoder,
|
||||
SymEncoder,
|
||||
} from "@waku/message-encryption";
|
||||
import { expect } from "chai";
|
||||
import debug from "debug";
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
import type { PeerId } from "@libp2p/interface-peer-id";
|
||||
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
|
||||
import { generateSymmetricKey } from "@waku/core";
|
||||
import { PeerDiscoveryStaticPeers } from "@waku/core/lib/peer_discovery_static_list";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import { SymDecoder, SymEncoder } from "@waku/core/lib/waku_message/version_1";
|
||||
import { createLightNode, createPrivacyNode } from "@waku/create";
|
||||
import type { Message, Waku, WakuLight, WakuPrivacy } from "@waku/interfaces";
|
||||
import { Protocols } from "@waku/interfaces";
|
||||
import {
|
||||
generateSymmetricKey,
|
||||
SymDecoder,
|
||||
SymEncoder,
|
||||
} from "@waku/message-encryption";
|
||||
import { expect } from "chai";
|
||||
|
||||
import { makeLogFileName, NOISE_KEY_1, NOISE_KEY_2, Nwaku } from "../src/";
|
||||
|
|
Loading…
Reference in New Issue