use alloy_primitives::{B256, U64};
use kona_interop::ManagedEvent;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BlockSeal {
pub hash: B256,
pub number: U64,
pub timestamp: U64,
}
impl BlockSeal {
pub const fn new(hash: B256, number: U64, timestamp: U64) -> Self {
Self { hash, number, timestamp }
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct OutputV0 {
pub state_root: B256,
pub message_passer_storage_root: B256,
pub block_hash: B256,
}
impl OutputV0 {
pub const fn new(
state_root: B256,
message_passer_storage_root: B256,
block_hash: B256,
) -> Self {
Self { state_root, message_passer_storage_root, block_hash }
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct SubscriptionEvent {
pub data: Option<ManagedEvent>,
}