Retrieves all data blobs from the Celestia blockchain under the given namespaces at the given height. If all blobs were found without any errors, a list of blobs will be returned.
Body Parameters
heightintegerREQUIRED
The block height at which the blobs were submitted in the Celestia blockchain.
namespacesarray<20 character hexadecimal string>REQUIRED
An array of namespaces for the data blobs you wish to retrieve. Each namespace value must be exactly twenty characters of valid hexadecimal text. This corresponds to a V0 Celestia Namespace ID. Read more about namespace IDs at the Celestia Docs here.
// Cargo.toml dependencies:
// [dependencies]
// reqwest = { version = "0.12", features = ["json"] }
// serde_json = { version = "1.0" }
// tokio = { version = "1.46", features = ["macros", "rt-multi-thread"] }
use reqwest::{Client, header};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let url = "https://t.tech/v0/blob/get_all";
let api_key = "Your API Key"; // Replace with your actual token
let payload = json!({
"height": 0, "namespaces": ["650f12a9da78510952df"],
});
let res = client
.post(url)
.header(header::CONTENT_TYPE, "application/json")
.bearer_auth(api_key)
.json(&payload)
.send()
.await?;
let status = res.status();
let body = res.text().await?;
println!("Status: {}", status);
println!("Response: {}", body);
Ok(())
}