From ae10937bb8bf39816416006e5177f599e85543b9 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 28 Nov 2022 02:21:57 -0500 Subject: [PATCH] *RPCCache.data now returns NodeCache --- package.json | 3 ++- src/rpc.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c244ebb..7e1581e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "@lumeweb/cfg": "https://github.com/LumeWeb/bcfg.git", "@types/node": "^18.7.16", "express": "^4.18.1", - "loglevel": "^1.8.0" + "loglevel": "^1.8.0", + "node-cache": "^5.1.2" } } diff --git a/src/rpc.ts b/src/rpc.ts index 4f0b3ae..fd51fc8 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -1,4 +1,5 @@ import type EventEmitter from "events"; +import type NodeCache from "node-cache"; export interface RPCRequest { module: string; @@ -54,7 +55,7 @@ export declare class RPCServer extends EventEmitter { public static hashQuery(query: RPCRequest): string; } export declare class RPCCache extends EventEmitter { - get data(): RPCCacheData; + get data(): NodeCache; constructor(server: RPCServer); public signResponse(item: RPCCacheItem): any; public verifyResponse(pubkey: Buffer, item: RPCCacheItem): boolean | Buffer;