diff --git a/src/modules/plugins/dht.ts b/src/modules/plugins/dht.ts index 2bd671a..bc97d53 100644 --- a/src/modules/plugins/dht.ts +++ b/src/modules/plugins/dht.ts @@ -21,6 +21,13 @@ const plugin: Plugin = { .map((peerInfo) => b4a.from(peerInfo.publicKey).toString()); }, }); + + api.registerMethod("get_topics", { + cacheable: false, + async handler(topic: string): Promise { + return [...api.swarm.peers.keys()]; + }, + }); }, };