Skip to main content

Module util

Module util 

Source

Functions§

check_commitment_authority
Check whether the sender is authorized to commit per the policy’s commitment.authority rule.
decode_commitment_payload
decode_mode_state
encode_mode_state
Shared mode-state JSON codec (extracted from six per-mode copies). Encoding a mode-state struct cannot fail; if it ever does, panic loudly rather than silently persisting an empty state.
enforce_commitment_policy
Shared commitment policy gate (extracted from five per-mode copies). Fail closed: only an explicit Allow proceeds — PolicyDecision is #[non_exhaustive], and any unknown decision denies.
is_declared_participant
participants_all_accept
validate_commitment_payload_for_session