get-tx-merkleblock-proof
Retrieve the merkleblock proof for a Bitcoin transaction to verify its inclusion in a block. This tool provides cryptographic proof that a specific transaction exists within the blockchain.
Instructions
Returns the merkleblock proof for a transaction
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| txid | Yes | The txid to get merkleblock proof for |
Implementation Reference
- The MCP tool handler function that invokes TxService.getTxMerkleblockProof and returns formatted text content.async ({ txid }) => { const text = await this.txService.getTxMerkleblockProof({ txid }); return { content: [{ type: "text", text }] }; }
- Zod schema defining the input parameter 'txid' for the tool.{ txid: z.string().length(64).describe("The txid to get merkleblock proof for"), },
- src/interface/controllers/TxToolsController.ts:62-74 (registration)Method that registers the 'get-tx-merkleblock-proof' tool with MCP server, including description, schema, and handler.private registerGetTxMerkleblockProofHandler(): void { this.server.tool( "get-tx-merkleblock-proof", "Returns the merkleblock proof for a transaction", { txid: z.string().length(64).describe("The txid to get merkleblock proof for"), }, async ({ txid }) => { const text = await this.txService.getTxMerkleblockProof({ txid }); return { content: [{ type: "text", text }] }; } ); }
- TxService helper method that fetches the proof from request service and formats it.async getTxMerkleblockProof({ txid }: { txid: string }): Promise<string> { const data = await this.requestService.getTxMerkleblockProof({ txid }); return `Transaction Merkleblock Proof: ${data}`; }
- Request service helper that performs the actual API call to retrieve the merkleblock proof.async getTxMerkleblockProof({ txid }: { txid: string }): Promise<string | null> { return this.client.makeRequest<string>(`tx/${txid}/merkleblock-proof`); }