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

1
SELECT client_context($client) AS context;
Notebook ready in readonly mode.

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 whose state identity should be inspected.

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 describing state_kind, chain_id, chain_profile, chain_profile_version, block_number, block_hash, state_identity_hash, and hydration_binding_status.

Guidance

Context fields

The returned STRUCT separates durable state identity from current transport hydration.

  • state_kind distinguishes live, pinned, and execution clients.
  • chain_id identifies the EVM chain.
  • chain_profile and chain_profile_version identify the execution and canonicality profile.
  • block_number and block_hash are populated when the state is pinned to an exact block.
  • state_identity_hash is the durable identity fingerprint.
  • hydration_binding_status reports whether transport authority is currently attached.

Category and tags

Tag
Client