Skip to main content

append_event_value_signed

Function append_event_value_signed 

Source
pub fn append_event_value_signed(
    event: &Value,
    prev_event_hash: Option<&str>,
    signer: &Ed25519EventSigner,
) -> Result<Value, ChainError>
Expand description

Value-based chain production with an event SIGNATURE (v0.7 §3.5).

Signs the attestation bytes, attaches the signature, THEN hashes the view including it — so the chain commits to the signature and stripping it is hash-detectable without keys.

§Errors

Returns ChainError::Serde if the value is not an object or cannot be canonicalized.