GET v0/share/get_namespace_data
Get the data of a Celestia namespace
Retrieves all shares that belong to the specified Celestia namespace within the Extended Data Square (EDS) at the given height.
Request
curl \
-H 'Authorization: Bearer <YOUR API KEY>' \
'https://t.tech/v0/share/get_namespace_data?height=0&namespace=%22REPLACE%20ME%22'package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://t.tech/v0/share/get_namespace_data?height=0&namespace=%22REPLACE%20ME%22"
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/share/get_namespace_data?height=0&namespace=%22REPLACE%20ME%22";
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
heightThe block height at which the blob was submitted in the Celestia blockchain.
namespaceThe namespace associated with the blob. This should be in base64 format. Be sure to encode the value in your
request.
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.
Response
result — array<JSON object>proof — JSON objectNamespaced Merkle Tree (NMT) proof that cryptographically verifies the returned shares belong to the requested namespace. This object is optional.
end — integerEnding index of the proven leaf range in the NMT. This field is optional.
isMaxNamespaceIgnored — booleanIndicates if the proof was generated using “ignore max namespace”. This field is optional.
leafHash — base64 encoded stringLeaf hash used for proving namespace absence (when the namespace is in the min/max range but has no data). This field is optional.
nodes — array<base64 encoded string>Array of sibling hash values needed to recompute the root and verify the proof. This field is optional.
start — integerStarting index of the proven leaf range in the NMT. This field is optional.
shares — array<base64 encoded string>Array of 512-byte fixed-size data chunks (shares) belonging to the requested namespace. Each share contains namespace metadata (version, ID), sequence information, and the raw data payload. Shares are returned in row-by-row order from the Extended Data Square (EDS). This field is optional.
Example Response
{
"result": [
{
"shares": [
"AAAAAAAAAAAAAAAAAAAAAAAAAMod4SqXFNgavI8BAAAEEwBpmtYx2n73uyFCT4eXJpTWAAAAAAP7eNosz4k323cAAHDnHEkej5ki5gilTXWh7jGqLcpLm8zRtTVzbesWIRvhSZRX9XSVo45mY47+KlGhsyAWwkKwVtcV1WUodSVoHKvUqJlE9r7b7x/4vPfpJuj8jYcoS+PY8linQrqXg1N40bLkV9YEJJpob3hqW5C5c6m5oFh3t0gAjX7TZ8BQkvsYp11yXin5Fl9kvR7gL8XahKnqohL8hL3FV/LSqqX/i+mKuj5EJxdj2phO0fzuTxzvV+CdF99us68Qh2r79bRAbINkyRieF34Ze1ROc34L6xDQ/6T0R6qDmcToc3xouhV3HYg1sMjnGkc+eHzdN0uPyH0okGKZzZHJ71ltRaRNBY2fe7RIBWI7VNQULCdKCDLvEuJ8BP1J4WFr1AhbPyb4rk3lSNeNxFIg1sFiqSPC7TKbeWU2FOHeRM3JJ3IN60fPypbQJd1jVUPXC4HYAYVUJREzB/bKtH4NU0bIQZm+WvKX7vLQQWXbi5O/vEveBOIdWNT5zX90kEmOa7L3IOC+008Teoa3HrtUcDUB3fFys/P5AhCFUCx6qTyqx3YFJ76QyPSvId0wKzMUzLHQlGNG6hXa+yog3oVF3AzSj2U="
],
"proof": {
"start": 1,
"end": null,
"nodes": [
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABKkRzLer+t2qcdzf3ULjU2B3HmNXmdOh6DOVFt9APBjW",
"/////////////////////////////////////////////////////////////////////////////59+waFBGA+cU8RdESsqbGTzMP5muZrPWPHKzR7/mTKQ"
],
"leafHash": null,
"isMaxNamespaceIgnored": true
}
},
{
"shares": [
"AAAAAAAAAAAAAAAAAAAAAAAAAMod4SqXFNgavI8BAAAEEwBpmtYx2n73uyFCT4eXJpTWAAAAAAP7eNosz4k323cAAHDnHEkej5ki5gilTXWh7jGqLcpLm8zRtTVzbesWIRvhSZRX9XSVo45mY47+KlGhsyAWwkKwVtcV1WUodSVoHKvUqJlE9r7b7x/4vPfpJuj8jYcoS+PY8linQrqXg1N40bLkV9YEJJpob3hqW5C5c6m5oFh3t0gAjX7TZ8BQkvsYp11yXin5Fl9kvR7gL8XahKnqohL8hL3FV/LSqqX/i+mKuj5EJxdj2phO0fzuTxzvV+CdF99us68Qh2r79bRAbINkyRieF34Ze1ROc34L6xDQ/6T0R6qDmcToc3xouhV3HYg1sMjnGkc+eHzdN0uPyH0okGKZzZHJ71ltRaRNBY2fe7RIBWI7VNQULCdKCDLvEuJ8BP1J4WFr1AhbPyb4rk3lSNeNxFIg1sFiqSPC7TKbeWU2FOHeRM3JJ3IN60fPypbQJd1jVUPXC4HYAYVUJREzB/bKtH4NU0bIQZm+WvKX7vLQQWXbi5O/vEveBOIdWNT5zX90kEmOa7L3IOC+008Teoa3HrtUcDUB3fFys/P5AhCFUCx6qTyqx3YFJ76QyPSvId0wKzMUzLHQlGNG6hXa+yog3oVF3AzSj2U="
],
"proof": {
"start": null,
"end": 2,
"nodes": [
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABKkRzLer+t2qcdzf3ULjU2B3HmNXmdOh6DOVFt9APBjW",
"/////////////////////////////////////////////////////////////////////////////59+waFBGA+cU8RdESsqbGTzMP5muZrPWPHKzR7/mTKQ"
],
"leafHash": "AAAAAAAAAAAAAAAAAAAAAAAAAFu5ROwv066cIvYAAAAAAAAAAAAAAAAAAAAAAAAAW7lE7C/Trpwi9gHr8Us7DM4JjFIowbkDMQWDF6I8LV40kd3is6EGiksS",
"isMaxNamespaceIgnored": true
}
}
]
}