@sanlim/mempool-mcp-server
Version:
A sample of MCP implementation using DDD structure with some APIs call.
20 lines (19 loc) • 694 B
JavaScript
import { formatResponse } from "../helpers/format.js";
export class MiningService {
requestService;
constructor(requestService) {
this.requestService = requestService;
}
async getMiningPools() {
const data = await this.requestService.getMiningPools();
return formatResponse("Mining Pools", data);
}
async getMiningPool({ poolId }) {
const data = await this.requestService.getMiningPool({ poolId });
return formatResponse("Mining Pool", data);
}
async getMiningBlocksFees24h() {
const data = await this.requestService.getMiningBlocksFees24h();
return formatResponse("Mining Blocks Fees 24h", data);
}
}