Mempool js

From claude-dev-suite/claude-dev-suite · View interactive version

Mempool js is an AI agent skill from the GitHub repository claude-dev-suite/claude-dev-suite. mempool.js (@mempool/mempool.js): TypeScript client for mempool.space API. REST + WebSocket; address history, fee estimates, mining stats. USE WHEN: integrating mempool.space data, building wallets / explorers.

How to use this skill

Skill file

mempool.js

Official mempool.space API client.

Repo: github.com/mempool/mempool.js.

Install

npm install @mempool/mempool.js

Quick examples

import mempoolJS from "@mempool/mempool.js";

const { bitcoin: { addresses, fees, transactions, blocks, mempool } } =
    mempoolJS({ hostname: "mempool.space" });

// Fees
const recommended = await fees.getFeesRecommended();
// { fastestFee, halfHourFee, hourFee, economyFee, minimumFee }

// Address
const utxos = await addresses.getAddressTxsUtxo({ address: "bc1q..." });
const txs = await addresses.getAddressTxs({ address: "bc1q..." });

// Tx
const tx = await transactions.getTx({ txid: "abc..." });
const status = await transactions.getTxStatus({ txid: "abc..." });

// Mempool
const blocksProj = await mempool.getMempoolBlocks();

WebSocket

const ws = await mempoolJS.ws({ hostname: "mempool.space" });
ws.on("blocks", (block) => console.log("New block:", block.id));
ws.on("mempool-blocks", (mbs) => console.log("Projection:", mbs));
ws.send({ action: "want", data: ["blocks", "mempool-blocks"] });

Use cases

Self-hosted

Same API works against your own mempool.space instance:

mempoolJS({ hostname: "your-mempool.local" });

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.