Skip to main content

Interface: RpcConfig

Defined in: packages/rpc/src/types.ts:73

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: packages/rpc/src/types.ts:108

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: packages/rpc/src/types.ts:90

Maximum arguments per apply operation (security)

Default

100

maxDepth?

optional maxDepth: number

Defined in: packages/rpc/src/types.ts:84

Maximum depth for operation chains (security)

Default

50

prefix?

optional prefix: string

Defined in: packages/rpc/src/types.ts:78

Base path for RPC endpoints

Default

"/__rpc"