recompute_merkle_root
Recompute a dokimo-merkle-v1 root locally — no network call, no anchor check.
Hash ``leaf`` in the leaf domain (H(0x00 ‖ leaf)) and replay ``proof_path`` —
a list of ``[sibling_hash, side]`` where side is "L" or "R" — hashing internal
nodes as H(0x01 ‖ left ‖ right). Compare the returned root to the ``root`` in an
evidence package yourself; if it differs, the package was tampered with.
Returns ``{recomputed_root, merkle_scheme, steps}``.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"leaf": "<leaf>",
"proof_path": "<proof_path>"
},
"name": "recompute_merkle_root"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leaf | Yes | The raw leaf value (e.g. a JSON string like '{"k":"total_assets","v":"..."}'). Hashed in the leaf domain as H(0x00 ‖ leaf). | |
| proof_path | Yes | Ordered Merkle proof path: a list of [sibling_hash_hex, side] pairs, where side is "L" if the sibling is on the left or "R" if on the right. Empty list for a single-leaf tree. |