View this page as Markdown

client

Creates a live CLIENT from a TRANSPORT or restores retained execution state by execution ID. An optional expected chain ID rejects state from another chain.

Example

Needs RPC · RPC required

SELECT client($transport) AS client;

API reference

Exact signatures with descriptions, requirements, inputs, returns, and examples.

client(TRANSPORT) # Live Client Constructor

Creates a live CLIENT from the TRANSPORT's declared chain id without sending an RPC request.

Inputs

Name Type Use
transport TRANSPORT

TRANSPORT that provides the chain endpoint and request policy for a live CLIENT.

required positional

Returns

Name Type
client CLIENT

Live CLIENT. Returns a live CLIENT. Its state follows the TRANSPORT's chain until pin resolves it to one block.

Guidance

CLIENT state modes

A CLIENT identifies the state for a read. Its durable identity does not include TRANSPORT credentials or request policy. Determica uses those only to fetch missing state.

  • A live CLIENT follows the selected chain until it is pinned.
  • A pinned CLIENT identifies one block. attach_transport lets it fetch missing state.
  • An execution CLIENT identifies retained simulation state. An attached TRANSPORT can fetch missing chain state.
  • Call client_context to inspect the state identity and whether a TRANSPORT is attached.

Chain validation

Use an expected_chain_id overload when the function must reject state from another chain.

  • The function compares expected_chain_id with trusted TRANSPORT metadata or retained execution lineage. It does not send an RPC request.
  • This check does not pin a live CLIENT. Call pin when later reads must use the same block.

Additional overloads

client(TRANSPORT, UBIGINT) # Live Client Constructor

Creates a live CLIENT only when the TRANSPORT's declared chain id matches expected_chain_id.

Inputs

Name Type Use
transport TRANSPORT

TRANSPORT that provides the chain endpoint and request policy for a live CLIENT.

required positional
expected_chain_id UBIGINT

Required EVM chain id. CLIENT creation fails locally when the TRANSPORT declares another chain.

required positional

Returns

Name Type
client CLIENT

Live CLIENT. Returns a live CLIENT. Its state follows the TRANSPORT's chain until pin resolves it to one block.

client(UUID) # Execution Client Constructor

Restores a CLIENT from retained execution state without attaching a TRANSPORT.

Inputs

Name Type Use
execution_id UUID

UUID for retained execution state in Determica's local catalog.

required positional

Returns

Name Type
client CLIENT

Execution CLIENT. Returns a CLIENT for retained execution state. Attach a TRANSPORT to fetch missing base-chain state.

client(UUID, UBIGINT) # Execution Client Constructor

Restores retained execution state only when its lineage matches expected_chain_id.

Inputs

Name Type Use
execution_id UUID

UUID for retained execution state in Determica's local catalog.

required positional
expected_chain_id UBIGINT

Required EVM chain id. Restoration fails when the execution lineage belongs to another chain.

required positional

Returns

Name Type
client CLIENT

Execution CLIENT. Returns a CLIENT for retained execution state. Attach a TRANSPORT to fetch missing base-chain state.

Category and tags

Tag
Client