verify_merkle_proof
Validate Merkle proofs for CryptoPunks ownership verification. Check proof integrity against specified root and punk index using pure computation.
Instructions
Verify that a Merkle proof is valid for a given punk index and Merkle root. Pure computation, no wallet required.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"punk_index": "<punk_index>",
"proof": "<proof>",
"root": "<root>"
},
"name": "verify_merkle_proof"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| punk_index | Yes | CryptoPunk index (0–9999) | |
| proof | Yes | Array of proof hashes | |
| root | Yes | The Merkle root to verify against |
Implementation Reference
- src/handlers.ts:418-425 (handler)Handler logic for verify_merkle_proof, which calls the api.verifyMerkleProof function.
case "verify_merkle_proof": { const result = await api.verifyMerkleProof( args.punk_index, args.proof, args.root, ); return ok(result); } - src/tools.ts:256-264 (schema)Definition and input schema for the verify_merkle_proof tool.
verify_merkle_proof: { description: "Verify that a Merkle proof is valid for a given punk index and Merkle root. Pure computation, no wallet required.", inputSchema: z.object({ punk_index: punkIndex, proof: z.array(z.string()).describe("Array of proof hashes"), root: z.string().describe("The Merkle root to verify against"), }), }, - src/api.ts:263-269 (helper)API helper function that sends the request to verify the Merkle proof.
export async function verifyMerkleProof( punkIndex: number, proof: string[], root: string, ) { return post(BIDS_BASE, "/api/v1/merkle/verify", { punkIndex, proof, root }); }