generate_merkle_proof
Generate a Merkle proof to verify a specific CryptoPunk is included in a collection bid for on-chain settlement. Uses pure computation without requiring wallet access.
Instructions
Generate a Merkle proof for a single punk within a set of punk indices. Pure computation, no wallet required. Used to prove a specific punk is included in a collection bid for on-chain settlement.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| punk_indices | Yes | The full set of punk indices in the Merkle tree | |
| target_punk_index | Yes | The specific punk to generate a proof for | |
| expected_root | No |
Implementation Reference
- src/handlers.ts:409-415 (handler)The handler in the MCP server that calls the API function when the `generate_merkle_proof` tool is executed.
case "generate_merkle_proof": { const result = await api.generateMerkleProof( args.punk_indices, args.target_punk_index, args.expected_root, ); return ok(result); - src/tools.ts:246-254 (schema)The definition of the `generate_merkle_proof` tool, including its input schema and description.
generate_merkle_proof: { description: "Generate a Merkle proof for a single punk within a set of punk indices. Pure computation, no wallet required. Used to prove a specific punk is included in a collection bid for on-chain settlement.", inputSchema: z.object({ punk_indices: z.array(punkIndex).min(1).describe("The full set of punk indices in the Merkle tree"), target_punk_index: punkIndex.describe("The specific punk to generate a proof for"), expected_root: z.string().optional(), }), }, - src/api.ts:255-261 (handler)The API implementation that performs the request to generate the Merkle proof.
export async function generateMerkleProof( punkIndices: number[], targetPunkIndex: number, expectedRoot?: string, ) { return post(BIDS_BASE, "/api/v1/merkle/proof", { punkIndices, targetPunkIndex, expectedRoot }); }