get-mining-pools
Retrieve real-time mining pools data from the Bitcoin network, providing insights into pool activity and distribution for informed analysis and decision-making.
Instructions
Returns mining pools info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Executes the core logic of the 'get-mining-pools' tool by making an API request to the 'mining/pools' endpoint using the IApiClient.async getMiningPools(): Promise<IMiningPoolsResponse[] | null> { return this.client.makeRequest<IMiningPoolsResponse[]>(`mining/pools`); }
- src/interface/controllers/MiningToolsController.ts:17-26 (registration)Registers the MCP tool 'get-mining-pools' with the server, defining its description and handler function that delegates to MiningService.private registerGetMiningPoolsHandler(): void { this.server.tool( "get-mining-pools", "Returns mining pools info", async () => { const text = await this.miningService.getMiningPools(); return { content: [{ type: "text", text }] }; } ); }
- Intermediate service method that fetches data from MiningRequestService and formats it into a string response using formatResponse helper.async getMiningPools(): Promise<string> { const data = await this.requestService.getMiningPools(); return formatResponse<IMiningPoolsResponse[]>("Mining Pools", data); }
- TypeScript interface defining the expected structure of each mining pool in the response array.export interface IMiningPoolsResponse { id: string; name: string; hash_rate: number; blocks_mined: number; }