For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

0G — BeaconKit REST

API reference for 0G. All methods ->

GET /eth/v1/node/version​

Retrieves node version info.

Parameters​

None.

Request example​

curl https://rpc.ankr.com/premium-http/0g_mainnet_beaconkit/YOUR_ANKR_API_KEY/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/premium-http/0g_mainnet_beaconkit/YOUR_ANKR_API_KEY/eth/v2/debug/beacon/states/head

Response example​

Lists longer than eight entries (validators, balances, pending_partial_withdrawals and the nested amount lists) are cut to their first two entries in this example.

{
"version": "slashing",
"execution_optimistic": false,
"finalized": true,
"data": {
"genesis_validators_root": "0xc9029bb061e3a669b3b9d81213892f26d0d904d17853d60f79b9d51dfcbbf375",
"slot": "0x2b2bfc6",
"fork": {
"previous_version": "0x05020000",
"current_version": "0x05030000",
"epoch": "0x78b8"
},
"latest_block_header": {
"slot": "0x2b2bfc6",
"proposer_index": "0x3f",
"parent_block_root": "0x00b9ba72b40ed6312a65ab23515071020f97f245b8cf8b62821a1c7fb864cacf",
"state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"body_root": "0xa7399ce8edd20a668accc2a5d71d8b036af82623c42da4cbdb36c692d7f05c6f"
},
"block_roots": [
"0xe4f54ecfe3bbc66f14f955737186425ab9973ed9e493a4c5dffd2cdfde187adc",
"0xf30faf93972e0f9e9101783e950de00027bbe98d4fd6a6155f5b153f175f6e1e",
"0x83e876abaf108e2d86545ba96c4abdd2fdbc55fccfffa690de85b2c60d3ddf4c",
"0x1eb18a2efa974139d7a7bc516e0c93a6e7b3b7edf9b3d480d2698ff267101452",
"0xcf8cfe78d313d38c62321573d7b188cb6b6731112afb18e557e82f14af61698f",
"0x00b9ba72b40ed6312a65ab23515071020f97f245b8cf8b62821a1c7fb864cacf",
"0x6fb6cc886e05409576f0ecd9de028f989de341f1d3b31ecb85eb59a4745a83c9",
"0x300f543c70edb8e88876f6c8602a8622ad816edd88a4cb7a2bdd7555c7f412ce"
],
"state_roots": [
"0x6b01dff204bb6fcef67416aadd873a04819853508dea79da6004b52fca5c33c3",
"0xc225a460716a23c132a7267519dad805aba28673f1c5efe9e875f16aac95c9c7",
"0xcf5cfc0e50a29b50a9548a3b18c774e150f53e204ea1424e1f3d792d4632fe5f",
"0x4ee870a8ec182c8b35ecc94993da0559b457eb86d8017e4b5e5c6d48d411fa83",
"0x9f698fb5f61ce3ffd75a9e821f3355920043e8f30a0b2971f468c823fd34b590",
"0x716fb1cd1edb362a8a62eb43a06f374478e2aa7e45e2b020f9236e8f6de7001d",
"0x64da7a2f35914e4bbfc484f6da0c05fcfcfb1674c7a30435f96ab88e3c666e06",
"0xb65c24e231bd71ccabccc00457e5c43b5048455951660a8567f02754f35d99f6"
],
"eth1_data": {
"depositRoot": "0x058194953d307eb2de8ffda7c904aec890a1660a4457cfbdabc50bc7ea0f3e47",
"depositCount": "0x0",
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"eth1_deposit_index": 14707,
"latest_execution_payload_header": {
"parentHash": "0x50cd0fb0c26d52f5e194712ebcece7a74576dc0d5e73c32a74571d12eacb4e4e",
"feeRecipient": "0x6c1613A6FF01E52b9914C9FE2BE4Ae68d2fbEBf9",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"prevRandao": "0x0dc554186161c0a9d382617026c6aa9395d50b7cf40645c0471000ac03769e0f",
"blockNumber": "0x2b2bfc6",
"gasLimit": "0x2255100",
"gasUsed": "0x0",
"timestamp": "0x6ab639eb",
"extraData": "0xd883010f0b846765746888676f312e32332e30856c696e7578",
"baseFeePerGas": "7",
"blockHash": "0x813584668a33c8e752e9188e9a5f13aec69cf2bb4643aedda33dd3685c5f09a2",
"transactionsRoot": "0x7ffe241ea60187fdb0187bfa22de35d1f9bed7ab061d9401fd47e34a54fbede1",
"withdrawalsRoot": "0x82190c72424e5fd02741e94f3175c60ebbf0183e68e91779026fadd35fa5856e",
"blobGasUsed": "0x0",
"excessBlobGas": "0x0",
"slashedRoot": "0x792930bbd5baac43bcc798ee49aa8185ef76bb3b44ba62b91d86ae569e4bb535"
},
"validators": [
{
"pubkey": "0x846b2cdd85725c16a1e1931656bb41c266c9a1da795a75ff218b9380f5e6a6c9a6dd5cfacdbb6dc492d34b730f9386bc",
"withdrawalCredentials": "0x01000000000000000000000081568b27b210538869f5659035ebf506d2fc3384",
"effectiveBalance": "0xbe959a2dbeb600",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0x8a79b3b84014b7574e229e43ebc8b5fcde8bfb9a79082a000a023ddfc951c2c15d0cecc14cfe8498a3c9c671431d28f4",
"withdrawalCredentials": "0x0100000000000000000000008ee1af5b2791c7fa6065a02e4b579a9cc78388fb",
"effectiveBalance": "0xb861a930272600",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
}
],
"balances": [
51748128184402409,
50000827993698788
],
"randao_mixes": [
"0x179765848357a11ea0623a5968b7bb5e495df9b84a7c682ef32e2d39b9613d13",
"0xbdec5089239ee8b423fcde02ee39a0325101d83d2bf831fff336faeeffdc1b12",
"0xa9ce0d336264b89465e48d1b9a99ba986179def3d54c02cd3e489a99a2c3d50c",
"0x31e7bc9cfc63b18e325169555af333d9d1cce98481717ecdcd091d12053a675a",
"0xe77612173a94a465513f4143890fe9618cced18f0d596ac8be5789da4b993ddb",
"0x73569e56aecf9d0b30d8c3194bf0b1a9c775aeb96ef29c677a58ec54701ff930",
"0x02d68bd22e1174c5a069b34bfad051ec27e7961e3bbdf18b5397e1a022200131",
"0x1cd5443db76be9bd6f40ffe517c3350f3e3314ca9aded324f20cec9f524cfdb9"
],
"next_withdrawal_validator_index": "0xf",
"pending_partial_withdrawals": [
{
"ValidatorIndex": "0x0",
"Amount": "0x14ed7382c0",
"WithdrawableEpoch": "0x9365"
},
{
"ValidatorIndex": "0x3e",
"Amount": "0x482d71cdc1",
"WithdrawableEpoch": "0x9372"
}
],
"symbiotic_sync_height": 26053372,
"symbiotic_balances": [
[
{
"collateral": "0xe42215bd71e190b3864267569c2f66077260eae4",
"amount": [
0,
0
]
}
],
[
{
"collateral": "0xe42215bd71e190b3864267569c2f66077260eae4",
"amount": [
0,
0
]
}
],
[],
[
{
"collateral": "0xe42215bd71e190b3864267569c2f66077260eae4",
"amount": [
0,
0
]
}
]
],
"symbiotic_weights": [
{
"collateral": "0x2b38d351e3ad67b64a6bee5269c3a3fb4ca621f5",
"amount": [
0,
0
]
},
{
"collateral": "0x4c1dab3be86347977f3dfc4b9688224ef2272939",
"amount": [
0,
0
]
},
{
"collateral": "0xe42215bd71e190b3864267569c2f66077260eae4",
"amount": [
0,
0
]
}
],
"restaking_rewarders": [
"0x0100000000000000000000008163e79a5ade5a453e129f36b957fef15a3736b5",
"0x010000000000000000000000b3c5650c74100f96400a9d1ac71e9d0df324f567",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x01000000000000000000000073d346e827435b88e0bf46ed6efa7e09e546b388"
]
}
}