13 releases (breaking)

0.10.1 Feb 24, 2025
0.9.0 Dec 2, 2024
0.7.0 Oct 29, 2024
0.2.0 Apr 19, 2024
0.1.1 Jan 15, 2024

#2 in #celestia

Download history 2685/week @ 2024-12-04 2460/week @ 2024-12-11 2497/week @ 2024-12-18 655/week @ 2024-12-25 2122/week @ 2025-01-01 3676/week @ 2025-01-08 3569/week @ 2025-01-15 2255/week @ 2025-01-22 1615/week @ 2025-01-29 2803/week @ 2025-02-05 2307/week @ 2025-02-12 2413/week @ 2025-02-19 3031/week @ 2025-02-26 4001/week @ 2025-03-05 3710/week @ 2025-03-12 2995/week @ 2025-03-19

13,985 downloads per month
Used in 9 crates

Apache-2.0

480KB
9K SLoC

Celestia types

Core types, traits and constants you may encounter when working with the Celestia ecosystem.

Most of the types are built on top of the celestia-tendermint-rs and celestia-proto and support the serialization and deserialization using protobuf and serde to the format understood by nodes in celestia network.

use celestia_types::{AppVersion, Blob, nmt::Namespace};

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");

assert_eq!(
    &serde_json::to_string_pretty(&blob).unwrap(), 
    indoc::indoc! {r#"{
      "namespace": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQIDBAU=",
      "data": "c29tZSBkYXRhIHRvIHN0b3JlIG9uIGJsb2NrY2hhaW4=",
      "share_version": 0,
      "commitment": "m0A4feU6Fqd5Zy9td3M7lntG8A3PKqe6YdugmAsWz28=",
      "index": -1
    }"#},
);

Dependencies

~13–23MB
~351K SLoC