*add dhtCache to RPCCache

This commit is contained in:
Derrick Hammer 2022-12-19 15:19:27 -05:00
parent b139bba69a
commit 632bd19635
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@
"typescript": "^4.9.4"
},
"dependencies": {
"@lumeweb/dht-cache": "https://git.lumeweb.com/LumeWeb/dht-cache.git",
"@types/eventemitter2": "^4.1.0",
"arg": "^5.0.2",
"eventemitter2": "^6.4.9",

View File

@ -1,5 +1,6 @@
import type EventEmitter from "events";
import type NodeCache from "node-cache";
import type DHTCache from "@lumeweb/dht-cache";
export interface RPCRequest {
module: string;
@ -57,6 +58,7 @@ export declare class RPCServer extends EventEmitter {
}
export declare class RPCCache extends EventEmitter {
get data(): NodeCache;
get dhtCache(): DHTCache;
constructor(server: RPCServer);
public signResponse(item: RPCCacheItem): any;
public verifyResponse(pubkey: Buffer, item: RPCCacheItem): boolean | Buffer;