> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# getBlockHeader

> Retrieves detailed metadata for a specific TON block header, including identifiers, state flags, and timing information.

### Parameters

<ParamField query="chainId" type="string" default="toncoin" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="getBlockHeader" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{"workchain":-1,"shard":"-9223372036854775808","seqno":39064985}} placeholder="{&#x22;workchain&#x22;:-1,&#x22;shard&#x22;:&#x22;-9223372036854775808&#x22;,&#x22;seqno&#x22;:39064985}" required>
  TON block header lookup request.

  Parameters for <code>getBlockHeader</code>:

  <ul>
    <li><code>params.workchain</code>: Block workchain ID. The masterchain uses -1.</li>
    <li><code>params.shard</code>: Block shard ID encoded as a signed 64-bit integer string. The masterchain shard is -9223372036854775808.</li>
    <li><code>params.seqno</code>: Sequence number of the block to retrieve.</li>
    <li><code>params.root\_hash</code>: Optional block root hash. Providers may use this to disambiguate or validate the requested block.</li>
    <li><code>params.file\_hash</code>: Optional block file hash. Providers may use this to disambiguate or validate the requested block.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  TON block header metadata.

  <Expandable title="properties">
    <ResponseField name="@type" type="string">
      TON object type marker.
    </ResponseField>

    <ResponseField name="id" type="object">
      TON extended block identifier.

      <Expandable title="properties">
        <ResponseField name="@type" type="string">
          TON object type marker.
        </ResponseField>

        <ResponseField name="workchain" type="integer">
          Block workchain ID. The masterchain uses -1.
        </ResponseField>

        <ResponseField name="shard" type="string">
          Block shard ID encoded as a signed 64-bit integer string.
        </ResponseField>

        <ResponseField name="seqno" type="integer">
          Block sequence number.
        </ResponseField>

        <ResponseField name="root_hash" type="string">
          Block root hash.
        </ResponseField>

        <ResponseField name="file_hash" type="string">
          Block file hash.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="global_id" type="integer">
      TON network global ID.
    </ResponseField>

    <ResponseField name="version" type="integer">
      Block header version.
    </ResponseField>

    <ResponseField name="flags" type="integer">
      Block header flags bitset.
    </ResponseField>

    <ResponseField name="after_merge" type="boolean">
      Whether the block was created after a shard merge.
    </ResponseField>

    <ResponseField name="after_split" type="boolean">
      Whether the block was created after a shard split.
    </ResponseField>

    <ResponseField name="before_split" type="boolean">
      Whether the block precedes a shard split.
    </ResponseField>

    <ResponseField name="want_merge" type="boolean">
      Whether the shard wants to merge.
    </ResponseField>

    <ResponseField name="want_split" type="boolean">
      Whether the shard wants to split.
    </ResponseField>

    <ResponseField name="validator_list_hash_short" type="integer">
      Short hash of the validator list.
    </ResponseField>

    <ResponseField name="catchain_seqno" type="integer">
      Catchain sequence number.
    </ResponseField>

    <ResponseField name="min_ref_mc_seqno" type="integer">
      Minimum referenced masterchain sequence number.
    </ResponseField>

    <ResponseField name="is_key_block" type="boolean">
      Whether this block is a key block.
    </ResponseField>

    <ResponseField name="prev_key_block_seqno" type="integer">
      Previous key block sequence number.
    </ResponseField>

    <ResponseField name="start_lt" type="string">
      Start logical time for this block.
    </ResponseField>

    <ResponseField name="end_lt" type="string">
      End logical time for this block.
    </ResponseField>

    <ResponseField name="gen_utime" type="integer">
      Unix timestamp when the block was generated.
    </ResponseField>

    <ResponseField name="vert_seqno" type="integer">
      Vertical sequence number.
    </ResponseField>

    <ResponseField name="prev_blocks" type="array">
      Previous block identifiers.

      <Expandable title="items">
        <ResponseField name="items[]" type="object">
          TON extended block identifier.

          <Expandable title="properties">
            <ResponseField name="@type" type="string">
              TON object type marker.
            </ResponseField>

            <ResponseField name="workchain" type="integer">
              Block workchain ID. The masterchain uses -1.
            </ResponseField>

            <ResponseField name="shard" type="string">
              Block shard ID encoded as a signed 64-bit integer string.
            </ResponseField>

            <ResponseField name="seqno" type="integer">
              Block sequence number.
            </ResponseField>

            <ResponseField name="root_hash" type="string">
              Block root hash.
            </ResponseField>

            <ResponseField name="file_hash" type="string">
              Block file hash.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="@extra" type="string">
      Provider-specific response metadata.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=toncoin \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "getBlockHeader",
      "params": {
        "workchain": -1,
        "shard": "-9223372036854775808",
        "seqno": 39064985
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {}
  }
  ```
</ResponseExample>
