Skip to content

Commit 04bd518

Browse files
authored
chore: remove content_topic specific API (#2081)
1 parent a739ada commit 04bd518

File tree

4 files changed

+1
-325
lines changed

4 files changed

+1
-325
lines changed

packages/sdk/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export {
77

88
export { utf8ToBytes, bytesToUtf8 } from "@waku/utils/bytes";
99

10-
export * from "./utils/content_topic.js";
1110
export * from "./waku.js";
1211

1312
export { createLightNode, defaultLibp2p } from "./create/index.js";

packages/sdk/src/utils/content_topic.ts

Lines changed: 0 additions & 125 deletions
This file was deleted.

packages/sdk/src/waku.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import type { Stream } from "@libp2p/interface";
22
import { isPeerId, PeerId } from "@libp2p/interface";
33
import { multiaddr, Multiaddr, MultiaddrInput } from "@multiformats/multiaddr";
4-
import { ConnectionManager, DecodedMessage } from "@waku/core";
4+
import { ConnectionManager } from "@waku/core";
55
import type {
6-
Callback,
76
IFilterSDK,
87
ILightPushSDK,
98
IRelay,
109
IStoreSDK,
11-
ISubscriptionSDK,
1210
Libp2p,
13-
LightNode,
1411
ProtocolCreateOptions,
1512
PubsubTopic,
1613
Waku
@@ -22,7 +19,6 @@ import { Logger } from "@waku/utils";
2219
import { wakuFilter } from "./protocols/filter.js";
2320
import { wakuLightPush } from "./protocols/light_push.js";
2421
import { wakuStore } from "./protocols/store.js";
25-
import { subscribeToContentTopic } from "./utils/content_topic.js";
2622

2723
export const DefaultPingKeepAliveValueSecs = 5 * 60;
2824
export const DefaultRelayKeepAliveValueSecs = 5 * 60;
@@ -211,19 +207,6 @@ export class WakuNode implements Waku {
211207
await this.libp2p.stop();
212208
}
213209

214-
public async subscribeToContentTopic(
215-
contentTopic: string,
216-
peer: Multiaddr,
217-
callback: Callback<DecodedMessage>
218-
): Promise<ISubscriptionSDK> {
219-
return (
220-
await subscribeToContentTopic(contentTopic, callback, {
221-
waku: this as LightNode,
222-
peer
223-
})
224-
).subscription;
225-
}
226-
227210
public isStarted(): boolean {
228211
return this.libp2p.status == "started";
229212
}

packages/tests/tests/sdk/content_topic.spec.ts

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)