Skip to main content

verifier_context_hash

Function verifier_context_hash 

Source
pub fn verifier_context_hash(
    ctx: &VerifierContext<'_>,
) -> Result<Vec<u8>, String>
Expand description

SHA-256 of the canonical-byte representation of the policy-relevant subset of a VerifierContext. Used as context_hash on a PolicyVerdict. invocations_in_window is excluded — closures don’t serialize. Keys in lex order: current_alt_m, current_lat, current_lon, current_speed_mps, has_amount, has_location, has_speed, requested_amount, requested_currency.