From 008ac437b15f3b69f78ad978855a12812d05fdf3 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Mon, 18 Nov 2024 15:37:11 -0500 Subject: [PATCH] Update docs around RPCCORE --- packages/rpc-core/src/bundle.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/rpc-core/src/bundle.ts b/packages/rpc-core/src/bundle.ts index ff81658a70d..ad35a11e03f 100644 --- a/packages/rpc-core/src/bundle.ts +++ b/packages/rpc-core/src/bundle.ts @@ -33,6 +33,9 @@ type MemoizedRpcInterfaceMethod = Memoized & { interface Options { isPedantic?: boolean; provider: ProviderInterface; + /** + * Custom size of the rpc LRUCache capacity. Defaults to `RPC_CORE_DEFAULT_CAPACITY` (1024 * 10 * 10) + */ rpcCacheCapacity?: number; userRpc?: Record>; } @@ -110,7 +113,9 @@ export class RpcCore { /** * @constructor * Default constructor for the core RPC handler - * @param {ProviderInterface} provider An API provider using any of the supported providers (HTTP, SC or WebSocket) + * @param {Registry} registry Type Registry + * @param {ProviderInterface} options.provider An API provider using any of the supported providers (HTTP, SC or WebSocket) + * @param {number} [options.rpcCacheCapacity] Custom size of the rpc LRUCache capacity. Defaults to `RPC_CORE_DEFAULT_CAPACITY` (1024 * 10 * 10) */ constructor (instanceId: string, registry: Registry, { isPedantic = true, provider, rpcCacheCapacity, userRpc = {} }: Options) { if (!provider || !isFunction(provider.send)) {