pub fn validate_receipt(
receipt: &ExecutionReceipt,
envelope: &ActionEnvelope,
expected_digest: &str,
) -> Result<(), ComputerUseError>Available on crate feature
computer-use only.Expand description
Verifies a receipt describes the action that was actually submitted.
The digest is the strongest binding available: ActionEnvelope::args_digest is what
approval was granted against, so a receipt carrying a different digest describes different
work regardless of matching identifiers. An empty expected digest is treated as
unavailable rather than as a match against an empty value.
ยงErrors
Returns ComputerUseError::IdentityMismatch when the session, action ID, or action
digest disagrees with envelope.