View this page as Markdown

client_context

Returns the state identity and hydration status carried by a CLIENT, including its kind, chain, block, chain profile, and identity hash.

Example

Local

SELECT client_context($client) AS context;

API reference

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

client_context(CLIENT) #

Inspects CLIENT identity locally and does not perform a chain read.

Inputs

Name Type Use
client CLIENT

Live, pinned, or execution CLIENT to inspect.

required positional

Returns

Name Type
context STRUCT(state_kind VARCHAR, chain_id UBIGINT, chain_profile VARCHAR, chain_profile_version UINTEGER, block_number UBIGINT, block_hash BYTES32, state_identity_hash BYTES32, hydration_binding_status VARCHAR)

CLIENT context. Returns a STRUCT with state_kind, chain_id, chain_profile, chain_profile_version, block_number, block_hash, state_identity_hash, and hydration_binding_status.

Guidance

Context fields

The STRUCT reports durable state identity separately from the attached TRANSPORT.

  • state_kind is live, pinned, or execution.
  • chain_id identifies the EVM chain.
  • chain_profile and chain_profile_version identify the execution and canonicality profile.
  • A pinned CLIENT sets block_number and block_hash.
  • state_identity_hash is the hash of the durable state identity.
  • hydration_binding_status reports whether a TRANSPORT is attached.

Category and tags

Tag
Client