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

API reference
Fetch specified block status and confidence if applicable

Fetch specified block status and confidence if applicable

Gets specified block status and confidence if applicable.

Use cases:

  • Polling the status of the block
  • Querying historical block statuses

Params:

  • block_number - block number (required)

Response:

  • status - block status
  • confidence - data availability confidence, available if block processing is finished.

Status

  • unavailable - block will not be processed if
    latest_block - sync_depth > block_number
  • pending - block will be processed at some point in the future if
    latest_block - sync_depth ≤ block_number ≤ latest_block
  • verifying-header - block processing is started, and the header finality is being checked
  • verifying-confidence - block header is verified and available, confidence is being checked
  • verifying-data - confidence is achieved, and data is being fetched and verified (if configured)
  • finished - block header is available, confidence is achieved, and data is available (if configured)

This status does not give information on what is available. In the case of web sockets messages are already pushed, similar to case of the frequent polling, so header and confidence will be available if verifying-header and verifying-confidence has been successful.

curl "https://api.lightclient.mainnet.avail.so/v2/blocks/672481"
Sample Response:
{
  "status":"verifying-data",
  "confidence":99.90234375
}

If block_number > latest_block, block status cannot yet be derived and the response on this and other endpoints with /v2/blocks/{block_number} prefix is:

Not Found