Struct risc0_zkvm::SegmentReceipt
source · pub struct SegmentReceipt {
pub seal: Vec<u32>,
pub index: u32,
pub hashfn: String,
pub claim: ReceiptClaim,
}
Expand description
A receipt attesting to the execution of a Segment.
A SegmentReceipt attests that a Segment was executed in a manner consistent with the ReceiptClaim included in the receipt.
Fields§
§seal: Vec<u32>
The cryptographic data attesting to the validity of the code execution.
This data is used by the ZKP Verifier (as called by SegmentReceipt::verify_integrity_with_context) to cryptographically prove that this Segment was faithfully executed. It is largely opaque cryptographic data, but contains a non-opaque claim component, which can be conveniently accessed with SegmentReceipt::claim.
index: u32
Segment index within the Receipt
hashfn: String
Name of the hash function used to create this receipt.
claim: ReceiptClaim
ReceiptClaim containing information about the execution that this receipt proves.
Implementations§
source§impl SegmentReceipt
impl SegmentReceipt
sourcepub fn verify_integrity_with_context(
&self,
ctx: &VerifierContext
) -> Result<(), VerificationError>
pub fn verify_integrity_with_context( &self, ctx: &VerifierContext ) -> Result<(), VerificationError>
Verify the integrity of this receipt, ensuring the claim is attested to by the seal.
sourcepub fn get_seal_bytes(&self) -> Vec<u8> ⓘ
pub fn get_seal_bytes(&self) -> Vec<u8> ⓘ
Return the seal for this receipt, as a vector of bytes.
Trait Implementations§
source§impl Clone for SegmentReceipt
impl Clone for SegmentReceipt
source§fn clone(&self) -> SegmentReceipt
fn clone(&self) -> SegmentReceipt
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more