get-mempool-txids
Retrieve transaction IDs (txids) from the Bitcoin mempool using this tool. Access real-time data to monitor pending transactions and enhance blockchain analysis.
Instructions
Returns mempool txids
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/interface/controllers/MempoolToolsController.ts:27-36 (registration)Registers the MCP tool 'get-mempool-txids'. The inline handler calls MempoolService.getMempoolTxids() and formats the result as text content for the MCP response.private registerGetMempoolTxidsHandler(): void { this.server.tool( "get-mempool-txids", "Returns mempool txids", async () => { const text = await this.mempoolService.getMempoolTxids(); return { content: [{ type: "text", text }] }; } ); }
- Handler logic in MempoolService that fetches raw txids from request service and formats them using formatResponse.async getMempoolTxids(): Promise<string> { const data = await this.requestService.getMempoolTxids(); return formatResponse<IMempoolTxidResponse[]>("Mempool Txids", data); }
- Core helper that makes the API request to the 'mempool/txids' endpoint to retrieve the list of transaction IDs.async getMempoolTxids(): Promise<IMempoolTxidResponse[] | null> { return this.client.makeRequest<IMempoolTxidResponse[]>(`mempool/txids`); }
- Type definition for mempool txid responses, which are strings (txids). Used throughout the chain.export type IMempoolTxidResponse = string;