Skip to content

Commit

Permalink
chore: remove content_topic specific API (#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
weboko committed Jul 23, 2024
1 parent a739ada commit 04bd518
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 325 deletions.
1 change: 0 additions & 1 deletion packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export {

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

export * from "./utils/content_topic.js";
export * from "./waku.js";

export { createLightNode, defaultLibp2p } from "./create/index.js";
Expand Down
125 changes: 0 additions & 125 deletions packages/sdk/src/utils/content_topic.ts

This file was deleted.

19 changes: 1 addition & 18 deletions packages/sdk/src/waku.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import type { Stream } from "@libp2p/interface";
import { isPeerId, PeerId } from "@libp2p/interface";
import { multiaddr, Multiaddr, MultiaddrInput } from "@multiformats/multiaddr";
import { ConnectionManager, DecodedMessage } from "@waku/core";
import { ConnectionManager } from "@waku/core";
import type {
Callback,
IFilterSDK,
ILightPushSDK,
IRelay,
IStoreSDK,
ISubscriptionSDK,
Libp2p,
LightNode,
ProtocolCreateOptions,
PubsubTopic,
Waku
Expand All @@ -22,7 +19,6 @@ import { Logger } from "@waku/utils";
import { wakuFilter } from "./protocols/filter.js";
import { wakuLightPush } from "./protocols/light_push.js";
import { wakuStore } from "./protocols/store.js";
import { subscribeToContentTopic } from "./utils/content_topic.js";

export const DefaultPingKeepAliveValueSecs = 5 * 60;
export const DefaultRelayKeepAliveValueSecs = 5 * 60;
Expand Down Expand Up @@ -211,19 +207,6 @@ export class WakuNode implements Waku {
await this.libp2p.stop();
}

public async subscribeToContentTopic(
contentTopic: string,
peer: Multiaddr,
callback: Callback<DecodedMessage>
): Promise<ISubscriptionSDK> {
return (
await subscribeToContentTopic(contentTopic, callback, {
waku: this as LightNode,
peer
})
).subscription;
}

public isStarted(): boolean {
return this.libp2p.status == "started";
}
Expand Down
181 changes: 0 additions & 181 deletions packages/tests/tests/sdk/content_topic.spec.ts

This file was deleted.

0 comments on commit 04bd518

Please sign in to comment.