> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mnemom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Using On-Chain Verification

> The three read-only endpoints for checking an agent's on-chain anchor status, verifying its Merkle proof, and browsing anchor history.

For the conceptual background -- why Mnemom anchors data on-chain, what gets published, and the honest scope limits of what "verified" means -- see [On-Chain Verification](/concepts/on-chain-verification).

<Note>
  All three endpoints below need no authentication for agents whose reputation is public (or not yet scored). For an agent whose reputation is **private**, they return `403 reputation_private` unless you are an authenticated member of the org that governs the agent -- the same rule as [`GET /v1/reputation/{agent_id}`](/api-reference/endpoint/get-reputation-agent-id). History filtered by `agent_id` follows the same rule. Anchoring and score publishing themselves are **not customer-callable** -- Mnemom runs them on an internal 6-hour cron, and each run publishes only the scores that changed since their last confirmed publication.
</Note>

***

## Verify an agent's Merkle proof

```
GET /v1/on-chain/verify-proof/{agent_id}
```

Recomputes the agent's Merkle root from its stored leaves, checks the leaf count, optionally verifies a single leaf's inclusion proof, and looks up the confirming anchor by the recomputed root.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.mnemom.ai/v1/on-chain/verify-proof/mnm-550e8400-e29b-41d4-a716-446655440000"
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    'https://api.mnemom.ai/v1/on-chain/verify-proof/mnm-550e8400-e29b-41d4-a716-446655440000?leaf_index=3',
  );
  const result = await res.json();

  if (result.verified) {
    console.log('Anchored at:', result.anchor.chain, result.anchor.block_number);
  } else {
    console.log('Not verified:', result.reason);
  }
  ```

  ```python Python theme={null}
  import httpx

  result = httpx.get(
      "https://api.mnemom.ai/v1/on-chain/verify-proof/mnm-550e8400-e29b-41d4-a716-446655440000",
      params={"leaf_index": 3},
  ).json()

  if result["verified"]:
      print("Anchored at:", result["anchor"]["chain"], result["anchor"]["block_number"])
  else:
      print("Not verified:", result["reason"])
  ```
</CodeGroup>

**Response (verified):**

```json theme={null}
{
  "verified": true,
  "agent_id": "mnm-550e8400-e29b-41d4-a716-446655440000",
  "merkle_root": "0x3a8c...",
  "inclusion_proof": {
    "leaf_hash": "0x91fe...",
    "leaf_index": 3,
    "tree_size": 347,
    "siblings": [{ "hash": "0x02aa...", "position": "left" }]
  },
  "verification": {
    "root_recomputed_from_leaves": true,
    "leaf_count": 347,
    "leaf_count_checked": true,
    "inclusion_proof_verified": true,
    "anchored_root_source": "mnemom_database"
  },
  "anchor": {
    "tx_hash": "0x1234...",
    "block_number": 18234567,
    "chain": "base",
    "anchored_at": "2026-02-26T10:30:00.000Z"
  }
}
```

`leaf_index` is optional; omit it to run only the root-recomputation and leaf-count checks. When `verified` is `false`, a `reason` explains which step failed: `no_merkle_tree`, `no_checkpoint`, `no_leaf_hashes`, `root_mismatch`, `leaf_count_mismatch`, `leaf_index_out_of_range`, `inclusion_proof_failed`, or `not_anchored`.

<Warning>
  `anchored_root_source: "mnemom_database"` means the anchored root this check compares against was read from Mnemom's own record of what it anchored, not from a live Base RPC call. See [the scope-limit note](/concepts/on-chain-verification#verifying-against-the-anchor) before treating `verified: true` as a fully trust-minimized result.
</Warning>

***

## Check an agent's on-chain status

```
GET /v1/on-chain/status/{agent_id}
```

A lighter-weight summary: the agent's most recent score publication, its latest confirmed anchor, and its current Merkle tree metadata. Each of the three is `null` when no matching row exists yet. Because unchanged scores aren't republished, `latest_score_publication` can be older than `latest_anchor` for an agent whose score has been stable.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.mnemom.ai/v1/on-chain/status/mnm-550e8400-e29b-41d4-a716-446655440000"
  ```

  ```typescript TypeScript theme={null}
  const status = await fetch(
    'https://api.mnemom.ai/v1/on-chain/status/mnm-550e8400-e29b-41d4-a716-446655440000',
  ).then((r) => r.json());

  if (status.latest_anchor) {
    console.log('Last anchored at block', status.latest_anchor.block_number);
  }
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "agent_id": "mnm-550e8400-e29b-41d4-a716-446655440000",
  "latest_score_publication": {
    "score": 782,
    "grade": "A",
    "tx_hash": "0xabcd...",
    "block_number": 18234589,
    "chain": "base",
    "status": "confirmed",
    "published_at": "2026-02-26T10:35:00.000Z"
  },
  "latest_anchor": {
    "tx_hash": "0x1234...",
    "block_number": 18234567,
    "chain": "base",
    "anchored_at": "2026-02-26T10:30:00.000Z"
  },
  "merkle_tree": {
    "merkle_root": "0x3a8c...",
    "leaf_count": 347,
    "tree_depth": 9,
    "updated_at": "2026-02-26T10:25:00.000Z"
  }
}
```

***

## Browse anchor history

```
GET /v1/on-chain/history
```

A paginated list of Merkle-root anchoring events (not score publications -- there is no publication history endpoint).

**Query parameters:** `chain` (`base` or `base-sepolia`), `agent_id` (filter to anchors that included this agent), `from` / `to` (ISO 8601 date-time range), `limit` (1-100, default 50), `offset`.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.mnemom.ai/v1/on-chain/history?chain=base&limit=10"
  ```

  ```typescript TypeScript theme={null}
  const history = await fetch(
    'https://api.mnemom.ai/v1/on-chain/history?limit=10',
  ).then((r) => r.json());

  for (const anchor of history.anchors) {
    console.log(`block ${anchor.block_number}: ${anchor.merkle_root}`);
  }
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "anchors": [
    {
      "tx_hash": "0x1234...",
      "block_number": 18234567,
      "chain": "base",
      "anchored_at": "2026-02-26T10:30:00.000Z"
    }
  ],
  "limit": 10,
  "offset": 0
}
```

***

## See also

* [On-Chain Verification Concepts](/concepts/on-chain-verification) -- why anchoring exists, what it does and doesn't guarantee
* [On-Chain API Reference](/api-reference/on-chain-overview) -- full schema reference
* [Mnemom Trust Rating](/concepts/reputation-scores) -- how the anchored scores are computed


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.