pub struct VerificationResult {
pub body_hash_matches: bool,
pub receipt_well_formed: bool,
pub algorithms_match_flags: bool,
pub timestamps_agree: bool,
pub flags_from_receipt: Option<AlgorithmFlags>,
pub computed_body_hash: [u8; 32],
}Expand description
Structured verdict from running the four structural checks.
Every field is a boolean, and every field answers a distinct,
independently-valuable question. Self::is_valid is simply
the AND of all four; callers that want partial verdicts (e.g.
“body is bound and the receipt is structurally valid, but the
algorithms header was stripped”) can read the fields directly.
The four booleans map one-to-one to the four independent integrity checks and deliberately do not collapse into a state-machine enum: a caller often wants to surface a specific check that failed in a log or UI, and an enum would flatten that information.
Fields§
§body_hash_matches: booltrue if SHA3-256(body) == X-H33-Substrate.
receipt_well_formed: booltrue if X-H33-Receipt decoded to a v1 42-byte receipt with
recognized algorithm flags.
algorithms_match_flags: booltrue if the algorithm names listed in X-H33-Algorithms
correspond exactly (set-equal) to the algorithm flags inside
the receipt.
timestamps_agree: booltrue if X-H33-Substrate-Ts equals the verified_at_ms
field inside the receipt.
flags_from_receipt: Option<AlgorithmFlags>Typed view of the algorithm flags byte from the decoded receipt. Populated as soon as the receipt itself parses, even if the other checks fail.
computed_body_hash: [u8; 32]The 32-byte SHA3-256 hash this verifier computed over the body, surfaced so callers can log it alongside pass/fail.
Implementations§
Trait Implementations§
Source§impl Clone for VerificationResult
impl Clone for VerificationResult
Source§fn clone(&self) -> VerificationResult
fn clone(&self) -> VerificationResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more