getMasterchainInfo
TON / https://triport.io/rpc/ton
Minimum tier: Free
Last updated:
getMasterchainInfo calls liteServer.getMasterchainInfo and returns the
selected server's current masterchain reference. The result includes the latest
full block ID, its state root hash, and the zero-state block ID.
Use it to obtain a starting block reference for getBlock, getBlockHeader,
or a nearby lookupBlock request. The last.seqno value is the selected
liteserver's view of the head; it is not a transaction logical time.
Successful responses pass the TON freshness gate before they are served. This
is a current-head method and does not establish that the same liteserver retains
every block between the returned init and last references.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| result | MasterchainInfo |
Examples
curl https://triport.io/rpc/ton \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"jsonrpc":"2.0","id":1,"method":"getMasterchainInfo","params":[]}'const res = await fetch("https://triport.io/rpc/ton", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "getMasterchainInfo",
"params": []
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/rpc/ton",
headers={"Authorization": "Bearer <api-key>"},
json={"jsonrpc":"2.0","id":1,"method":"getMasterchainInfo","params":[]},
)
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Chain: TON.
- Clusters: mainnet.
- Credit cost: 1 per call.
FAQ
- What does getMasterchainInfo do?
- Returns the current masterchain block, state root, and zero-state reference.
- How many credits does getMasterchainInfo cost?
- getMasterchainInfo costs 1 credit(s) per call on Triport by default.
- Is getMasterchainInfo available over WebSocket?
- getMasterchainInfo is an HTTP JSON-RPC method.