All phases of Avail's unification drop have now ended, 👉👉 check out this page 👈👈 for more information.

API reference
Fetch the header for a specifc block if available

Fetch the header for a specifc block if available

Gets the header for a specifc block if available.

Params:

  • block_number - block number (required)

Response:

If block_status = "verifying-confidence|verifying-data|finished", the header is available, and the response is:

HTTP/1.1 200 OK
Content-Type: application/json
 
{
  "hash": "{hash}",
  "parent_hash": "{parent-hash}",
  "number": {number},
  "state_root": "{state-root}",
  "extrinsics_root": "{extrinsics-root}",
  "extension": {
    "rows": {rows},
    "cols": {cols},
    "data_root": "{data-root}", // Optional
    "commitments": [
      "{commitment}", ...
    ],
    "app_lookup": {
      "size": {size},
      "index": [
        {
          "app_id": {app-id},
          "start": {start}
        }
      ]
    }
  }
}

If block_status = "unavailable|pending|verifying-header", header is not available and response is:

HTTP/1.1 400 Bad Request
curl "https://api.lightclient.mainnet.avail.so/v2/blocks/592445/header"