diff --git a/packages/interfaces/src/light_push.ts b/packages/interfaces/src/light_push.ts index b9350c6b6b..32b29048e6 100644 --- a/packages/interfaces/src/light_push.ts +++ b/packages/interfaces/src/light_push.ts @@ -1,4 +1,5 @@ -import { IBaseProtocolCore } from "./protocols.js"; +import { IBaseProtocolCore, IBaseProtocolSDK } from "./protocols.js"; import type { ISender } from "./sender.js"; -export type ILightPush = ISender & { protocol: IBaseProtocolCore }; +export type ILightPush = ISender & + IBaseProtocolSDK & { protocol: IBaseProtocolCore }; diff --git a/packages/tests/tests/enr.node.spec.ts b/packages/tests/tests/enr.node.spec.ts index 18ca31a04e..6a02e70fb9 100644 --- a/packages/tests/tests/enr.node.spec.ts +++ b/packages/tests/tests/enr.node.spec.ts @@ -1,8 +1,8 @@ -import { waitForRemotePeer } from "@waku/core"; import { EnrDecoder } from "@waku/enr"; import type { RelayNode } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { createRelayNode } from "@waku/relay"; +import { waitForRemotePeer } from "@waku/sdk"; import { expect } from "chai"; import { diff --git a/packages/tests/tests/ephemeral.node.spec.ts b/packages/tests/tests/ephemeral.node.spec.ts index c9a68a110f..25ad308d8e 100644 --- a/packages/tests/tests/ephemeral.node.spec.ts +++ b/packages/tests/tests/ephemeral.node.spec.ts @@ -1,9 +1,4 @@ -import { - createDecoder, - createEncoder, - DecodedMessage, - waitForRemotePeer -} from "@waku/core"; +import { createDecoder, createEncoder, DecodedMessage } from "@waku/core"; import { Protocols } from "@waku/interfaces"; import type { LightNode } from "@waku/interfaces"; import { @@ -19,7 +14,7 @@ import { createDecoder as createSymDecoder, createEncoder as createSymEncoder } from "@waku/message-encryption/symmetric"; -import { createLightNode } from "@waku/sdk"; +import { createLightNode, waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, Logger } from "@waku/utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { expect } from "chai"; diff --git a/packages/tests/tests/filter/push.node.spec.ts b/packages/tests/tests/filter/push.node.spec.ts index 5d69c73948..bbd49be6c2 100644 --- a/packages/tests/tests/filter/push.node.spec.ts +++ b/packages/tests/tests/filter/push.node.spec.ts @@ -1,6 +1,5 @@ -import { waitForRemotePeer } from "@waku/core"; import { LightNode, Protocols } from "@waku/interfaces"; -import { utf8ToBytes } from "@waku/sdk"; +import { utf8ToBytes, waitForRemotePeer } from "@waku/sdk"; import { expect } from "chai"; import { diff --git a/packages/tests/tests/filter/single_node/multiple_pubsub.node.spec.ts b/packages/tests/tests/filter/single_node/multiple_pubsub.node.spec.ts index 75e12b1919..60aeeebfe9 100644 --- a/packages/tests/tests/filter/single_node/multiple_pubsub.node.spec.ts +++ b/packages/tests/tests/filter/single_node/multiple_pubsub.node.spec.ts @@ -1,4 +1,4 @@ -import { createDecoder, createEncoder, waitForRemotePeer } from "@waku/core"; +import { createDecoder, createEncoder } from "@waku/core"; import type { ContentTopicInfo, LightNode, @@ -6,6 +6,7 @@ import type { SingleShardInfo } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; +import { waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, contentTopicToShardIndex, diff --git a/packages/tests/tests/filter/single_node/push.node.spec.ts b/packages/tests/tests/filter/single_node/push.node.spec.ts index 79fd020ae3..baf074b2c2 100644 --- a/packages/tests/tests/filter/single_node/push.node.spec.ts +++ b/packages/tests/tests/filter/single_node/push.node.spec.ts @@ -1,6 +1,5 @@ -import { waitForRemotePeer } from "@waku/core"; import { LightNode, Protocols } from "@waku/interfaces"; -import { utf8ToBytes } from "@waku/sdk"; +import { utf8ToBytes, waitForRemotePeer } from "@waku/sdk"; import { expect } from "chai"; import { diff --git a/packages/tests/tests/filter/single_node/subscribe.node.spec.ts b/packages/tests/tests/filter/single_node/subscribe.node.spec.ts index e75f81f94d..cf2aef1303 100644 --- a/packages/tests/tests/filter/single_node/subscribe.node.spec.ts +++ b/packages/tests/tests/filter/single_node/subscribe.node.spec.ts @@ -1,4 +1,4 @@ -import { createDecoder, createEncoder, waitForRemotePeer } from "@waku/core"; +import { createDecoder, createEncoder } from "@waku/core"; import { LightNode, Protocols } from "@waku/interfaces"; import { ecies, @@ -7,7 +7,7 @@ import { getPublicKey, symmetric } from "@waku/message-encryption"; -import { utf8ToBytes } from "@waku/sdk"; +import { utf8ToBytes, waitForRemotePeer } from "@waku/sdk"; import { expect } from "chai"; import type { Context } from "mocha"; diff --git a/packages/tests/tests/filter/utils.ts b/packages/tests/tests/filter/utils.ts index 2bcbd88125..1e3165af24 100644 --- a/packages/tests/tests/filter/utils.ts +++ b/packages/tests/tests/filter/utils.ts @@ -1,4 +1,4 @@ -import { createDecoder, createEncoder, waitForRemotePeer } from "@waku/core"; +import { createDecoder, createEncoder } from "@waku/core"; import { DefaultNetworkConfig, ISubscriptionSDK, @@ -8,7 +8,7 @@ import { Protocols, Waku } from "@waku/interfaces"; -import { createLightNode } from "@waku/sdk"; +import { createLightNode, waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, derivePubsubTopicsFromNetworkConfig, diff --git a/packages/tests/tests/getPeers.spec.ts b/packages/tests/tests/getPeers.spec.ts index 252340a5bf..52127bb54b 100644 --- a/packages/tests/tests/getPeers.spec.ts +++ b/packages/tests/tests/getPeers.spec.ts @@ -1,6 +1,6 @@ import type { Connection, Peer, PeerStore } from "@libp2p/interface"; import { createSecp256k1PeerId } from "@libp2p/peer-id-factory"; -import { LightPushCodec, waitForRemotePeer } from "@waku/core"; +import { LightPushCodec } from "@waku/core"; import { ContentTopicInfo, createLightNode, @@ -9,7 +9,8 @@ import { Protocols, ShardInfo, Tags, - utf8ToBytes + utf8ToBytes, + waitForRemotePeer } from "@waku/sdk"; import { encodeRelayShard, diff --git a/packages/tests/tests/light-push/single_node/multiple_pubsub.node.spec.ts b/packages/tests/tests/light-push/single_node/multiple_pubsub.node.spec.ts index 4fabf1919f..f36a614aaf 100644 --- a/packages/tests/tests/light-push/single_node/multiple_pubsub.node.spec.ts +++ b/packages/tests/tests/light-push/single_node/multiple_pubsub.node.spec.ts @@ -1,5 +1,5 @@ import type { PeerId } from "@libp2p/interface"; -import { createEncoder, waitForRemotePeer } from "@waku/core"; +import { createEncoder } from "@waku/core"; import { ContentTopicInfo, LightNode, @@ -8,6 +8,7 @@ import { ShardInfo, SingleShardInfo } from "@waku/interfaces"; +import { waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, contentTopicToShardIndex, diff --git a/packages/tests/tests/relay/interop.node.spec.ts b/packages/tests/tests/relay/interop.node.spec.ts index b9cc3eeb70..3c05bebfa0 100644 --- a/packages/tests/tests/relay/interop.node.spec.ts +++ b/packages/tests/tests/relay/interop.node.spec.ts @@ -1,7 +1,8 @@ import type { PeerId } from "@libp2p/interface"; -import { DecodedMessage, waitForRemotePeer } from "@waku/core"; +import { DecodedMessage } from "@waku/core"; import { Protocols, RelayNode } from "@waku/interfaces"; import { createRelayNode } from "@waku/relay"; +import { waitForRemotePeer } from "@waku/sdk"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { expect } from "chai"; diff --git a/packages/tests/tests/relay/multiple_pubsub.node.spec.ts b/packages/tests/tests/relay/multiple_pubsub.node.spec.ts index 91915f76a0..6434153f17 100644 --- a/packages/tests/tests/relay/multiple_pubsub.node.spec.ts +++ b/packages/tests/tests/relay/multiple_pubsub.node.spec.ts @@ -1,9 +1,4 @@ -import { - createDecoder, - createEncoder, - DecodedMessage, - waitForRemotePeer -} from "@waku/core"; +import { createDecoder, createEncoder, DecodedMessage } from "@waku/core"; import { ContentTopicInfo, RelayNode, @@ -12,6 +7,7 @@ import { } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { createRelayNode } from "@waku/relay"; +import { waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, pubsubTopicToSingleShardInfo, diff --git a/packages/tests/tests/relay/utils.ts b/packages/tests/tests/relay/utils.ts index 090d6221e6..f0141e3481 100644 --- a/packages/tests/tests/relay/utils.ts +++ b/packages/tests/tests/relay/utils.ts @@ -1,4 +1,4 @@ -import { createDecoder, createEncoder, waitForRemotePeer } from "@waku/core"; +import { createDecoder, createEncoder } from "@waku/core"; import { NetworkConfig, Protocols, @@ -6,6 +6,7 @@ import { ShardInfo } from "@waku/interfaces"; import { createRelayNode } from "@waku/relay"; +import { waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, Logger } from "@waku/utils"; import { Context } from "mocha"; diff --git a/packages/tests/tests/store/index.node.spec.ts b/packages/tests/tests/store/index.node.spec.ts index e34864d604..e5ce92d7a0 100644 --- a/packages/tests/tests/store/index.node.spec.ts +++ b/packages/tests/tests/store/index.node.spec.ts @@ -1,4 +1,4 @@ -import { createDecoder, DecodedMessage, waitForRemotePeer } from "@waku/core"; +import { createDecoder, DecodedMessage } from "@waku/core"; import type { IMessage, LightNode } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { @@ -14,6 +14,7 @@ import { createDecoder as createSymDecoder, createEncoder as createSymEncoder } from "@waku/message-encryption/symmetric"; +import { waitForRemotePeer } from "@waku/sdk"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { expect } from "chai"; import { equals } from "uint8arrays/equals"; diff --git a/packages/tests/tests/store/multiple_pubsub.spec.ts b/packages/tests/tests/store/multiple_pubsub.spec.ts index 2a98793cb2..de2b346b7b 100644 --- a/packages/tests/tests/store/multiple_pubsub.spec.ts +++ b/packages/tests/tests/store/multiple_pubsub.spec.ts @@ -1,6 +1,6 @@ -import { createDecoder, waitForRemotePeer } from "@waku/core"; +import { createDecoder } from "@waku/core"; import type { ContentTopicInfo, IMessage, LightNode } from "@waku/interfaces"; -import { createLightNode, Protocols } from "@waku/sdk"; +import { createLightNode, Protocols, waitForRemotePeer } from "@waku/sdk"; import { contentTopicToPubsubTopic, pubsubTopicToSingleShardInfo diff --git a/packages/tests/tests/wait_for_remote_peer.node.spec.ts b/packages/tests/tests/wait_for_remote_peer.node.spec.ts index 90393bf2f3..71c89eda0f 100644 --- a/packages/tests/tests/wait_for_remote_peer.node.spec.ts +++ b/packages/tests/tests/wait_for_remote_peer.node.spec.ts @@ -1,8 +1,7 @@ -import { waitForRemotePeer } from "@waku/core"; import type { LightNode, RelayNode } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { createRelayNode } from "@waku/relay"; -import { createLightNode } from "@waku/sdk"; +import { createLightNode, waitForRemotePeer } from "@waku/sdk"; import { expect } from "chai"; import { diff --git a/packages/tests/tests/waku.node.spec.ts b/packages/tests/tests/waku.node.spec.ts index 3881971e1e..250835f16b 100644 --- a/packages/tests/tests/waku.node.spec.ts +++ b/packages/tests/tests/waku.node.spec.ts @@ -1,6 +1,6 @@ import { bootstrap } from "@libp2p/bootstrap"; import type { PeerId } from "@libp2p/interface"; -import { DecodedMessage, waitForRemotePeer } from "@waku/core"; +import { DecodedMessage } from "@waku/core"; import type { LightNode, RelayNode, Waku } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { generateSymmetricKey } from "@waku/message-encryption"; @@ -12,7 +12,8 @@ import { createRelayNode } from "@waku/relay"; import { createLightNode, createEncoder as createPlainEncoder, - DefaultUserAgent + DefaultUserAgent, + waitForRemotePeer } from "@waku/sdk"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { expect } from "chai";