alloy_eips/eip4844/
engine.rs

1//! Misc types related to the 4844
2
3use crate::eip4844::{Blob, Bytes48};
4use alloc::boxed::Box;
5
6/// Blob type returned in responses to `engine_getBlobsV1`: <https://github.com/ethereum/execution-apis/pull/559>
7#[derive(Debug, Clone, PartialEq, Eq)]
8#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
9pub struct BlobAndProofV1 {
10    /// The blob data.
11    pub blob: Box<Blob>,
12    /// The KZG proof for the blob.
13    pub proof: Bytes48,
14}
15
16/// Blob type returned in responses to `engine_getBlobsV2`: <https://github.com/ethereum/execution-apis/pull/630>
17#[derive(Debug, Clone, PartialEq, Eq)]
18#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
19#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
20pub struct BlobAndProofV2 {
21    /// The blob data.
22    pub blob: Box<Blob>,
23    /// The cell proof for the blob.
24    pub cell_proof: Bytes48,
25}