pub struct LogLeaf {
pub leaf_version: String,
pub ctx_id: CtxId,
pub lineage_id: LineageId,
pub origin_registry: String,
pub created_at: DateTime<Utc>,
pub content_hash: ContentHash,
pub key_fingerprint: String,
pub receipt_hash: String,
}Expand description
One transparency-log leaf: the closed object binding one accepted publish event (RFC-ACDP-0012 §4).
CLOSED schema (acdp-log-leaf.schema.json,
additionalProperties: false): the leaf bytes are hashed into the
tree, so an unknown member would change the leaf hash; extensions
require a leaf_version bump. Every field other than receipt_hash
deliberately duplicates receipt fields so a verifier holding the
body and its verified receipt can reconstruct the leaf byte-for-byte
with no additional trust in the registry (§9.1 step 1).
Fields§
§leaf_version: StringMUST be exactly LOG_LEAF_VERSION ("acdp-log-leaf/1").
ctx_id: CtxIdThe registry-assigned context identifier (RFC-ACDP-0001 §5.5).
Exactly one leaf per ctx_id — bodies are immutable, so a
publish event happens once.
lineage_id: LineageIdThe registry-derived lineage identifier (RFC-ACDP-0001 §5.6).
origin_registry: StringThe registry-assigned origin authority (bare DNS hostname). MUST
equal the ctx_id authority and the log’s registry DID
authority.
created_at: DateTime<Utc>The registry-assigned creation timestamp — byte-identical to
body.created_at and registry_receipt.created_at; canonical
millisecond-precision RFC 3339 UTC, always serialized with
exactly three fractional digits.
content_hash: ContentHashThe body’s content_hash as verified at publish time.
key_fingerprint: StringThe RFC-ACDP-0010 §6 fingerprint of the producer key resolved at
publish time. MUST equal registry_receipt.key_fingerprint.
receipt_hash: StringThe RFC-ACDP-0010 §2 receipt hash of this context’s registry
receipt (over the receipt preimage, i.e. minus signature) —
binding the signed receipt statement while remaining stable
across the sanctioned post-compromise re-mint (RFC-ACDP-0012 §4).
Implementations§
Source§impl LogLeaf
impl LogLeaf
Sourcepub fn from_value(value: &Value) -> Result<Self, AcdpError>
pub fn from_value(value: &Value) -> Result<Self, AcdpError>
Parse a leaf from wire JSON, enforcing the closed schema, the
exact leaf_version, and the canonical millisecond byte form of
the RAW created_at (checked before parsing normalization).
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, AcdpError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, AcdpError>
The leaf encoding — the exact bytes that are hashed: the JCS canonicalization (RFC 8785) of the leaf object, UTF-8. There is no exclusion set: every member is part of the leaf bytes (RFC-ACDP-0012 §4).
Sourcepub fn leaf_hash(&self) -> Result<[u8; 32], AcdpError>
pub fn leaf_hash(&self) -> Result<[u8; 32], AcdpError>
SHA-256(0x00 ‖ JCS(leaf)) — the §5.1 leaf hash, raw digest.
Sourcepub fn leaf_hash_hex(&self) -> Result<String, AcdpError>
pub fn leaf_hash_hex(&self) -> Result<String, AcdpError>
The §5.1 leaf hash in wire form ("sha256:<hex>").
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogLeaf
impl<'de> Deserialize<'de> for LogLeaf
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>,
impl Eq for LogLeaf
impl StructuralPartialEq for LogLeaf
Auto Trait Implementations§
impl Freeze for LogLeaf
impl RefUnwindSafe for LogLeaf
impl Send for LogLeaf
impl Sync for LogLeaf
impl Unpin for LogLeaf
impl UnsafeUnpin for LogLeaf
impl UnwindSafe for LogLeaf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.