fuel_block_committer_encoding/
bundle.rs

1mod decoder;
2mod encoder;
3pub use decoder::*;
4pub use encoder::*;
5
6#[derive(Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
7pub struct BundleV1 {
8    pub blocks: Vec<Vec<u8>>,
9}
10
11impl std::fmt::Debug for BundleV1 {
12    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13        let hex_encoded = self.blocks.iter().map(hex::encode).collect::<Vec<String>>();
14
15        f.debug_struct("BundleV1")
16            .field("blocks", &hex_encoded)
17            .finish()
18    }
19}
20
21#[derive(Debug, Clone, PartialEq, Eq)]
22pub enum Bundle {
23    V1(BundleV1),
24}