generate_batch_proofs
Generate Merkle proofs for multiple CryptoPunks simultaneously to verify ownership without wallet access, improving efficiency over single-proof methods.
Instructions
Generate Merkle proofs for multiple target punks within a set in a single request. Pure computation, no wallet required. More efficient than calling generate_merkle_proof repeatedly.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| punk_indices | Yes | The full set of punk indices in the Merkle tree | |
| target_punk_indices | Yes | The specific punks to generate proofs for | |
| expected_root | No |
Implementation Reference
- src/handlers.ts:427-434 (handler)The handler function that executes the generate_batch_proofs tool by calling the API.
case "generate_batch_proofs": { const result = await api.generateBatchProofs({ punkIndices: args.punk_indices, targetPunkIndices: args.target_punk_indices, expectedRoot: args.expected_root, }); return ok(result); } - src/tools.ts:266-276 (schema)The definition and input schema for the generate_batch_proofs tool.
generate_batch_proofs: { description: "Generate Merkle proofs for multiple target punks within a set in a single request. Pure computation, no wallet required. More efficient than calling generate_merkle_proof repeatedly.", inputSchema: z.object({ punk_indices: z.array(punkIndex).min(1).describe("The full set of punk indices in the Merkle tree"), target_punk_indices: z .array(punkIndex) .min(1) .describe("The specific punks to generate proofs for"), expected_root: z.string().optional(), }), - src/api.ts:271-277 (helper)The API implementation that performs the backend request for generateBatchProofs.
export async function generateBatchProofs(params: { punkIndices: number[]; targetPunkIndices: number[]; expectedRoot?: string; }) { return post(BIDS_BASE, "/api/v1/merkle/batch-proofs", params); }