> ## 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.

# getMasterchainInfo

> Gets the latest TON masterchain state.

### 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="getMasterchainInfo" required>
  JSON-RPC method name.
</ParamField>

This method does not require any parameters.

### Returns

<ResponseField name="result" type="object">
  TON masterchain state response.

  <Expandable title="properties">
    <ResponseField name="@type" type="string" />

    <ResponseField name="last" 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="state_root_hash" type="string" />

    <ResponseField name="init" 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="@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": "getMasterchainInfo",
      "params": []
    }'
  ```
</RequestExample>

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