pub fn tree_head_from_json(json: &str) -> Result<String, JsValue>
Parse a tree head from JSON. Returns a JSON string with { size, root_hex } (root as hex string because wasm-bindgen doesn’t natively marshal Vec in return position of free functions easily).
{ size, root_hex }