import { Plugin, PluginAPI } from "@lumeweb/relay-types"; import { getRpcServer } from "../rpc/server"; const plugin: Plugin = { name: "core", async plugin(api: PluginAPI): Promise { api.registerMethod("ping", { cacheable: false, async handler(): Promise { return "pong"; }, }); api.registerMethod("get_methods", { cacheable: false, async handler(): Promise { return api.getRpcServer().getMethods(); }, }); }, }; export default plugin;