Compare commits

..

No commits in common. "4e460a182d93f6faf04f0d6bdd1c0a48c2eb0c71" and "5a3226e0b966f30523f24904de55de21e1321587" have entirely different histories.

5 changed files with 7 additions and 25 deletions

8
dist/plugin.d.ts vendored
View File

@ -1,11 +1,10 @@
import type { EventEmitter2 } from "eventemitter2";
import type { RPCMethod, RPCServer } from "./rpc.js";
import type { Logger } from "pino";
import type SSLManager from "./ssl.js";
import { RPCMethod, RPCServer } from "./rpc.js";
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";
import type { Util } from "./util.js";
export type PluginFunction = (api: PluginAPI) => Promise<void>;
export interface Plugin {
name: string;
@ -25,7 +24,6 @@ export declare class PluginAPI extends EventEmitter2 {
server: RPCServer;
swarm: any;
});
get util(): Util;
get swarm(): any;
get config(): Config;
get pluginConfig(): Config;

View File

@ -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,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,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CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;gBACtC,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,SAAS,CAAC;QAClB,KAAK,EAAE,GAAG,CAAC;KACZ;IACD,IAAI,KAAK,IAAI,GAAG,CAAC;IACjB,IAAI,MAAM,IAAI,MAAM,CAAC;IACrB,IAAI,YAAY,IAAI,MAAM,CAAC;IAC3B,IAAI,MAAM,IAAI,MAAM,CAAC;IACrB,IAAI,SAAS,IAAI,SAAS,CAAC;IAC3B,IAAI,IAAI,IAAI,UAAU,CAAC;IACvB,IAAI,QAAQ,IAAI,KAAK,CAAC;IACtB,IAAI,GAAG,IAAI,UAAU,CAAC;IACtB,IAAI,SAAS,IAAI,eAAe,CAAC;IACjC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC;IACvE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI;CAC5D"}

View File

@ -5,9 +5,7 @@
"type": "module",
"devDependencies": {
"@lumeweb/cfg": "https://git.lumeweb.com/LumeWeb/cfg.git",
"@types/b4a": "^1.6.0",
"@types/node": "^18.11.17",
"c": "^1.1.1",
"express": "^4.18.1",
"node-cache": "^5.1.2",
"prettier": "^2.8.1",

View File

@ -1,11 +1,10 @@
import type { EventEmitter2 } from "eventemitter2";
import type { RPCMethod, RPCServer } from "./rpc.js";
import type { Logger } from "pino";
import type SSLManager from "./ssl.js";
import { RPCMethod, RPCServer } from "./rpc.js";
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";
import type { Util } from "./util.js";
export type PluginFunction = (api: PluginAPI) => Promise<void>;
@ -28,7 +27,6 @@ export declare class PluginAPI extends EventEmitter2 {
server: RPCServer;
swarm: any;
});
get util(): Util;
get swarm(): any;
get config(): Config;
get pluginConfig(): Config;

View File

@ -1,12 +0,0 @@
import type b4a from "b4a";
import type c from "compact-encoding";
export declare class Util {
private _crypto;
get crypto(): Crypto;
get bufferEncoding(): typeof b4a;
get binaryEncoding(): typeof c;
}
export declare class Crypto {
createHash(data: string): Buffer;
}