Skip to main content
Glama
Deconstruct2021

cryptopunks-mcp-server

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
NameRequiredDescriptionDefault
punk_indicesYesThe full set of punk indices in the Merkle tree
target_punk_indexYesThe specific punk to generate a proof for
expected_rootNo

Implementation Reference

  • 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);
  • 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(),
      }),
    },
  • 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 });
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Deconstruct2021/cryptopunks-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server