UNPKG

@sanlim/mempool-mcp-server

Version:

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

28 lines (27 loc) 1.13 kB
import { formatResponse } from "../helpers/format.js"; export class AddressService { requestService; constructor(requestService) { this.requestService = requestService; } async getAddressInfo({ address }) { const data = await this.requestService.getAddressInfo({ address }); return formatResponse("Address Info", data); } async getAddressTxs({ address }) { const data = await this.requestService.getAddressTxs({ address }); return formatResponse("Address Transactions", data); } async getAddressTxsChain({ address }) { const data = await this.requestService.getAddressTxsChain({ address }); return formatResponse("Address Chain Transactions", data); } async getAddressTxsMempool({ address }) { const data = await this.requestService.getAddressTxsMempool({ address }); return formatResponse("Address Mempool Transactions", data); } async getAddressUtxo({ address }) { const data = await this.requestService.getAddressUtxo({ address }); return formatResponse("Address UTXOs", data); } }