Calculates a Commitment for each provided pair of namespace and blob data. You can include multiple namespace and blob pairs in a single request, and a Commitment will be returned for each pair in the same order they were provided.
Note: The maximum request size is 4,000,000 bytes. If your request exceeds this amount, please contact us at orion@t.tech.
Body Parameters
namespacearray<20 character hexadecimal string>REQUIRED
An array of namespaces for the data blobs you may post. 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_commitment";
let api_key = "Your API Key"; // Replace with your actual token
let payload = json!({
"namespace": ["23c396aafaa92bb44181"], "data": ["d9aa02b2716e7843"],
});
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(())
}