*add app getter

This commit is contained in:
Derrick Hammer 2023-04-18 22:56:00 -04:00
parent 4995bdcefe
commit 8bad551b29
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@
"@types/node": "^18.11.17",
"c": "^1.1.1",
"express": "^4.18.1",
"fastify": "^4.15.0",
"node-cache": "^5.1.2",
"prettier": "^2.8.1",
"typescript": "^4.9.4"

View File

@ -6,6 +6,7 @@ import type { HDKey } from "micro-ed25519-hdkey";
import type Config from "@lumeweb/cfg";
import type { ProtocolManager } from "./swarm.js";
import type { Util } from "./util.js";
import type { FastifyInstance } from "fastify";
export type PluginFunction = (api: PluginAPI) => Promise<void>;
@ -38,6 +39,7 @@ export declare class PluginAPI extends EventEmitter2 {
get identity(): HDKey;
get ssl(): SSLManager;
get protocols(): ProtocolManager;
get app(): FastifyInstance;
loadPlugin(moduleName: string): (moduleName: string) => Promise<Plugin>;
registerMethod(methodName: string, method: RPCMethod): void;
}