E

EVM & Solana Utility Tools · Merkle Verify

by EVM & Solana Utility Tools

POSTBaseArbitrumPolygon

$0.005

per call · USD Coin on Base

Keccak Merkle proof verifier — validate inclusion plus exact leaf index and count proof shape for the Atlas sorted-pair tree profile.

Endpoint

POST https://chain-tools.use.x402atlas.com/merkle/verify

3

Calls / 30d

2

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://chain-tools.use.x402atlas.com/merkle/verify", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "index": 2,
    "leaf": "0x67616d6d61",
    "leaf_count": 3,
    "proof": [
      {
        "hash": "0xbfa0350c48ccd55fb3a8315a6d6bfc41877772eaebfcba73cb195984df5b3d32"
      }
    ],
    "root": "0x40a0fa2d0ce898ef138c3403645be77705df9d485ecc137b02b35eb9fdeaaf94"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://chain-tools.use.x402atlas.com/merkle/verify" \
  -H "Content-Type: application/json" \
  -d '{"index":2,"leaf":"0x67616d6d61","leaf_count":3,"proof":[{"hash":"0xbfa0350c48ccd55fb3a8315a6d6bfc41877772eaebfcba73cb195984df5b3d32"}],"root":"0x40a0fa2d0ce898ef138c3403645be77705df9d485ecc137b02b35eb9fdeaaf94"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "algorithm_version": "keccak256-sorted-pairs-v1",
  "index": 2,
  "leaf": "0x67616d6d61",
  "leaf_count": 3,
  "leaf_hash": "0xe51a809d0bd7c39f11aa7f9ff0ba85099028c7d56f42313f3bb5495a7b967146",
  "operation": "merkle-verify",
  "root": "0x40a0fa2d0ce898ef138c3403645be77705df9d485ecc137b02b35eb9fdeaaf94",
  "valid": true,
  "warnings": []
}

Payment details

Pay to0x8c128f1ee62bb5e47867cfbae2ad89be325df1b2
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Arbitrum, Polygon
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from EVM & Solana Utility Tools & similar services