@sanlim/mempool-mcp-server
Version:
A sample of MCP implementation using DDD structure with some APIs call.
25 lines (24 loc) • 744 B
JavaScript
export class TxRequestService {
client;
constructor(client) {
this.client = client;
}
async getTxInfo({ txid }) {
return this.client.makeRequest(`tx/${txid}`);
}
async getTxStatus({ txid }) {
return this.client.makeRequest(`tx/${txid}/status`);
}
async getTxRaw({ txid }) {
return this.client.makeRequest(`tx/${txid}/raw`);
}
async getTxMerkleblockProof({ txid }) {
return this.client.makeRequest(`tx/${txid}/merkleblock-proof`);
}
async getTxOutspend({ txid, vout }) {
return this.client.makeRequest(`tx/${txid}/outspend/${vout}`);
}
async getTxOutspends({ txid }) {
return this.client.makeRequest(`tx/${txid}/outspends`);
}
}