diff --git a/src/modules/plugins/rpc.ts b/src/modules/plugins/rpc.ts index 400a3cb..8b187ea 100644 --- a/src/modules/plugins/rpc.ts +++ b/src/modules/plugins/rpc.ts @@ -162,6 +162,21 @@ const plugin: Plugin = { .filter((item: any) => online.has(item)); }, }); + api.registerMethod("get_bootstrap_info", { + cacheable: false, + async handler(): Promise { + // @ts-ignore + return getRpcServer().cache.dhtCache._getBootstrapInfo(); + }, + }); + + api.registerMethod("get_connected_peers", { + cacheable: false, + async handler(): Promise { + // @ts-ignore + return [...getRpcServer().cache.dhtCache.connectedTo]; + }, + }); }, };