UNPKG

@sanlim/mempool-mcp-server

Version:

A sample of MCP implementation using DDD structure with some APIs call.

20 lines (19 loc) 688 B
import { formatResponse } from "../helpers/format.js"; export class GeneralService { requestService; constructor(requestService) { this.requestService = requestService; } async getDifficultyAdjustment() { const data = await this.requestService.getDifficultyAdjustment(); return formatResponse("Difficulty Adjustment", data); } async getPrice() { const data = await this.requestService.getPrice(); return formatResponse("Current Price", data); } async getHistoricalPrice(date) { const data = await this.requestService.getHistoricalPrice(date); return formatResponse("Historical Price", data); } }