0G — Information, Transactions, ABCI, Methods
API reference for 0G. All methods ->
Information
blockchain
Retrieves block headers for
minHeight <= height <= maxHeight.
At most 20 items will return for the minHeight or maxHeight parameters specified. If maxHeight does not yet exist, the blocks up to the current height will return. If minHeight does not exist (pruning), the earliest existing height will be used.
Parameters
minHeight(integer): the minimum block height to return.maxHeight(integer): the maximum block height to return.
Returns
Block headers, in descending order (highest first).
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "blockchain",
"params": ["1", "2"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/blockchain?minHeight=1&maxHeight=2
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"last_height": "2564978",
"block_metas": [
{
"block_id": {
"hash": "ED3BF22DDEAABE5B194ECE00FC97B73B31D6B6E381946054ADF248FADA65FD4F",
"parts": {
"total": 1,
"hash": "268422F8D294840DBC5B24FB031F976357E8478F72C16B66E7B7388C2429D18F"
}
},
"block_size": "830",
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "2",
"time": "2024-06-24T07:25:41.380275895Z",
"last_block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"last_commit_hash": "5148301A7ABA311392D676C3C967F299F85A1AD48D74E96AF083DA4787FF9C2D",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "21181DF7C886CEE14012C07031E55BF04428BF77979015F2869ED1EACABAD22E",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "CDFF531A3AFA255BC193D52721027366935F9BF8"
},
"num_txs": "0"
},
{
"block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"block_size": "353",
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "1",
"time": "2024-06-24T07:24:31.526533772Z",
"last_block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD"
},
"num_txs": "0"
}
]
}
}
block
Retrieves a block at a specified height.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block is to be fetched.
Returns
Block information.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/blockchain?height=1
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "1",
"time": "2024-06-24T07:24:31.526533772Z",
"last_block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD"
},
"data": {
"txs": []
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "0",
"round": 0,
"block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"signatures": []
}
}
}
}
block_by_hash
Retrieves a block by hash.
Parameters
hash(string; required): the Base64-encoded block hash.
Returns
Block information.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_by_hash",
"params": {
"hash": "zNX/NZMiC0tZQVr5hlXJ9K/oIlcMzjVoXdXll630i0E="
},
"id": 1
}'
curl "https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/block_by_hash?hash=0xccd5ff3593220b4b59415af98655c9f4afe822570cce35685dd5e597adf48b41"
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "CCD5FF3593220B4B59415AF98655C9F4AFE822570CCE35685DD5E597ADF48B41",
"parts": {
"total": 1,
"hash": "24E75E2F1D225490E8890316E7E0C0D382579EF0BD8DB3DE4D41A4B92E9D9223"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "2564904",
"time": "2024-12-26T12:10:47.144809998Z",
"last_block_id": {
"hash": "994AA199E4DCDAD2F085FE4B41D20085A0ED12BE557E88D4D9566C314D5A3486",
"parts": {
"total": 1,
"hash": "EBF9742D10789704AC87037D05DC7F445E79DAE4AB01ACB80C99D18ED6D77D11"
}
},
"last_commit_hash": "2D35D340C71BD0ACDA481585236B717C98C31EDD9B7577CB4C40D23E2B16CE27",
"data_hash": "080CF08012B3EDE6D0C7D9092D2B6919EA7A74C6B1F78D3732A43ABBA17A4E2C",
"validators_hash": "50A4F72C26AE3EBF51D521B7BA99D263BBA2E1686CB1B710CD10EF3B81F70282",
"next_validators_hash": "50A4F72C26AE3EBF51D521B7BA99D263BBA2E1686CB1B710CD10EF3B81F70282",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "8F7D4C95F3F405A5274DA79833223A8AAA50A25DF68994324296DA3EBD66F0A2",
"last_results_hash": "865B5DC7B13DACE27EEFA0B4617F44946B2A3BEA44541E928859F002DCE466AF",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "CB78E69FD887112E9C3DBD9490B8A51A3EE4E318"
},
"data": {
"txs": [
"CssCCpcCCh8vZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4EvMBCqwBChovZXRoZXJtaW50LmV2bS52MS5MZWdhY3lUeBKNAQj/1QISAjIwGIikASIqMHg4Qjc1MmU4N2RjZTMwNjI2YTYwNjg3MzkxMWFlOGM2ODFiOUZDZTE1KgsxMDAwMDAwMDAwMDoCgdRCICKTguwyMeC0CnN5ejfXSYKT76jiJ7JyunyeFhz73HJsSiA/9hhgI3rQRu81GgjlJ5f9uTZ52PcMV22ed2S5IJlkexpCMHgyMzRmOGRkZmUxMGNhOGEyYmRhMDk2OThhN2VkODk0M2YzZmNiODNhYjgxZTE3NGNmYjg5MDg0Mzg3OTQyZWZl+j8uCiwvZXRoZXJtaW50LmV2bS52MS5FeHRlbnNpb25PcHRpb25zRXRoZXJldW1UeBIYEhYKEAoGbmV1cm9uEgY0MjAwMDAQiKQB, ..."
]
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "2564903",
"round": 0,
"block_id": {
"hash": "994AA199E4DCDAD2F085FE4B41D20085A0ED12BE557E88D4D9566C314D5A3486",
"parts": {
"total": 1,
"hash": "EBF9742D10789704AC87037D05DC7F445E79DAE4AB01ACB80C99D18ED6D77D11"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD",
"timestamp": "2024-12-26T12:10:47.182829723Z",
"signature": "tc9915ID/XmkBPg1R+aeew0MDkGLgpTpcpo8VqpYqq17RIdwkcQ5rlZxnJuIL9G0skmOrIIXrzri2EhsudW+AQ=="
}
]
}
}
}
}
block_results
Retrieves block results at a specified height.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block info is to be fetched.
Returns
Block results.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_results",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/block_results?height=1
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"height": "1",
"txs_results": null,
"begin_block_events": [
{
"type": "coin_received",
"attributes": [
{
"key": "receiver",
"value": "0g1m3h30wlvsf8llruxtpukdvsy0km2kum85yn938",
"index": true
},
{
"key": "amount",
"value": "38487598u0g",
"index": true
}
]
},
{
"type": "block_gas",
"attributes": [
{
"key": "height",
"value": "1",
"index": true
},
{
"key": "amount",
"value": "0",
"index": true
}
]
}
],
"validator_updates": null,
"consensus_param_updates": {
"block": {
"max_bytes": "200000",
"max_gas": "20000000"
},
"evidence": {
"max_age_num_blocks": "1000000",
"max_age_duration": "6000000000000000",
"max_bytes": "50000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}
commit
Retrieves commit results at a specified height.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be fetched.
Returns
Commit results. Canonical switches from false to true for block H once block H+1 has been committed, until then it's subjective and only reflects what this node has seen so far.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "commit",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/commit?height=1
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"signed_header": {
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "1",
"time": "2024-06-24T07:24:31.526533772Z",
"last_block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD"
},
"commit": {
"height": "1",
"round": 0,
"block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD",
"timestamp": "2024-06-24T07:25:41.481185893Z",
"signature": "VtIJZ4q7ooX/Bcy5uNojugXaWSxnW2K0hYcqHdZTAhFEURZFCuwqWYKpFCr2Tu95QQR9ROrCVVC9/3UNlPTYDQ=="
},
{
"block_id_flag": 1,
"validator_address": "",
"timestamp": "0001-01-01T00:00:00Z",
"signature": null
}
]
}
},
"canonical": true
}
}
validators
Retrieves a validator set at a specified height.
Validators are sorted by voting power.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the validator set corresponding to the latest block is to be fetched.page(integer; default: 1): a page number (1-based).per_page(integer; default: 30; max: 100): a number of entries per page.
Returns
Commit results.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "validators",
"params": ["1","1","30"],
"id": 1
}'
curl "https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/validators?height=1&page=1&per_page=30"
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_height": "1",
"validators": [
{
"address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "Cu7jYSsTcNgCfi4upLVfH1ak5OM7A4OEFHJiXQe6lR8="
},
"voting_power": "5000000",
"proposer_priority": "-15000000"
},
{
"address": "542977517E9B10F6D51792A92BCC5F5B9C1DC74A",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "sa0J8aTS4tscdWI0On+JEhWjs+szgH49i4jhzAcyh40="
},
"voting_power": "5000000",
"proposer_priority": "5000000"
},
{
"address": "CDFF531A3AFA255BC193D52721027366935F9BF8",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "kyAfOOxIQSLf2WXQLB8D3gqItZiOHiSeHGjfhhDtlyQ="
},
"voting_power": "5000000",
"proposer_priority": "5000000"
},
{
"address": "FAD365F3FF137C1F70CBA4E3B3E61F4EFD2CDF02",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ZJGhAhqDwuq1MUsUqT32mGnjlqtjlH7MHzOv8ezK7cg="
},
"voting_power": "5000000",
"proposer_priority": "5000000"
}
],
"count": "4",
"total": "4"
}
}
genesis_chunked
Retrieves Genesis in multiple chunks.
Gets genesis document in multiple chunks to make it easier to iterate through larger genesis structures. Each chunk is produced by converting the genesis document to JSON and then splitting the resulting payload into 16MB blocks, and then Base64-encoding each block.
Parameters
chunk(integer; default: 0): a sequence number of the chunk to download.
Returns
A Genesis chunk response.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "genesis_chunked",
"params": ["0"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/genesis_chunked?chunk=0
Response example
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"chunk": "0",
"total": "1",
"data": "eyJnZW5lc2lzX3RpbWUiOiIyMDI0LTA2LTI0VDA3OjI0OjMxLjUyNjUzMzc3MloiLCJjaGFpbl9pZCI6InpndGVuZGVybWludF8xNjYwMC0yIiwiaW5pdGlhbF9oZWlnaHQiOiIxIiwiY29uc2Vuc3VzX3BhcmFtcyI6eyJibG9jayI6eyJtYXhfYnl0ZXMiOiIyMjAyMD..."
}
}
dump_consensus_state
Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
Parameters
None.
Returns
A complete consensus state. See the Vote string description.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "dump_consensus_state",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/dump_consensus_state
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"round_state": {
"height": "13211550",
"round": 0,
"step": 1,
"start_time": "2024-12-23T13:24:44.738595111Z",
"commit_time": "2024-12-23T13:24:39.738595111Z",
"validators": {
"validators": [
{
"address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "GFeC1pZ7fslcucbIsx44x9c0MPeJlLRb+WGG/wGflbw="
},
"voting_power": "21656144",
"proposer_priority": "-52387076"
}
],
"proposer": {
"address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "GFeC1pZ7fslcucbIsx44x9c0MPeJlLRb+WGG/wGflbw="
},
"voting_power": "21656144",
"proposer_priority": "-52387076"
}
},
"proposal": null,
"proposal_block": null,
"proposal_block_parts": null,
"locked_round": -1,
"locked_block": null,
"locked_block_parts": null,
"valid_round": -1,
"valid_block": null,
"valid_block_parts": null,
"votes": [
{
"round": 0,
"prevotes": [
"nil-Vote",
"nil-Vote"
],
"prevotes_bit_array": "BA{88:________________________________________________________________________________________} 0/117388861 = 0.00",
"precommits": [
"nil-Vote",
"nil-Vote"
],
"precommits_bit_array": "BA{88:________________________________________________________________________________________} 0/117388861 = 0.00"
}
],
"commit_round": -1,
"last_commit": {
"votes": [
"Vote{0:279EAD5DD43F 13211549/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 2F31A8E1F581 8B6CEAA65010 @ 2024-12-23T13:24:39.500074271Z}",
"Vote{1:BD417EAD7FF9 13211549/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 2F31A8E1F581 31E4D1FFA299 @ 2024-12-23T13:24:39.553047425Z}"
],
"votes_bit_array": "BA{88:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} 117388861/117388861 = 1.00",
"peer_maj_23s": {}
},
"last_validators": {
"validators": [
{
"address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "GFeC1pZ7fslcucbIsx44x9c0MPeJlLRb+WGG/wGflbw="
},
"voting_power": "21656144",
"proposer_priority": "43345641"
}
],
"proposer": {
"address": "5AA4440350230D5BB8CDFE6A5726656B4FC7DC6E",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "BM16Wru6ELaZXCyKZAH5WGxg5YiMYw2WlcpBnfdbnQg="
},
"voting_power": "162210",
"proposer_priority": "-63939004"
}
},
"triggered_timeout_precommit": false
},
"peers": [
{
"node_address": "f8d5e677f1f68f8bd798752595371817f61dc532@178.128.156.131:26656",
"peer_state": {
"round_state": {
"height": "13211550",
"round": 0,
"step": 1,
"start_time": "2024-12-23T13:24:43.982077345Z",
"proposal": false,
"proposal_block_part_set_header": {
"total": 0,
"hash": ""
},
"proposal_block_parts": null,
"proposal_pol_round": -1,
"proposal_pol": "________________________________________________________________________________________",
"prevotes": "________________________________________________________________________________________",
"precommits": "________________________________________________________________________________________",
"last_commit_round": 0,
"last_commit": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"catchup_commit_round": -1,
"catchup_commit": "________________________________________________________________________________________"
},
"stats": {
"votes": "14173",
"block_parts": "45"
}
}
}
]
}
}
consensus_state
Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
Parameters
None.
Returns
Consensus state results.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_state",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/consensus_state
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"round_state": {
"height/round/step": "13213043/0/6",
"start_time": "2024-12-23T15:53:01.989949876Z",
"proposal_block_hash": "78CB001605FE99454B82944CB47D65D093629DDD38454260E7B7980874A6A5D7",
"locked_block_hash": "78CB001605FE99454B82944CB47D65D093629DDD38454260E7B7980874A6A5D7",
"valid_block_hash": "78CB001605FE99454B82944CB47D65D093629DDD38454260E7B7980874A6A5D7",
"height_vote_set": [
{
"round": 0,
"prevotes": [
"Vote{0:279EAD5DD43F 13213043/00/SIGNED_MSG_TYPE_PREVOTE(Prevote) 78CB001605FE 619E4C697B2C @ 2024-12-23T15:53:02.160332603Z}",
"Vote{1:BD417EAD7FF9 13213043/00/SIGNED_MSG_TYPE_PREVOTE(Prevote) 78CB001605FE 82F0E2036082 @ 2024-12-23T15:53:02.374084828Z}"
],
"prevotes_bit_array": "BA{88:xxxxxxxxxx__xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxx_xxxxxxxxxxxxxxx} 110520639/117416870 = 0.94",
"precommits": [
"Vote{0:279EAD5DD43F 13213043/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 78CB001605FE 92F18B4F01EA @ 2024-12-23T15:53:02.551832113Z}",
"nil-Vote",
"Vote{2:BFA6235D9556 13213043/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 78CB001605FE 0FB040BC54A6 @ 2024-12-23T15:53:02.563127503Z}",
"nil-Vote"
],
"precommits_bit_array": "BA{88:x_x_x________x_x__x_xx____x__xxxx___x_xx_xx_xxx_xxx__x___xxx__xx_xxx__x___x___xx___xxxx_} 52462972/117416870 = 0.45"
},
{
"round": 1,
"prevotes": [
"nil-Vote",
"nil-Vote"
],
"prevotes_bit_array": "BA{88:________________________________________________________________________________________} 0/117416870 = 0.00",
"precommits": [
"nil-Vote",
"nil-Vote"
],
"precommits_bit_array": "BA{88:________________________________________________________________________________________} 0/117416870 = 0.00"
}
],
"proposer": {
"address": "026D3C349592A1A1D6534744106D7B0453E3C565",
"index": 29
}
}
}
}
consensus_params
Retrieves consensus parameters.
Parameters
height(integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be returned.
Returns
Consensus parameters results.
Request parameters
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_params",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/consensus_params?height=1
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_height": "1",
"consensus_params": {
"block": {
"max_bytes": "200000",
"max_gas": "20000000"
},
"evidence": {
"max_age_num_blocks": "1000000",
"max_age_duration": "6000000000000000",
"max_bytes": "50000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {
"app": "0"
}
}
}
}
unconfirmed_txs
Retrieves the list of unconfirmed transactions.
Parameters
limit(integer; default: 30; max: 100): the maximum number of unconfirmed transactions to return.
Returns
The list of unconfirmed transactions.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "unconfirmed_txs",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/unconfirmed_txs?limit=1
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"n_txs": "2",
"total": "4",
"total_bytes": "2012",
"txs": [
"CoYBCoMBCiQva2F2YS5wcmljZWZlZWQudjFiZXRhMS5Nc2dQb3N0UHJpY2USWwora2F2YTE5cmprNXFtbXd5d256ZmNjd3p5bjAyanl3Z3B3anFmNjBhZmo5MhILdXNkeDp1c2Q6MzAaEjcxODkzMDAwMDAwMDAwMDA2OSILCPHVsLsGEMCO5TcSagpSCkYKHy9jb3Ntb3MuY3J5cHRvLnNlY3AyNTZrMS5QdWJLZXkSIwohA31VSgUTeXh1kcCYwNrx04+4ItSC8M6wuKV96JLq9G0pEgQKAggBGJHBFxIUCg4KBXVrYXZhEgU1MDAwMBDwkwkaQKvIEvEmlpm5Xuw9on+NLx53kPmvw3QI2Fic1/IDowITWeN8bbGHdomSC1cdnrtZ8rxaBUnfpLM7Yisnk4cqcl4=",
"CoQBCoEBCiQva2F2YS5wcmljZWZlZWQudjFiZXRhMS5Nc2dQb3N0UHJpY2USWQora2F2YTF1ZWFrN256ZXNtM3BuZXY2bG5ncDZsZ2swcnkwMmRqejhwanBjZxIIdXNkeDp1c2QaEjczMzg5OTk5OTk5OTk5OTk5NyIMCLSAp7sGEMCR+NQCEmkKUgpGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQJh+Rd6tFqIDMHzDY2LUqIfd6iQjaxEk7kCf/PggVVILxIECgIIARj78XASEwoNCgV1a2F2YRIENTAwMBDwkwkaQNH1d9rV6P0l8EktESQ6pSg1htx5I8FNNit3kfg/bOXqJ0c5PxTgBfeitv167yLxWxyXBWaJueQGMVh8KOHi1W0="
]
}
}
num_unconfirmed_txs
Retrieves data on unconfirmed transactions.
Parameters
None.
Returns
The status of unconfirmed transactions.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "num_unconfirmed_txs",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/num_unconfirmed_txs
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"n_txs": "0",
"total": "0",
"total_bytes": "0",
"txs": null
}
}
tx_search
Searches for transactions with their results.
Parameters
query(string; required): query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r()"'=>< are not allowed). operation can be=,<,<=,>,>=,CONTAINS. An operand can be a string (escaped with single quotes), number, date, or time.prove(boolean; default: false): adds proofs of the transactions inclusion in the block.page(integer; default: 1): a page number (1-based).per_page(integer; default: 30, max: 100): a number of entries per page.order_by(string; default: asc): the order in which transactions are sorted (ascordesc), by height & index. If empty, default sorting still applies.match_events(boolean; default: false): match attributes in query within events, in addition to the height and txhash.
Returns
The list of unconfirmed transactions.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx_search",
"params": {
"query": "tx.height=13225811",
"prove": true,
"page": "1",
"per_page": "5",
"order_by": "desc"
},
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/tx_search?query=tx.height%3D13225811&prove=true&page=1&per_page=5&order_by=desc
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"txs": [],
"total_count": "0"
}
}
block_search
Searches for blocks by
BeginBlockandEndBlockevents.
Parameters
query(string; required): query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r()"'=>< are not allowed). operation can be=,<,<=,>,>=,CONTAINS. An operand can be a string (escaped with single quotes), number, date, or time.page(integer; default: 1): a page number (1-based).per_page(integer; default: 30, max: 100): a number of entries per page.order_by(string; default: asc): the order in which transactions are sorted (ascordesc), by height & index. If empty, default sorting still applies.match_events(boolean; default: false): match attributes in query within events, in addition to the height.
Returns
The list of paginated blocks matching the search criteria.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_search",
"params": {
"query": "block.height=13225811",
"page": "1",
"per_page": "10",
"order_by": "desc"
},
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/block_search?query=block.height%3D13225811&page=1&per_page=10&order_by=desc
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blocks": [
{
"block_id": {
"hash": "F054E236608C0E65DFE9231F9332D7F54F1A282D4C2C3DA6B35FAED5D4EE9169",
"parts": {
"total": 1,
"hash": "4F02FC67A8503D1D5428EE6D1209FC5BC1BB67382DBDB53F38C3FD0783B2FC8A"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "0g_2222-10",
"height": "13225811",
"time": "2024-12-24T12:58:00.512093988Z",
"last_block_id": {
"hash": "304F208093FA799825FA221EB9B517B73A0879E6D9B971DD28FDF96F564EEC7C",
"parts": {
"total": 1,
"hash": "4158FCF92A13A2A5F8D466BD0189EB466DDD5D1FCA7ACF0E40069A8A0B775792"
}
},
"last_commit_hash": "CCFD88F120E554844A8DED71E1DAF3FA8089B1D7CFDC276917C8A5E34FDE6DBD",
"data_hash": "2E1EC915F83863741270A49157E2787F5F34F3B0E2E67BB1527368F8BA05D1CD",
"validators_hash": "7C3AABDFAA6A53BF1C63DC025201337CA9CB3F7DE8A51EA0C54B2CEBDCEF6E39",
"next_validators_hash": "7C3AABDFAA6A53BF1C63DC025201337CA9CB3F7DE8A51EA0C54B2CEBDCEF6E39",
"consensus_hash": "AD82B220C509602720D74FD75BCE7CFE9B148039958F236D8894E00EB1599E04",
"app_hash": "2AA5FE48061351DF5DD4F79C25A902466C31975199BEE286FE294273DB4FBF4A",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07"
},
"data": {
"txs": [
"CrIHCv4GCh8vZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4EtoGCpMGChovZXRoZXJtaW50LmV2bS52MS5MZWdhY3lUeBL0BQiXvhMSDDEwMTAwMDAwMDAwMBjJ9hgiKjB4ODE1ZjI3QTU2MTcxMUE2QjA0YmNFM0FhNjVjNUQ5QTE5NDVBNWVFQioBMDLkBHgmYbwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGdqr9oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA..."
]
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "13225810",
"round": 0,
"block_id": {
"hash": "304F208093FA799825FA221EB9B517B73A0879E6D9B971DD28FDF96F564EEC7C",
"parts": {
"total": 1,
"hash": "4158FCF92A13A2A5F8D466BD0189EB466DDD5D1FCA7ACF0E40069A8A0B775792"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"timestamp": "2024-12-24T12:58:00.458392974Z",
"signature": "LU+rS0/HPXczwL9jxzAWYHSck0ORgzD9MGLXx6POcKO2XpNnHRG8/QsxDSs4Ouy3hO9AAiG0RNUWBrVlgjlpBg=="
}
]
}
}
}
],
"total_count": "1"
}
}
tx
Retrieves a transaction by hash.
Parameters
hash(string; required): a hash of a transaction to retrieve.prove(boolean; default: false): adds proofs of the transaction's inclusion in the block.
Returns
Transaction info.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx",
"params": ["4B6D8FEA3786BFC6152EAEA791C4DAF00C41E93DAD56A7230B565179CD29CAA1", true],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/tx?hash=4B6D8FEA3786BFC6152EAEA791C4DAF00C41E93DAD56A7230B565179CD29CAA1&prove=true
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "4B6D8FEA3786BFC6152EAEA791C4DAF00C41E93DAD56A7230B565179CD29CAA1",
"height": "12345",
"index": 2,
"tx_result": {
"code": 0,
"log": "Success",
"events": [
{
"type": "transfer",
"attributes": [
{ "key": "sender", "value": "0g1xyz..." },
{ "key": "recipient", "value": "0g1abc..." },
{ "key": "amount", "value": "10000u0g" }
]
}
]
},
"tx": "BASE64_ENCODED_TX", // The transaction itself in Base64 format
"proof": {
"root_hash": "0xABC123...",
"data": "BASE64_ENCODED_PROOF",
"proof": { /* Detailed proof structure */ }
}
}
}
Transactions
broadcast_tx_sync
Returns with the response from
CheckTx. Does not wait forDeliverTxresult.
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSON-RPC via a websocket. See https://docs.cometbft.com/v0.34/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
- A malicious node drops or pretends it has committed your tx.
- A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
Please refer to Tendermint docs for formatting/encoding rules.
Parameters
tx(string; required): the signed transaction, encoded as Base64.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_sync",
"params": ["<BASE64_ENCODED_TRANSACTION>"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/broadcast_tx_sync?tx=<BASE64_ENCODED_TRANSACTION>
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": 0,
"data": "",
"log": "transaction successfully broadcasted",
"hash": "0xABC123..." // The transaction hash
}
}
broadcast_tx_async
Returns right away, with no response. Does not wait for
CheckTxnorDeliverTxresults.
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSON-RPC via a websocket. See https://docs.cometbft.com/v0.34/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
- A malicious node drops or pretends it has committed your tx.
- A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
- A node is offline.
Please refer to CometBFT docs for formatting/encoding rules.
Parameters
tx(string; required): the Base64-encoded signed transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_async",
"params": ["<BASE64_ENCODED_TRANSACTION>"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/broadcast_tx_async?tx=<BASE64_ENCODED_TRANSACTION>
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": 0,
"data": "",
"log": "",
"hash": "0xABC123..." // Transaction hash
}
}
broadcast_tx_commit
Returns with the responses from
CheckTxandDeliverTx.
Use only for testing and development. In production, use BroadcastTxSync or BroadcastTxAsync. You can subscribe for the transaction result using JSON-RPC via a websocket (see CometBFT docs).
CONTRACT: only returns error if mempool.CheckTx() errs or if we timeout waiting for tx to commit.
If CheckTx or DeliverTx fails, no error will be returned, but the result will contain a non-OK ABCI code.
Please refer to CometBFT docs for formatting/encoding rules.
Parameters
tx(string; required): the Base64-encoded signed transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_commit",
"params": ["<BASE64_ENCODED_TRANSACTION>"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/broadcast_tx_commit?tx=<BASE64_ENCODED_TRANSACTION>
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"check_tx": {
"code": 0,
"data": "",
"log": "Transaction checked successfully"
},
"deliver_tx": {
"code": 0,
"data": "",
"log": "Transaction delivered successfully",
"events": [
{
"type": "transfer",
"attributes": [
{ "key": "sender", "value": "0g1xyz..." },
{ "key": "recipient", "value": "0g1abc..." },
{ "key": "amount", "value": "10000u0g" }
]
}
]
},
"hash": "0xABC123...",
"height": "12345"
}
}
check_tx
Checks the transaction without executing it.
The transaction won't be added to the mempool.
Please refer to CometBFT docs for formatting/encoding rules.
Parameters
tx(string; required): the Base64-encoded signed transaction.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "check_tx",
"params": ["<BASE64_ENCODED_TRANSACTION>"],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/check_tx?tx=<BASE64_ENCODED_TRANSACTION>
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": 0,
"data": "",
"log": "Transaction is valid",
"events": [
{
"type": "transfer",
"attributes": [
{ "key": "sender", "value": "0g1xyz..." },
{ "key": "recipient", "value": "0g1abc..." },
{ "key": "amount", "value": "10000u0g" }
]
}
]
}
}
ABCI
abci_info
Retrieves application info.
Parameters
None.
Returns
Application info.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_info",
"params": [],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/abci_info
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"response": {
"data": "0g",
"version": "0.27.0",
"app_version": "8",
"last_block_height": "13239641",
"last_block_app_hash": "wLirVXfBEeq0jZcrshBGWS7AGN19N7p8aQqMAiaIl+I="
}
}
}
abci_query
Queries the application for particular information.
Parameters
path(string; required): a path to the data ("/a/b/c").data(string; required): the hex-encoded data.height(integer; default: 0): the height (0 means latest).prove(boolean; default: false): adds proofs of the transactions inclusion in the block.
Returns
Particular info according to the query submitted.
Request example
- JSON-RPC
- REST
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_query",
"params": ["a/b/c", "the_data", "1", true],
"id": 1
}'
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/blockchain?path=%2Fa%2Fb%2Fc&data=the_data&height=1&prove=true
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"response": {
"code": 0,
"log": "",
"info": "",
"index": -1,
"key": "0x6b61766131387879377a...",
"value": "0x123456789abcdef", // Hex-encoded value
"proofOps": null,
"height": "12345",
"codespace": ""
}
}
}
GET /eth/v1/node/version
Retrieves node version info.
Parameters
None.
Request example
curl https://rpc.ankr.com/http/0g_galileo_testnet_beaconkit/eth/v1/node/version
Response example
{
"data": {
"version": "1.1.0"
}
}
GET /eth/v2/debug/beacon/states/{state_id}
Retrieves debug info.
Returns a quantity of debug information, including the following:
- Validator root.
- Latest beacon and execution chain block headers.
- Various root hashes.
- The node's understanding of the validator set voting power, slashing status.
Parameters
state_id(string, hex; path): ID for the state to query. Can be one of the following:- A block root (32-byte hex string, e.g., 0xabc123...).
- A state root (32-byte hex string).
- A block ID alias such as:
head– the latest known state.genesis– the genesis state.finalized– the latest finalized state.justified– the latest justified state.
Request example
curl https://rpc.ankr.com/http/0g_galileo_testnet_beaconkit/eth/v2/debug/beacon/states/head
Response example
{
"version": "electra",
"execution_optimistic": false,
"finalized": true,
"data": {
"genesis_validators_root": "0xc22d6f6c6672c738e5696fa0e43c0aa0acf25ec09bd301b68036d61eb79c2daf",
"slot": "0x1c3b08",
"fork": {
"previous_version": "0x05000000",
"current_version": "0x05000000",
"epoch": "0x0"
},
"latest_block_header": {
"slot": "0x1c3b08",
"proposer_index": "0x0",
"parent_block_root": "0x7ce89c85094fa830a5cf6649621000400d3a882240fa222ddd0f021f0bcbb42a",
"state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"body_root": "0xa8e552f88c09ff0f7394b82041ab25a712cbe73d9e646190ac5330d50073d21f"
},
"block_roots": [
"0x2f3a417b224d5262596c7d4dfa696abaf3800ccf7593cc749952f88e3948c7cd",
"0x7f40aa67f38b9eb7dc36a9dd5f6cdf6a3e9a94a206084240f81345100708290f",
"0xa703243bff9736a2154d4fbb158bfc0317a8c52af58516ae6844a17d497d739d",
"0x0d9701998fbf960cebe13cdb89647595334db848c2a326bd39cce67815e42adb",
"0x6a705f37d7fccfe3b7ae202bd22840c3c70f7138a366f3506fa533da4f26dea7",
"0x7bc0ea29114f8a334cf28eb1de33443de5214810fbe5c5b49a07d4878c5342ff",
"0xf3875ec20169e7f48c576a7076ab04a4dac25c15a7c80c721defcc10851af802",
"0x7ce89c85094fa830a5cf6649621000400d3a882240fa222ddd0f021f0bcbb42a"
],
"state_roots": [
"0xde5cf944fec524820e3d4d9174ca5b42855ebb9ad89104d92bc5001c4a9b9e32",
"0xac2e45403552d2b2372950fea027f0c826b4d09b8af1bafba14be45347b1e69a",
"0x5a5663ca9e37572174e5957e1260c221aca96384a3b441de8491de58afd6e44f",
"0x593206fbb5b8f1ae140c4041d8ab865cb5afb7fccc7da019ce2834ce9f11bb0a",
"0x39262683ed866217509ec6bd75b655c8380b42874d8b1d1eb5c40ead206ef700",
"0x5dc2e2b8c9f04cea3e5574aefca4365d2a920d90c9cdad3eb4d5adee26fec217",
"0x8a048f206b906dddb5c0144e2d6248b32ed5e593ef1494f9d0e9141a19cc5862",
"0x6cede03f993b5ee611cea35969a54f655693f8004fba4ab7e3740ffd5d1b9cbc"
],
"eth1_data": {
"depositRoot": "0xa14b8fd2b3468db5bc151c63cf07b85bf774bfa94cc45e4bd4c7d5f450888a79",
"depositCount": "0x0",
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"eth1_deposit_index": 7,
"latest_execution_payload_header": {
"parentHash": "0x812d076cc7ea828fbb4a93a23db0b68e0e952ced2e56eaaadff43a48e1ca2337",
"feeRecipient": "0x0000000000000000000000000000000000000001",
"stateRoot": "0x115cfcd4e912feb47ca34a490b02f1a71fea4dd402893ed62385bc0688d1f26a",
"receiptsRoot": "0xc1e4e11c4d71733acebe11c2ea4c179267e56838eefbec0cd2609500010f66bd",
"logsBloom": "0x1201000014800000100006808228400420c010020100800102000110400020104300c0004008010000100004010000092010691000202040020140000028800000002040080000094888010804000800400040800400050002080000000000c030022800024100020800000020040c0200080100000c8008010880308408002000000010000420020020040b02840000900080021100040a00041110200004000e001210009026000b0a100000040004113020200801000944220000440440100408200640000401200004000200000004000002f4100200922000080101280080d80c0880048400000000001c00000020a0200008280040002000084000c001",
"prevRandao": "0x73ca1a22bd4c673a6a320736f17e462c01f024303d6b74bd7dadd78296500348",
"blockNumber": "0x1c3b08",
"gasLimit": "0x2255100",
"gasUsed": "0x4f71d5",
"timestamp": "0x6848429c",
"extraData": "0xd883010f0b846765746888676f312e32332e38856c696e7578",
"baseFeePerGas": "9",
"blockHash": "0xf43ec3c5eb64cb5c205af34fc90675117f6ad9ed1b8453220e77d7d424a2952e",
"transactionsRoot": "0xb6577e8b117a399b7ef1a8b25080c4601f01cd9ccc5bd2fc02388ef4deb37d73",
"withdrawalsRoot": "0x0145cc91e1ba724070abab6da58080fc905c13e071e17882988043e70efe0988",
"blobGasUsed": "0x0",
"excessBlobGas": "0x0"
},
"validators": [
{
"pubkey": "0xa21978649e2dca81ff5b5a9c1206ff28d86f55debf3cf0e47ed0354a168ffcdbf14ed556ad4e9260b9bdd6b0f01907a9",
"withdrawalCredentials": "0x01000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c",
"effectiveBalance": "0x1fe5d61a000",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0xa68a786ea4c5b0d5b327a91d7eab6c07e69c58d301f86bc3e39991d124c7d7638efa1964089ac5d81f9f7f151a86eebf",
"withdrawalCredentials": "0x01000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c",
"effectiveBalance": "0x773594000",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0x975d7a0569f6dd5560fa5054690d87f48fd99026f2336f9666f47d2c74a22611d1158d0ec3feb3511331ec4ef714f608",
"withdrawalCredentials": "0x01000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c",
"effectiveBalance": "0x773594000",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0x94f8722acefe3b6d2de811a64cb4f93209bba50bb3613eaeab1d720ae09c7313c29f7de71a8718d351983c9c0c48ad09",
"withdrawalCredentials": "0x010000000000000000000000565e66aa2bcb27116937983f2f208efabf620ab2",
"effectiveBalance": "0xee6b28000",
"slashed": false,
"activationEligibilityEpoch": "0x4308",
"activationEpoch": "0x4309",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
}
],
"balances": [
2192000000000,
32000000000,
32000000000,
64000000000
],
"randao_mixes": [
"0xf3dadd64aafe134e583f639ab5b9fc650a7f0d008789b867ecb05b68e0037e2a",
"0x0570972fa2cb1548eb6d3b5161d638708d89b3cf49d88727b7dd7721141325c0",
"0x6761890246fa48731c333166236dd4bca041ad5ba491abf299bd94ee84faa551",
"0x995cb20d32dca378b4e09f625575141ae1bac9276982971b6402dfd9bc985928",
"0x995cb20d32dca378b4e09f625575141ae1bac9276982971b6402dfd9bc985928",
"0x5784db6dd330eaeb0215c5de57eef097cac679458038aac95a4c6d4b2d247590",
"0x7890bf970c57a80a27f1ad9e2425e9b80f5cbbb7ac1f8e3a17bbd1fd2dafadf2",
"0x6ec60f8c3be68f54efe87f84c48a8474039d30922674ca1d9043eb9205eeb0df"
],
"next_withdrawal_validator_index": "0x1"
}
}