| Crates.io | celestia-rpc |
| lib.rs | celestia-rpc |
| version | 0.16.1 |
| created_at | 2024-01-12 16:11:11.816589+00 |
| updated_at | 2026-01-14 15:44:41.286241+00 |
| description | A collection of traits for interacting with Celestia data availability nodes RPC |
| homepage | https://www.eiger.co |
| repository | https://github.com/eigerco/lumina |
| max_upload_size | |
| id | 1097842 |
| size | 278,672 |
A collection of traits for interacting with Celestia data availability nodes RPC.
This crate builds on top of the jsonrpsee clients.
use celestia_rpc::{BlobClient, Client, TxConfig};
use celestia_types::{AppVersion, Blob, nmt::Namespace};
async fn submit_blob() {
// create a client to the celestia node
let token = std::env::var("CELESTIA_NODE_AUTH_TOKEN").expect("Token not provided");
let client = Client::new("ws://localhost:36658", Some(&token), None, None)
.await
.expect("Failed creating rpc client");
// create a blob that you want to submit
let my_namespace = Namespace::new_v0(&[1, 2, 3, 4, 5]).expect("Invalid namespace");
let blob = Blob::new(
my_namespace,
b"some data to store on blockchain".to_vec(),
None,
AppVersion::latest(),
)
.expect("Failed to create a blob");
// submit it
client.blob_submit(&[blob], TxConfig::default())
.await
.expect("Failed submitting the blob");
}