# CLIENT

Identifies live chain state, one pinned block, or a retained execution checkpoint without storing credentials.

Canonical HTML: <https://determica.com/docs/types/client>

- Family: Logical
- Physical type: JSON

Identifies live chain state, one pinned block, or a retained execution checkpoint without storing credentials.

## Used by functions

### Input and output

- [attach_transport](/docs/functions/attach_transport.md) — Attaches transport authority to a pinned or execution CLIENT so missing state can be fetched without changing the CLIENT's durable state identity.
- [pin](/docs/functions/pin.md) — Resolves a live CLIENT to one exact block and returns a pinned CLIENT for repeatable state reads. Pin by tag, number, hash, or a matching number/hash pair, with optional canonicality enforcement. Identical normalized requests using the same constructed live-CLIENT wrapper share one resolution within a SQL statement; separate client(transport) constructions resolve independently, and a later statement resolves the selector again.

### Accepted as input

- [block_at](/docs/functions/block_at.md) — Resolves a timestamp to a block boundary through an attached live client. at_or_before selects the highest block number whose timestamp is no later than the target; at_or_after selects the lowest block number whose timestamp is no earlier; closest selects the nearer timestamp.
- [block_range](/docs/functions/block_range.md) — Resolves the start and end independently with at_or_after and returns [from_block, to_block). A DATE supplies UTC midnight at the start of that day and UTC midnight at the start of the next day.
- [client_context](/docs/functions/client_context.md) — Returns the state identity and hydration status carried by a CLIENT, including its kind, chain, block, chain profile, and identity hash.
- [code_at](/docs/functions/code_at.md) — Reads an account's runtime bytecode from live RPC state, the exact state identified by a pinned CLIENT, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [create_access_list](/docs/functions/create_access_list.md) — Builds an EIP-2930 access list for a transaction request. Each result row identifies an accessed account or storage slot and includes request status.
- [get_block](/docs/functions/get_block.md) — Fetches a block by decimal height, supported block tag, or block hash. The block defaults to latest and include_transactions defaults to false.
- [get_gas_price](/docs/functions/get_gas_price.md) — Returns the RPC provider's current legacy gas-price estimate as an exact UINT256 value in Wei.
- [get_logs](/docs/functions/get_logs.md) — Reads logs matching emitter, inclusive block bounds, and topic filters. Live clients use eth_getLogs; retained execution clients read stored execution logs.
- [get_transaction](/docs/functions/get_transaction.md) — Fetches a transaction by hash, then makes a separate receipt request for receipt metadata.
- [get_transaction_logs](/docs/functions/get_transaction_logs.md) — Returns logs from a transaction receipt, optionally filtered by emitter or indexed topics. Supply an event signature or JSON ABI to append typed decoded fields.
- [latest_block](/docs/functions/latest_block.md) — Returns the latest block number reported by the RPC provider. Because the chain head moves, persist the result before using it as a reproducible boundary.
- [native_balance](/docs/functions/native_balance.md) — Returns an address's native-token balance as exact Wei in live, pinned, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [nonce](/docs/functions/nonce.md) — Returns an address's transaction count in live, pinned, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [raw_call](/docs/functions/raw_call.md) — Executes an isolated EVM call and returns the raw response bytes. Without a CLIENT, it builds a reusable READ and does not execute the call.
- [read_contract](/docs/functions/read_contract.md) — Calls a contract function against live, pinned, or retained execution state and returns a typed SQL value. Without a CLIENT, it builds a reusable READ and does not execute the call.
- [read_contract_at](/docs/functions/read_contract_at.md) — Calls a contract function at an explicit block number and returns ABI-decoded SQL values.
- [rpc_call](/docs/functions/rpc_call.md) — Sends a low-level JSON-RPC request and returns the response's result value as JSON. Provider errors and transport failures are raised as SQL errors.
- [run](/docs/functions/run.md) — Executes candidate EVM programs sequentially against exact CLIENT state, then atomically publishes compact receipts and auditable local evidence. It never submits transactions or mutates the connected chain.
- [storage_at](/docs/functions/storage_at.md) — Returns one raw 32-byte storage word for a contract and BYTES32 slot in live, pinned, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.

### Returned as output

- [client](/docs/functions/client.md) — 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.
