curl --request GET \
--url https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}import requests
url = "https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"verified": true,
"agent_id": "<string>",
"reason": "no_merkle_tree",
"merkle_root": "<string>",
"recomputed_root": "<string>",
"leaf_count": 123,
"leaf_hashes_length": 123,
"inclusion_proof": {
"leaf_hash": "<string>",
"leaf_index": 123,
"tree_size": 123,
"siblings": [
{
"hash": "<string>",
"position": "left"
}
]
},
"verification": {
"root_recomputed_from_leaves": true,
"leaf_count": 123,
"leaf_count_checked": true,
"inclusion_proof_verified": true,
"anchored_root_source": "mnemom_database"
},
"anchor": {
"tx_hash": "<string>",
"block_number": 123,
"chain": "base-sepolia",
"anchored_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Verify on-chain proof
Verify an agent’s Merkle commitment.
curl --request GET \
--url https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}import requests
url = "https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/on-chain/verify-proof/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"verified": true,
"agent_id": "<string>",
"reason": "no_merkle_tree",
"merkle_root": "<string>",
"recomputed_root": "<string>",
"leaf_count": 123,
"leaf_hashes_length": 123,
"inclusion_proof": {
"leaf_hash": "<string>",
"leaf_index": 123,
"tree_size": 123,
"siblings": [
{
"hash": "<string>",
"position": "left"
}
]
},
"verification": {
"root_recomputed_from_leaves": true,
"leaf_count": 123,
"leaf_count_checked": true,
"inclusion_proof_verified": true,
"anchored_root_source": "mnemom_database"
},
"anchor": {
"tx_hash": "<string>",
"block_number": 123,
"chain": "base-sepolia",
"anchored_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Path Parameters
Agent identifier (e.g. smolt-abc123)
Query Parameters
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.
x >= 0Response
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.)
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).
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.
no_merkle_tree, no_checkpoint, no_leaf_hashes, root_mismatch, leaf_count_mismatch, leaf_index_out_of_range, inclusion_proof_failed, not_anchored The agent's stored Merkle root. Present when a checkpoint exists (i.e. absent for the no_merkle_tree/no_checkpoint cases).
The root recomputed from the stored leaf hashes. Returned only on root_mismatch, so the discrepancy is inspectable.
Leaf count, included on the leaf_count_mismatch and leaf_index_out_of_range failures for diagnosis.
Actual number of stored leaf hashes. Returned only on leaf_count_mismatch.
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.
Show child attributes
Show child attributes
What was actually checked, so a caller never has to infer it from verified alone.
Show child attributes
Show child attributes
The confirming anchor. Present only when verified is true.
Show child attributes
Show child attributes