---
title: "POST /EXPERIMENTAL_light_client_state_proof"
method: POST
path: "/EXPERIMENTAL_light_client_state_proof"
---

# POST /EXPERIMENTAL_light_client_state_proof

`POST /EXPERIMENTAL_light_client_state_proof`

Returns a value from a shard's state together with its trie proof against the chunk's certified state root, verifiable against a trusted light client head.

## Request body

- JsonRpcRequestForEXPERIMENTALLightClientStateProof
  - `id` string — JSON-RPC request id. Auto-populated; can be any string.
  - `jsonrpc` '2.0' — JSON-RPC protocol version. Always `2.0`.
  - `method` 'EXPERIMENTAL_light_client_state_proof', required
  - `params` RpcLightClientStateProofRequest, required
    - `chunk_id` SpiceChunkId, required — In spice missing chunks and equivalent to empty chunks so block hash and shard id always uniquely identifies chunks.
      - `block_hash` string, required
      - `shard_id` integer, required — The shard identifier. It may be an arbitrary number - it does not need to be a number in the range 0..NUM_SHARDS. The shard ids do not need to be sequential or contiguous. The shard id is wrapped in a new type to prevent the old pattern of using indices in range 0..NUM_SHARDS and casting to ShardId. Once the transition if fully complete it potentially may be simplified to a regular type alias.
    - `light_client_head` string, required
    - `target` union, required — Which piece of a shard's state a light-client state proof targets. An account that runs a global contract has no local code, so `LocalContractCode` is absent for it. `Account::contract()` says which case applies.
      - object
        - `account_id` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
        - `target_type` 'account', required
      - object
        - `account_id` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
        - `target_type` 'local_contract_code', required
      - object
        - `account_id` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
        - `key` string, bytes, required — This type is used to mark keys (arrays of bytes) that are queried from store. NOTE: Currently, this type is only used in the view_client and RPC to be able to transparently pretty-serialize the bytes arrays as base64-encoded strings (see `serialize.rs`).
        - `target_type` 'contract_data', required
      - object
        - `account_id` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
        - `public_key` string, required
        - `target_type` 'access_key', required

## Response `200`

- union
  - object
    - `result` RpcLightClientStateProofResponse, required
      - `chunk_execution_proof` ChunkExecutionProofView, required — Proof that a chunk's certified execution roots are committed by a spice block that a light client can trust via its `light_client_head`. `roots_proof` recomputes the certifying block's `chunk_execution_root` from the leaf; `certifying_block_proof` places the certifying block into the head's block merkle tree.
        - `certifying_block_header_lite` LightClientBlockLiteView, required
          - `inner_lite` BlockHeaderInnerLiteView, required — A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).
            - `block_merkle_root` string, required
            - `chunk_execution_root` union — Merkle root over the block's certified chunk execution results. `None` for pre-spice headers.
              - …
            - `epoch_id` string, required
            - `height` integer, required
            - `next_bp_hash` string, required
            - `next_epoch_id` string, required
            - `outcome_root` string, required
            - `prev_state_root` string, required
            - `timestamp` integer, required — Legacy json number. Should not be used.
            - `timestamp_nanosec` string, required
          - `inner_rest_hash` string, required
          - `prev_block_hash` string, required
        - `certifying_block_proof` MerklePathItem[], required
          - `direction` 'Left' | 'Right', required
          - `hash` string, required
        - `roots` ChunkExecutionRoots, required — Merkle leaf committing to a single chunk's certified execution roots. The `chunk_execution_root` in a spice block header is the merkle root over these leaves, sorted by `chunk_id`.
          - `V1` ChunkExecutionRootsV1, required
            - `chunk_id` SpiceChunkId, required — In spice missing chunks and equivalent to empty chunks so block hash and shard id always uniquely identifies chunks.
              - …
            - `outcome_root` string, required
            - `outgoing_receipts_root` string, required
            - `state_root` string, required
        - `roots_proof` MerklePathItem[], required
          - `direction` 'Left' | 'Right', required
          - `hash` string, required
      - `state_proof` StateProofView, required — A value read from a shard's state, with the trie nodes that prove it against the chunk's `state_root`. An absent `value` is proved the same way.
        - `nodes` string[], required
        - `value` union
          - string, bytes — This type is used to mark values returned from store (arrays of bytes). NOTE: Currently, this type is only used in the view_client and RPC to be able to transparently pretty-serialize the bytes arrays as base64-encoded strings (see `serialize.rs`).
          - unknown
    - `id` string, required
    - `jsonrpc` string, required
  - object
    - `error` union, required
      - object
        - `cause` union, required
          - object
            - `info` object, required
              - …
            - `name` 'METHOD_NOT_FOUND', required
          - object
            - `info` object, required
              - …
            - `name` 'PARSE_ERROR', required
        - `name` 'REQUEST_VALIDATION_ERROR', required
      - object
        - `cause` union, required
          - object
            - `info` object, required
            - `name` 'UNKNOWN_BLOCK', required
          - object
            - `info` object, required
              - …
            - `name` 'INCONSISTENT_STATE', required
          - object
            - `info` object, required
              - …
            - `name` 'NOT_CONFIRMED', required
          - object
            - `info` object, required
              - …
            - `name` 'UNKNOWN_TRANSACTION_OR_RECEIPT', required
          - object
            - `info` object, required
              - …
            - `name` 'UNAVAILABLE_SHARD', required
          - object
            - `info` object, required
              - …
            - `name` 'SHARD_NOT_TRACKED', required
          - object
            - `info` object, required
              - …
            - `name` 'TARGET_SHARD_MISMATCH', required
          - object
            - `info` object, required
              - …
            - `name` 'STATE_NOT_AVAILABLE', required
          - object
            - `info` object, required
              - …
            - `name` 'CHUNK_NOT_CERTIFIED', required
          - object
            - `info` object, required
              - …
            - `name` 'LIGHT_CLIENT_HEAD_TOO_OLD', required
          - object
            - `info` object, required
              - …
            - `name` 'INTERNAL_ERROR', required
        - `name` 'HANDLER_ERROR', required
      - object
        - `cause` InternalError, required
          - `info` object, required
            - `error_message` string, required
          - `name` 'INTERNAL_ERROR', required
        - `name` 'INTERNAL_ERROR', required
    - `id` string, required
    - `jsonrpc` string, required

## Changes

- **2026-09-03** `4a6c7147e1c3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/near/apis/near-protocol-json-rpc-api/changes/EXPERIMENTAL_light_client_state_proof/post.md)

---

[API](https://skmtc.dev/near/apis/near-protocol-json-rpc-api.md) · [All operations](https://skmtc.dev/near/apis/near-protocol-json-rpc-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/near/near-protocol-json-rpc-api/revisions/4a6c7147e1c3/schema)
