diff --git a/src/index.ts b/src/index.ts index 096f9bb..2e2d484 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,28 +1,27 @@ -import type {Plugin, PluginAPI} from "@lumeweb/relay"; -import {RPCResponse} from "@lumeweb/relay"; +import type { Plugin, PluginAPI } from "@lumeweb/relay"; +import { RPCResponse } from "@lumeweb/relay"; const plugin: Plugin = { - name: "core", - async plugin(api: PluginAPI): Promise { - api.registerMethod("ping", { - cacheable: false, - handler: async (): Promise => { - return { - data: "pong" - } - } - }) + name: "core", + async plugin(api: PluginAPI): Promise { + api.registerMethod("ping", { + cacheable: false, + async handler(): Promise { + return { + data: "pong", + }; + }, + }); - api.registerMethod("get_methods", { - cacheable: false, - handler: async (): Promise => { - return { - data: api.getMethods() - } - } - }) - } - -} + api.registerMethod("get_methods", { + cacheable: false, + async handler(): Promise { + return { + data: api.getMethods(), + }; + }, + }); + }, +}; export default plugin;