Skip to main content

Interface: RpcConfig

Defined in: types.ts:58

Configuration for RPC system on the Durable Object (server) side. Used by both lumenizeRpcDO() factory and handleRpcRequest() for manual routing.

Properties​

blockConcurrency?​

optional blockConcurrency: boolean

Defined in: types.ts:93

Use blockConcurrencyWhile() to ensure all RPC operations and storage complete before the next request/message can be processed.

When enabled:

  • Guarantees that async operations complete before the next request
  • Ensures storage operations are fully persisted
  • Maintains DO consistency even with async/await usage

When disabled (default):

  • Relies on Cloudflare's automatic input/output gates
  • Should still be safe if you avoid fetch(), setTimeout(), setInterval()
  • Slightly less explicit but potentially more performant

Default​

false

maxArgs?​

optional maxArgs: number

Defined in: types.ts:75

Maximum arguments per apply operation (security)

Default​

100

maxDepth?​

optional maxDepth: number

Defined in: types.ts:69

Maximum depth for operation chains (security)

Default​

50

prefix?​

optional prefix: string

Defined in: types.ts:63

Base path for RPC endpoints

Default​

"/__rpc"