Skip to main content
GET
Verify on-chain proof

Path Parameters

agent_id
string
required

Agent identifier (e.g. smolt-abc123)

Query Parameters

leaf_index
integer

Optional. Zero-based index of a single leaf to prove inclusion for. When supplied, the response carries an inclusion_proof (leaf hash + sibling path) that has been verified against the recomputed root; the caller can replay it without trusting this endpoint. When omitted, only the root recomputation and leaf-count checks are performed.

Required range: x >= 0

Response

Proof verification result. verified: true requires ALL of: the root recomputes from the stored leaf hashes, leaf_count agrees with the leaf array, any requested inclusion proof verifies, and a confirmed anchor exists for the recomputed root. Any failed step returns verified: false with a reason — never a bare true. (handleVerifyProof in src/on-chain/handlers.ts.)

verified
boolean
required

True only when the agent's root was successfully recomputed from its stored leaves AND a confirmed on-chain anchor exists for that recomputed root (and, if leaf_index was supplied, its inclusion proof verified).

agent_id
string
required
reason
enum<string>

Present only when verified is false. no_merkle_tree: the agent has no merkle tree row; no_checkpoint: the tree has no merkle_root yet; no_leaf_hashes: a root is stored but no leaves are, so it cannot be rebuilt; root_mismatch: the root recomputed from the stored leaves does not equal the stored root (tampering or corruption); leaf_count_mismatch: the stored leaf_count disagrees with the number of stored leaves (silent truncation); leaf_index_out_of_range: the requested leaf_index exceeds the tree; inclusion_proof_failed: the proof for the requested leaf does not reconstruct the root; not_anchored: the tree verifies but has no confirmed anchor.

Available options:
no_merkle_tree,
no_checkpoint,
no_leaf_hashes,
root_mismatch,
leaf_count_mismatch,
leaf_index_out_of_range,
inclusion_proof_failed,
not_anchored
merkle_root
string

The agent's stored Merkle root. Present when a checkpoint exists (i.e. absent for the no_merkle_tree/no_checkpoint cases).

recomputed_root
string

The root recomputed from the stored leaf hashes. Returned only on root_mismatch, so the discrepancy is inspectable.

leaf_count
integer

Leaf count, included on the leaf_count_mismatch and leaf_index_out_of_range failures for diagnosis.

leaf_hashes_length
integer

Actual number of stored leaf hashes. Returned only on leaf_count_mismatch.

inclusion_proof
object | null

The verified inclusion proof for the requested leaf. Null when leaf_index was not supplied. The caller can recompute the root from leaf_hash plus the sibling path without trusting this endpoint.

verification
object

What was actually checked, so a caller never has to infer it from verified alone.

anchor
object

The confirming anchor. Present only when verified is true.