diff --git a/dist/index.d.ts b/dist/index.d.ts index 62fa7f9..de50b1f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,3 +1,4 @@ export * from "./rpc.js"; export * from "./plugin.js"; +export * from "./swarm.js"; //# sourceMappingURL=index.d.ts.map diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index b9db183..76cb7d8 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/plugin.d.ts b/dist/plugin.d.ts index e5c0820..625d2c1 100644 --- a/dist/plugin.d.ts +++ b/dist/plugin.d.ts @@ -4,6 +4,7 @@ import { Logger } from "pino"; import SSLManager from "./ssl.js"; import type { HDKey } from "micro-ed25519-hdkey"; import type Config from "@lumeweb/cfg"; +import type { ProtocolManager } from "./swarm.js"; export type PluginFunction = (api: PluginAPI) => Promise; export interface Plugin { name: string; @@ -31,6 +32,7 @@ export declare class PluginAPI extends EventEmitter2 { get seed(): Uint8Array; get identity(): HDKey; get ssl(): SSLManager; + get protocols(): ProtocolManager; loadPlugin(moduleName: string): (moduleName: string) => Promise; registerMethod(methodName: string, method: RPCMethod): void; } diff --git a/dist/plugin.d.ts.map b/dist/plugin.d.ts.map index e1fc67a..c958331 100644 --- a/dist/plugin.d.ts.map +++ b/dist/plugin.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,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