masterchainInfo | TON v3

Retrieves information about the current state of the masterchain

The masterchainInfo endpoint retrieves information about the current state of the masterchain in the TON blockchain. This includes details about the last masterchain block, the initial masterchain block, and the current state root hash.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

This endpoint doesn't require any parameters.

Response

  • last (object) — Information about the last masterchain block:
    • seqno (integer) — The sequence number of the last masterchain block.
    • shard (string) — The shard identifier of the last masterchain block.
    • workchain (integer) — The workchain ID of the last masterchain block.
    • fileHash (string) — The file hash of the last masterchain block.
    • rootHash (string) — The root hash of the last masterchain block.
  • init (object) — Information about the initial masterchain block:
    • fileHash (string) — The file hash of the initial masterchain block.
    • rootHash (string) — The root hash of the initial masterchain block.
  • stateRootHash (string) — The state root hash of the masterchain.
  • now (integer) — The current timestamp.

Use case

The masterchainInfo endpoint is crucial for applications that need to stay synchronized with the current state of the TON blockchain. Some common use cases include:

  1. Block explorers: To display the latest block information and blockchain statistics.
  2. Wallet applications: To ensure that transactions are being processed against the most recent blockchain state.
  3. DApps: To verify the current state of the blockchain before executing smart contracts or transactions.
  4. Monitoring tools: To track the progress and health of the TON network.
  5. Synchronization services: To help light clients or other services stay up-to-date with the latest masterchain state.

By using this endpoint, developers can easily access critical information about the current state of the TON masterchain, enabling them to build robust and reliable applications that interact with the TON blockchain.

Language
Click Try It! to start a request and see the response here!