Skip to content

Commit

Permalink
Update docs around RPCCORE
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Nov 18, 2024
1 parent 4f2f1c5 commit 008ac43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/rpc-core/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ type MemoizedRpcInterfaceMethod = Memoized<RpcInterfaceMethod> & {
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<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
}
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 008ac43

Please sign in to comment.