{"uid":"cap_UTh2cgHxmYSZwtYc8EE6B","slug":"keccak-merkle-tree-and-proof-builder-a4f6496a","name":"Keccak Merkle Tree and Proof Builder","description":"Keccak Merkle tree and proof builder — generate indexed sorted-pair inclusion proofs with domain separation and explicit odd-node promotion.","url":"https://chain-tools.use.x402atlas.com/merkle/build","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pWSXkQL0efqW2ZfsBYVC5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds a Keccak-based Merkle tree from a list of leaves and returns indexed sorted-pair inclusion proofs with domain separation and odd-node promotion.","exampleAgentPrompt":"Build a Keccak Merkle tree from these leaf values — ['0xabc...', '0xdef...', '0x123...', '0x456...'] — and give me the sorted-pair inclusion proof with domain separation for the leaf at index 2, so I can verify it on-chain.","exampleUseCases":[{"title":"ERC-20 airdrop whitelist proofs","prompt":"I have a list of 500 wallet addresses eligible for my token airdrop. Build a Keccak Merkle tree from them and give me the inclusion proof for the address 0xAbCd...1234 so my smart contract can verify claims."},{"title":"NFT allowlist Merkle proof","prompt":"Generate a Merkle tree from this allowlist of addresses for my NFT mint — use domain separation — and return the root plus the proof path for 0xDead...Beef at whatever index it lands on."},{"title":"On-chain governance vote eligibility proof","prompt":"I need to prove that voter 0x9f8e...7b3a is in my governance eligibility set. Can you build a sorted-pair Keccak Merkle tree from the full voter list and return the inclusion proof for that address?"}],"resultDescription":"Returns the computed Merkle root hash, the leaf's position index within the tree, the ordered array of sibling hashes forming the proof path, and metadata about tree depth and odd-node promotion — everything needed to submit and verify an inclusion proof in a Solidity smart contract.","failureModes":["Empty leaf list returns an error — at least one leaf is required","Duplicate or malformed leaf values may cause unexpected tree structure","Domain separator mismatch between builder and verifier will cause on-chain verification failure","Very large leaf sets may time out or exceed payload limits","Incorrect encoding of leaf values (hex vs raw bytes) leads to wrong root computation"],"whenToPreferThis":"Choose this endpoint when you need to generate a Merkle tree and produce inclusion proofs compatible with Keccak-based Solidity verifiers (e.g. OpenZeppelin MerkleProof), particularly when you require indexed sorted-pair hashing, domain separation, and explicit odd-node promotion. Prefer this over rolling your own implementation when deploying airdrops, allowlists, or governance eligibility checks on EVM chains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:33:26.585Z","isFirstParty":false}