Skip to main content

tcv1_encode

Function tcv1_encode 

Source
pub fn tcv1_encode(value: &TypedCanonicalValue) -> Result<Vec<u8>, Tcv1Error>
Expand description

Encode one value using the DAG-ML TCV1 binary grammar.

The returned bytes begin with the value tag, not the domain separator. Use tcv1_preimage for bytes suitable for hashing.