pub struct JournalEntry {
pub token: ConsumedToken,
pub prev_hash: [u8; 32],
pub entry_hash: [u8; 32],
pub signature: [u8; 64],
pub signer_pubkey: [u8; 32],
}Expand description
Chain-signed journal entry.
Fields§
§token: ConsumedTokenAudit payload.
prev_hash: [u8; 32]Previous entry’s entry_hash (or GENESIS_PREV_HASH for the first
entry).
entry_hash: [u8; 32]BLAKE3-derive_key(JOURNAL_CHAIN_DOMAIN, prev_hash || token_canonical_bytes).
signature: [u8; 64]Ed25519 sign(entry_hash).
signer_pubkey: [u8; 32]Signer’s Ed25519 public key.
Implementations§
Source§impl JournalEntry
impl JournalEntry
Sourcepub fn compute_entry_hash(
prev_hash: &[u8; 32],
token: &ConsumedToken,
) -> [u8; 32]
pub fn compute_entry_hash( prev_hash: &[u8; 32], token: &ConsumedToken, ) -> [u8; 32]
Re-compute entry_hash from prev_hash + token canonical bytes.
Trait Implementations§
Source§impl Clone for JournalEntry
impl Clone for JournalEntry
Source§fn clone(&self) -> JournalEntry
fn clone(&self) -> JournalEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for JournalEntry
impl RefUnwindSafe for JournalEntry
impl Send for JournalEntry
impl Sync for JournalEntry
impl Unpin for JournalEntry
impl UnsafeUnpin for JournalEntry
impl UnwindSafe for JournalEntry
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
Mutably borrows from an owned value. Read more