*Add get_topics rpc method
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Derrick Hammer 2023-01-05 20:55:46 -05:00
parent 523f2c04f0
commit 2ae556ad14
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,13 @@ const plugin: Plugin = {
.map((peerInfo) => b4a.from(peerInfo.publicKey).toString()); .map((peerInfo) => b4a.from(peerInfo.publicKey).toString());
}, },
}); });
api.registerMethod("get_topics", {
cacheable: false,
async handler(topic: string): Promise<string[]> {
return [...api.swarm.peers.keys()];
},
});
}, },
}; };