*add app getter
This commit is contained in:
parent
4995bdcefe
commit
8bad551b29
|
@ -9,6 +9,7 @@
|
||||||
"@types/node": "^18.11.17",
|
"@types/node": "^18.11.17",
|
||||||
"c": "^1.1.1",
|
"c": "^1.1.1",
|
||||||
"express": "^4.18.1",
|
"express": "^4.18.1",
|
||||||
|
"fastify": "^4.15.0",
|
||||||
"node-cache": "^5.1.2",
|
"node-cache": "^5.1.2",
|
||||||
"prettier": "^2.8.1",
|
"prettier": "^2.8.1",
|
||||||
"typescript": "^4.9.4"
|
"typescript": "^4.9.4"
|
||||||
|
|
|
@ -6,6 +6,7 @@ import type { HDKey } from "micro-ed25519-hdkey";
|
||||||
import type Config from "@lumeweb/cfg";
|
import type Config from "@lumeweb/cfg";
|
||||||
import type { ProtocolManager } from "./swarm.js";
|
import type { ProtocolManager } from "./swarm.js";
|
||||||
import type { Util } from "./util.js";
|
import type { Util } from "./util.js";
|
||||||
|
import type { FastifyInstance } from "fastify";
|
||||||
|
|
||||||
export type PluginFunction = (api: PluginAPI) => Promise<void>;
|
export type PluginFunction = (api: PluginAPI) => Promise<void>;
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ export declare class PluginAPI extends EventEmitter2 {
|
||||||
get identity(): HDKey;
|
get identity(): HDKey;
|
||||||
get ssl(): SSLManager;
|
get ssl(): SSLManager;
|
||||||
get protocols(): ProtocolManager;
|
get protocols(): ProtocolManager;
|
||||||
|
get app(): FastifyInstance;
|
||||||
loadPlugin(moduleName: string): (moduleName: string) => Promise<Plugin>;
|
loadPlugin(moduleName: string): (moduleName: string) => Promise<Plugin>;
|
||||||
registerMethod(methodName: string, method: RPCMethod): void;
|
registerMethod(methodName: string, method: RPCMethod): void;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue