*Add get_topics rpc method
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
523f2c04f0
commit
2ae556ad14
|
@ -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<string[]> {
|
||||
return [...api.swarm.peers.keys()];
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue