pub struct ExternalReceipt {
pub sink: ExternalSink,
pub anchor_text_sha256: String,
pub anchor_event_count: u64,
pub anchor_chain_head_hash: String,
pub submitted_at: DateTime<Utc>,
pub sink_endpoint: String,
pub receipt: Value,
}Expand description
v1 external anchor receipt sidecar.
Mirrors the JSON shape in DESIGN_external_anchor_authority.md §Receipt
shape. receipt carries the sink-specific payload and is intentionally
left as serde_json::Value: Rekor and OpenTimestamps each pin their own
shape inside this field, but the live adapters that consume them are
deferred. Unknown fields inside receipt are not validated here.
Fields§
§sink: ExternalSinkSink that produced this receipt.
anchor_text_sha256: StringLowercase hex SHA-256 over the canonical crate::LedgerAnchor text
at the witnessed position. The verifier recomputes this against the
local ledger; mismatch is external_anchor_receipts.anchor_text_hash.mismatch.
anchor_event_count: u64Event count at the witnessed position.
anchor_chain_head_hash: StringLowercase hex BLAKE3 ledger event hash at anchor_event_count.
submitted_at: DateTime<Utc>RFC 3339 submission timestamp recorded by the operator client.
sink_endpoint: StringSink endpoint actually contacted (e.g. https://rekor.sigstore.dev).
receipt: ValueSink-specific payload (Rekor entry envelope or OTS proof envelope).
Implementations§
Source§impl ExternalReceipt
impl ExternalReceipt
Sourcepub fn to_record_text(&self) -> Result<String, ExternalReceiptParseError>
pub fn to_record_text(&self) -> Result<String, ExternalReceiptParseError>
Render this receipt as a canonical v1 record: header line, then the JSON body on one line, then a trailing newline.
Trait Implementations§
Source§impl Clone for ExternalReceipt
impl Clone for ExternalReceipt
Source§fn clone(&self) -> ExternalReceipt
fn clone(&self) -> ExternalReceipt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExternalReceipt
impl Debug for ExternalReceipt
Source§impl<'de> Deserialize<'de> for ExternalReceipt
impl<'de> Deserialize<'de> for ExternalReceipt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ExternalReceipt
impl PartialEq for ExternalReceipt
Source§fn eq(&self, other: &ExternalReceipt) -> bool
fn eq(&self, other: &ExternalReceipt) -> bool
self and other values to be equal, and is used by ==.