14 releases (breaking)

0.11.0 Apr 2, 2025
0.10.1 Feb 24, 2025
0.10.0 Jan 29, 2025
0.9.0 Dec 2, 2024
0.1.1 Jan 15, 2024

#1 in #celestia

Download history 1877/week @ 2024-12-19 649/week @ 2024-12-26 2531/week @ 2025-01-02 3563/week @ 2025-01-09 3605/week @ 2025-01-16 2409/week @ 2025-01-23 1328/week @ 2025-01-30 3094/week @ 2025-02-06 2318/week @ 2025-02-13 2109/week @ 2025-02-20 3619/week @ 2025-02-27 3822/week @ 2025-03-06 3898/week @ 2025-03-13 3579/week @ 2025-03-20 3050/week @ 2025-03-27 3296/week @ 2025-04-03

14,489 downloads per month
Used in 9 crates

Apache-2.0

500KB
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,
      "signer": null
    }"#},
);

Dependencies

~13–23MB
~351K SLoC