generate_merkle_root
Generate a Merkle root from CryptoPunk indices to construct collection bids. Pure computation without wallet requirements.
Instructions
Generate a Merkle root for a set of CryptoPunk indices. Pure computation, no wallet required. Used as the first step in constructing a collection bid.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| punk_indices | Yes | Punk indices to include in the Merkle tree | |
| expected_root | No | Optional: verify the result matches this expected root |
Implementation Reference
- src/api.ts:251-253 (handler)The actual API call logic for generating the Merkle root.
export async function generateMerkleRoot(punkIndices: number[], expectedRoot?: string) { return post(BIDS_BASE, "/api/v1/merkle/root", { punkIndices, expectedRoot }); } - src/handlers.ts:401-407 (handler)The MCP tool handler that invokes the API function.
case "generate_merkle_root": { const result = await api.generateMerkleRoot( args.punk_indices, args.expected_root, ); return ok(result); } - src/tools.ts:234-244 (registration)The tool definition and schema registration.
generate_merkle_root: { description: "Generate a Merkle root for a set of CryptoPunk indices. Pure computation, no wallet required. Used as the first step in constructing a collection bid.", inputSchema: z.object({ punk_indices: z.array(punkIndex).min(1).describe("Punk indices to include in the Merkle tree"), expected_root: z .string() .optional() .describe("Optional: verify the result matches this expected root"), }), },