celestia-rpc

Crates.iocelestia-rpc
lib.rscelestia-rpc
version
sourcesrc
created_at2024-01-12 16:11:11.816589
updated_at2024-12-02 12:14:32.318664
descriptionA collection of traits for interacting with Celestia data availability nodes RPC
homepagehttps://www.eiger.co
repositoryhttps://github.com/eigerco/lumina
max_upload_size
id1097842
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Eiger (eiger-releases)

documentation

README

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};
use celestia_types::{AppVersion, Blob, TxConfig, 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");
}
Commit count: 285

cargo fmt