GET v0/header
Gets the header of a block
This endpoint will return the block header from the designated Celestia network. A valid API key is required to access this endpoint. The header contains information about the block, such as its version, time, and hashes of various components.
Request
curl \
-H 'Authorization: Bearer <YOUR API KEY>' \
'https://t.tech/v0/header'package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://t.tech/v0/header"
apiKey := "Your API Key" // Replace with your actual token
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response body:", err)
return
}
fmt.Println("Status:", resp.Status)
fmt.Println("Response:", string(body))
}// Cargo.toml dependencies:
// [dependencies]
// reqwest = { version = "0.12" }
// tokio = { version = "1.46", features = ["macros", "rt-multi-thread"] }
use reqwest::{Client, header};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let url = "https://t.tech/v0/header";
let api_key = "Your API Key"; // Replace with your actual token
let res = client
.get(url)
.bearer_auth(api_key)
.send()
.await?;
let status = res.status();
let body = res.text().await?;
println!("Status: {}", status);
println!("Response: {}", body);
Ok(())
}Query Parameters
networkThe Celestia network to which the data blob should be posted. Can be either mainnet or mocha-4. Defaults to
mainnet if no value is specified. Read more about networks on the Celestia Docs
here.
heightThe height of the block for which to retrieve the header. If not specified, the latest block header will be returned.
Response
dah — JSON objectData Availability Header
columnRoots — array<base64 encoded string>Commitments to all erasure-coded data
rowRoots — array<base64 encoded string>Commitments to all erasure-coded data
header — JSON objectTop level object containing the block header information.
appHash — hexadecimal stringThe hash of the application in the block.
chainId — stringThe ID of the Celestia chain.
consensusHash — hexadecimal stringThe hash of the consensus in the block.
dataHash — hexadecimal stringThe hash of the data in the block.
evidenceHash — hexadecimal stringThe hash of the evidence in the block.
height — stringThe height of the block.
lastBlockId — JSON objectThe ID of the last block.
hash — hexadecimal stringThe hash of the last block.
parts — JSON objectThe parts of the last block.
hash — hexadecimal stringThe hash of the parts in the last block.
total — integerThe total number of parts in the last block.
lastCommitHash — hexadecimal stringThe hash of the last commit.
lastResultsHash — hexadecimal stringThe hash of the last results in the block.
nextValidatorsHash — hexadecimal stringThe hash of the next validators in the block.
proposerAddress — hexadecimal stringThe address of the proposer of the block.
time — stringThe timestamp of the block in ISO 8601 format.
validatorsHash — hexadecimal stringThe hash of the validators in the block.
version — JSON objectThe version of the block and app.
app — stringThe version of the application.
block — stringThe version of the block.
Example Response
{
"header": {
"version": {
"block": "11",
"app": "3"
},
"chainId": "celestia",
"height": "6344611",
"time": "2025-07-08T15:33:26.747994942Z",
"lastBlockId": {
"hash": "C70D4A861A4C5B762628BD42C38261BBEC04F5228B23BA2F7173518563760931",
"parts": {
"total": 6,
"hash": "C8420CE6E427A4612351A36FFD4746A68DCA9489380050121C76F16E3ED93413"
}
},
"lastCommitHash": "F7F8D9835E5C3E97B01E1B12A562B3D694326FBDC8311A6DC7C86FBE846C0BB5",
"dataHash": "694B04CB577E65545D75C27A1CDEE9E67288216D239AD81A33D2FD9220D91FFD",
"validatorsHash": "2B85510ADE66F39FCA42A382E8CAAE609298ABEAD465AF6F7E52C43F624D6A3B",
"nextValidatorsHash": "2B85510ADE66F39FCA42A382E8CAAE609298ABEAD465AF6F7E52C43F624D6A3B",
"consensusHash": "D3A6C023D98608DD2614CCE2EA6BBD162662C383D890077372462FFE34141D1E",
"appHash": "92F6347A823DFE9FB339DA3E2245DCF8F014FA41D23A17A96FE14FCAA8A1B93E",
"lastResultsHash": "564C7F6939F939289BE10921472D8CC2445BA721470424BDD6AD35BAD2C05E2D",
"evidenceHash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposerAddress": "E65D72B89CBEF9A6F419C9BDE6C975AA0BF21A97"
},
"dah": {
"rowRoots": [
"//////////7//////////ql+/VFmJ8PWE9BcjrTDLrY/hzVeGdzFCpfEhiXDXZmt",
"/////////////////////zHeGnUtPJn8QyPpePSYl4qRVrcUvG2fwptyoA85Myik"
],
"columnRoots": [
"//////////8//////////2mK8fXQ7RkpWN5Yn3BzLpD2qTgHw4FvMnEaZjYxPcKr",
"/////////////////////4JbRmPvTQs9XzNmYw6Rh5KqDzNcPbGfUtVrWsXyLnMp"
]
}
}