16 releases (10 breaking)

new 0.11.1 Jun 10, 2025
0.10.0 Apr 2, 2025
0.9.1 Feb 24, 2025
0.8.0 Dec 2, 2024
0.1.1 Jan 15, 2024

#74 in Magic Beans

Download history 353/week @ 2025-02-19 365/week @ 2025-02-26 666/week @ 2025-03-05 491/week @ 2025-03-12 280/week @ 2025-03-19 453/week @ 2025-03-26 713/week @ 2025-04-02 606/week @ 2025-04-09 552/week @ 2025-04-16 571/week @ 2025-04-23 452/week @ 2025-04-30 612/week @ 2025-05-07 978/week @ 2025-05-14 791/week @ 2025-05-21 763/week @ 2025-05-28 608/week @ 2025-06-04

3,237 downloads per month
Used in 3 crates

Apache-2.0

545KB
11K SLoC

Celestia RPC

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))
        .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(), AppVersion::V2)
        .expect("Failed to create a blob");

    // submit it
    client.blob_submit(&[blob], TxConfig::default())
        .await
        .expect("Failed submitting the blob");
}

Dependencies

~18–31MB
~506K SLoC