pub struct Receipt {
pub vds: i64,
pub inclusion_proofs: Vec<InclusionProof>,
pub payload: Option<Vec<u8>>,
/* private fields */
}Expand description
A decoded attached Receipt, before its signature has been checked.
Fields§
§vds: i64The Verifiable Data Structure identifier from the protected header.
inclusion_proofs: Vec<InclusionProof>The inclusion proofs from the vdp map, in the order presented.
payload: Option<Vec<u8>>The payload, absent when detached.
Implementations§
Source§impl Receipt
impl Receipt
Sourcepub fn from_cose_sign1(receipt: &[u8]) -> Result<Self>
pub fn from_cose_sign1(receipt: &[u8]) -> Result<Self>
Decodes an attached Receipt from its COSE_Sign1 bytes.
Accepts both the CBOR-tagged form (#6.18, RFC 9942 Section 5.2) and
the untagged array, because a Receipt read out of a receipts array has
already been located by position and the tag carries no information the
reader lacks at that point.
§Errors
Returns Error::Receipt if the bytes are not a four-element
COSE_Sign1, if the protected header is absent or does not carry an
integer vds, or if no inclusion proof can be read from the vdp map.
Duplicate keys (including nested claims/proof maps and unknown labels)
and trailing protected CBOR are rejected before header lookup. This
generic parser remains a compatibility/crypto primitive, not the tagged
text-claim inspection API crate::inspect_scitt_receipt.