pub struct DeliveryConfirmation { /* private fields */ }Expand description
Confirmation that a counterparty durably received one Event Message.
This is not an Event Message: event_id identifies the original event,
not this confirmation. Delivery Confirmations must never be confirmed.
They do not indicate payment acceptance, execution, or settlement.
The caller owns durable receipt and sends this over the authenticated Encrypted Link to the original sender only after persisting the event.
Implementations§
Source§impl DeliveryConfirmation
impl DeliveryConfirmation
Sourcepub fn new(
app_id: PaykitAppId,
event_id: EventId,
payload_hash: String,
) -> Result<Self>
pub fn new( app_id: PaykitAppId, event_id: EventId, payload_hash: String, ) -> Result<Self>
Create a version-1 confirmation for an existing Event Message.
app_id is the local confirming App, and event_id is the original
Event ID. payload_hash must be SHA-256 of the exact raw UTF-8 original
JSON, including whitespace, formatted as sha256:<64 lowercase hex>.
This validates the hash’s format; the caller computes it without
reserializing the original JSON and confirms only Event Message kinds.
Sourcepub fn app_id(&self) -> &PaykitAppId
pub fn app_id(&self) -> &PaykitAppId
Local App confirming durable receipt of the original Event Message.
Sourcepub fn event_id(&self) -> &EventId
pub fn event_id(&self) -> &EventId
Original Event ID; no fresh Event ID is allocated for this confirmation.
Sourcepub fn payload_hash(&self) -> &str
pub fn payload_hash(&self) -> &str
SHA-256 of the exact raw UTF-8 original JSON, prefixed with sha256:.