curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/getMasterchainInfo
{
"last": {
"seqno": 123,
"shard": "<string>",
"workchain": 123,
"fileHash": "<string>",
"rootHash": "<string>"
},
"init": {
"fileHash": "<string>",
"rootHash": "<string>"
},
"stateRootHash": "<string>",
"version": 123
}
curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/getMasterchainInfo
{
"last": {
"seqno": 123,
"shard": "<string>",
"workchain": 123,
"fileHash": "<string>",
"rootHash": "<string>"
},
"init": {
"fileHash": "<string>",
"rootHash": "<string>"
},
"stateRootHash": "<string>",
"version": 123
}
getMasterchainInfo
method retrieves information about the current state of the TON masterchain. This method provides crucial details about the latest masterchain block and the initial state of the masterchain.
curl -X POST \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getMasterchainInfo",
"params": {}
}'
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 identifier 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.version
(integer) — The version of the masterchain.getMasterchainInfo
method in TON is for applications that need to monitor or sync with the current state of the TON blockchain. This method can be used to:
Information about the current state of the TON masterchain
The response is of type object
.
Was this page helpful?