A canonical local record of one draft-provider attempt.
Created and existing outcomes are provider-reported, not independently
verified remote state. An unknown outcome is retained after a deadline because
terminating the local callback cannot prove that an external effect did not
occur. Exactly-once behavior therefore depends on provider-native idempotency.
Standalone validation proves only structure and content identity; callers
trust a receipt only after validate_with/2 recomputes it from the request.
Summary
Functions
Recomputes the receipt from the exact request and recorded provider outcome.
Types
Functions
@spec canonical_binary(term()) :: {:ok, binary()} | {:error, Insider.Protocol.Error.t()}
@spec decode(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec new(term(), binary(), binary() | nil) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec validate_with(term(), term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
Recomputes the receipt from the exact request and recorded provider outcome.