Struct risc0_zkvm::receipt::Receipt
source · Expand description
The receipt serves as a zero-knowledge proof of computation.
Fields§
§journal: Vec<u32>
The journal contains the public outputs of the computation.
seal: Vec<u32>
The seal is an opaque cryptographic blob that attests to the integrity of the computation. It consists of merkle commitments and query data for an AIR-FRI STARK that includes a PLONK-based permutation argument.
Implementations§
source§impl Receipt
impl Receipt
pub fn new(journal: &[u32], seal: &[u32]) -> Self
sourcepub fn verify<D>(&self, image_id: D) -> Result<()>where
Digest: From<D>,
pub fn verify<D>(&self, image_id: D) -> Result<()>where
Digest: From<D>,
Verifies a receipt using CPU.
sourcepub fn verify_with_hal<H, D>(&self, hal: &H, image_id: D) -> Result<()>where
H: VerifyHal,
Digest: From<D>,
pub fn verify_with_hal<H, D>(&self, hal: &H, image_id: D) -> Result<()>where
H: VerifyHal,
Digest: From<D>,
Verifies a receipt using the hardware acceleration layer.
sourcepub fn get_journal_bytes(&self) -> &[u8] ⓘ
pub fn get_journal_bytes(&self) -> &[u8] ⓘ
Extracts the journal from the receipt, as a series of bytes.
sourcepub fn get_seal_bytes(&self) -> &[u8] ⓘ
pub fn get_seal_bytes(&self) -> &[u8] ⓘ
Extracts the seal from the receipt, as a series of bytes.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Receipt
impl<'de> Deserialize<'de> for Receipt
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more