#![allow(unused_imports)]

use candid::CandidType;
use serde::{Deserialize, Serialize};

pub use body::*;
pub use header::*;

mod body;
mod header;

#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub struct Block {
    pub head: BlockHeader,
    pub body: Option<BlockBody>,
}

#[derive(Debug, CandidType, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub enum DaType {
    ARWave,
    Celestia,
    IPFS,
}

#[derive(Debug, CandidType, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub struct BlockDataAvailability {
    /// Data Availability Type
    pub r#type: DaType,

    /// Data Availability Reference
    ///
    /// Note: This is a reference to the data availability, may be a CID, a hash, etc.
    pub da_ref: Vec<u8>,
}
