Keccak Merkle proof verifier — validate inclusion plus exact leaf index and count proof sh
Keccak Merkle proof verifier — validate inclusion plus exact leaf index and count proof shape for the Atlas sorted-pair tree profile.
5000 (raw units)
price
3
calls / 30d
2
unique payers
2026-09-15
updated
Provider
chain-tools.use.x402atlas.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:137",
"payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
"asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"amount": "5000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:42161",
"payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
"asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"amount": "5000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"category": "utilities",
"info": {
"input": {
"body": {
"index": 2,
"leaf": "0x67616d6d61",
"leaf_count": 3,
"proof": [
{
"hash": "0xbfa0350c48ccd55fb3a8315a6d6bfc41877772eaebfcba73cb195984df5b3d32"
}
],
"root": "0x40a0fa2d0ce898ef138c3403645be77705df9d485ecc137b02b35eb9fdeaaf94"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"algorithm_version": "keccak256-sorted-pairs-v1",
"index": 2,
"leaf": "0x67616d6d61",
"leaf_count": 3,
"leaf_hash": "0xe51a809d0bd7c39f11aa7f9ff0ba85099028c7d56f42313f3bb5495a7b967146",
"operation": "merkle-verify",
"root": "0x40a0fa2d0ce898ef138c3403645be77705df9d485ecc137b02b35eb9fdeaaf94",
"valid": true,
"warnings": []
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"index": {
"description": "Zero-based caller-supplied index used to validate proof shape; sorted-pair hashing does not prove left/right position",
"maximum": 1023,
"minimum": 0,
"type": "integer"
},
"leaf": {
"description": "Raw leaf bytes",
"maxLength": 8194,
"pattern": "^0x(?:[0-9a-fA-F]{2})*$",
"type": "string"
},
"leaf_count": {
"description": "Original tree leaf count controlling proof shape",
"maximum": 1024,
"minimum": 1,
"type": "integer"
},
"proof": {
"description": "Sibling hashes in leaf-to-root order; odd promotions omit a step",
"items": {
"additionalProperties": false,
"properties": {
"hash": {
"description": "Sibling node hash",
"pattern": "^0x[0-9a-fA-F]{64}$",
"type": "string"
}
},
"required": [
"hash"
],
"type": "object"
},
"maxItems": 10,
"type": "array"
},
"root": {
"description": "Expected tree root",
"pattern": "^0x[0-9a-fA-F]{64}$",
"type": "string"
}
},
"required": [
"leaf",
"index",
"leaf_count",
"root",
"proof"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": false,
"properties": {
"_atlas": {
"additionalProperties": false,
"description": "Atlas documentation and related-route metadata added after deployment",
"properties": {
"docs": {
"description": "Documentation URL for this bridge",
"format": "uri",
"maxLength": 512,
"type": "string"
},
"related": {
"description": "Bounded related Atlas routes",
"items": {
"additionalProperties": false,
"description": "One related Atlas route",
"properties": {
"bridge": {
"description": "Related bridge name",
"maxLength": 64,
"type": "string"
},
"docs": {
"description": "Related bridge documentation URL",
"format": "uri",
"maxLength": 512,
"type": "string"
},
"summary": {
"description": "Short capability summary",
"maxLength": 256,
"type": "string"
},
"url": {
"description": "Related route URL",
"format": "uri",
"maxLength": 512,
"type": "string"
}
},
"required": [
"bridge",
"url",
"docs",
"summary"
],
"type": "object"
},
"maxItems": 3,
"type": "array"
}
},
"required": [
"docs"
],
"type": "object"
},
"algorithm_version": {
"const": "keccak256-sorted-pairs-v1",
"description": "Atlas tree profile",
"type": "string"
},
"index": {
"description": "Caller-supplied index whose count-derived proof shape was checked; sorted pairs do not prove left/right position",
"type": "integer"
},
"leaf": {
"description": "Normalized raw leaf",
"type": "string"
},
"leaf_count": {
"description": "Caller-supplied original leaf count used to validate proof shape",
"type": "integer"
},
"leaf_hash": {
"description": "Domain-separated leaf hash",
"type": "string"
},
"operation": {
"const": "merkle-verify",
"description": "Stable route operation",
"type": "string"
},
"root": {
"description": "Expected root",
"type": "string"
},
"valid": {
"description": "Whether the exact shaped proof computes to root",
"type": "boolean"
},
"warnings": {
"description": "Always empty",
"items": {
"description": "Warning",
"type": "string"
},
"maxItems": 0,
"type": "array"
}
},
"required": [
"operation",
"algorithm_version",
"leaf",
"leaf_hash",
"index",
"leaf_count",
"root",
"valid",
"warnings"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
},
"tags": [
"merkle-proof",
"merkle-verify",
"keccak256",
"proof-verification",
"blockchain-development"
]
}
}Use it
curl
curl "https://chain-tools.use.x402atlas.com/merkle/verify" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://chain-tools.use.x402atlas.com/merkle/verify");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://chain-tools.use.x402atlas.com/merkle/verify")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/3456.json, and this resource appears in /discovery/resources and /discovery/search.