Enum risc0_zkvm::InnerReceipt
source · pub enum InnerReceipt {
Flat(SegmentReceipts),
Succinct(SuccinctReceipt),
Fake,
}
Expand description
An inner receipt can take the form of a SegmentReceipts collection or a SuccinctReceipt.
Variants§
Flat(SegmentReceipts)
The SegmentReceipts.
Succinct(SuccinctReceipt)
The SuccinctReceipt.
Fake
A fake receipt for testing and development.
This receipt is not valid and will fail verification unless the
environment variable RISC0_DEV_MODE
is set to true
, in which case a
pass-through ‘verification’ will be performed, but it does not
represent any meaningful attestation of receipt’s integrity.
This type solely exists to improve development experience, for further information about development-only mode see our dev-mode documentation.
Implementations§
source§impl InnerReceipt
impl InnerReceipt
sourcepub fn verify(
&self,
image_id: impl Into<Digest>,
journal: &[u8]
) -> Result<(), VerificationError>
pub fn verify( &self, image_id: impl Into<Digest>, journal: &[u8] ) -> Result<(), VerificationError>
Verify the integrity of this receipt.
sourcepub fn verify_with_context(
&self,
ctx: &VerifierContext,
image_id: impl Into<Digest>,
journal: &[u8]
) -> Result<(), VerificationError>
pub fn verify_with_context( &self, ctx: &VerifierContext, image_id: impl Into<Digest>, journal: &[u8] ) -> Result<(), VerificationError>
Verify the integrity of this receipt.
sourcepub fn flat(&self) -> Result<&[SegmentReceipt], VerificationError>
pub fn flat(&self) -> Result<&[SegmentReceipt], VerificationError>
Returns the InnerReceipt::Flat arm.
sourcepub fn succinct(&self) -> Result<&SuccinctReceipt, VerificationError>
pub fn succinct(&self) -> Result<&SuccinctReceipt, VerificationError>
Returns the InnerReceipt::Succinct arm.
Trait Implementations§
source§impl Debug for InnerReceipt
impl Debug for InnerReceipt
source§impl<'de> Deserialize<'de> for InnerReceipt
impl<'de> Deserialize<'de> for InnerReceipt
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
source§impl PartialEq for InnerReceipt
impl PartialEq for InnerReceipt
source§fn eq(&self, other: &InnerReceipt) -> bool
fn eq(&self, other: &InnerReceipt) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InnerReceipt
impl Serialize for InnerReceipt
impl StructuralPartialEq for InnerReceipt
Auto Trait Implementations§
impl RefUnwindSafe for InnerReceipt
impl Send for InnerReceipt
impl Sync for InnerReceipt
impl Unpin for InnerReceipt
impl UnwindSafe for InnerReceipt
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more