Providers

Mempool

mempool.space for Bitcoin. litecoinspace.org for Litecoin. peppool.space for Pepecoin. Fees in sat/vB. Unspent outputs. OP_RETURN decoded. No key.
IDmempool04 / 19keyless
Provider

Mempool

  • bitcoin
  • litecoin
  • pepecoin
Chains
3
Auth
none
Operations
7 of 10
served 7 / 10

Operations

  • balancegetBalanceserved
  • historygetTxHistoryserved
  • tx detailgetTxDetailserved
  • utxosgetUtxosserved
  • pubkeygetPubkeyserved
  • contractgetContractInfoabsent
  • tokensgetTokenBalancesabsent
  • transfersgetTokenTransfersabsent
  • gasgetGasDataserved
  • blockgetBlockInfoserved

Access

Createcreate("mempool")
Import@agntn/explorers/providers/mempool
Hostmempool.space
Statusproviders on the docs worker

Address it

ts
import { Mempool } from "@agntn/explorers/providers/mempool";

const mempool = new Mempool();
const history = await mempool.getTxHistory("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "bitcoin");
history[0]?.opReturn; // [{ hex, text? }] when the transaction carries one
const utxos = await mempool.getUtxos("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "bitcoin");
const reveal = await mempool.getPubkey("1XPTgDRhN8RFnzniWCddobD9iKZatrvH4", "bitcoin");

Default chain Bitcoin. Litecoin goes to litecoinspace.org and Pepecoin to peppool.space, the same Esplora API on three hosts.

What it reads

/api/address/:address for the balance with funded and spent totals and the mempool delta, /api/address/:address/txs for history, /api/address/:address/utxo for the unspent outputs, /api/tx/:hash for one transaction, /api/v1/fees/recommended for fees, and /api/blocks/:height for a block, which answers a page of blocks the provider searches for the exact height. getPubkey needs nothing new. It reads the balance route and the history again.

Gotchas

  • Gas and blocks work on Bitcoin and Litecoin only. Peppool has no fee endpoint and doesn't return complete block metadata, so on Pepecoin those two throw UnsupportedOperationError even though the provider advertises them elsewhere. Capabilities are per provider, not per chain, and this is the one place it shows.
  • Peppool paginates confirmed history with ?after_txid=, not Esplora's /txs/chain/:txid route, and the provider knows which host it's talking to.
  • Peppool allows 15 requests a minute. Go over and the 429 asks you to come back in about a minute. So getPubkey reads 250 rows on Pepecoin, not 1000. An older key comes back as null with spent: true. Better than a wait of a few minutes, right?
  • balance is the confirmed amount. What's sitting in the mempool goes to unconfirmed as a signed delta, so a balance never moves backwards on you when a transaction drops out.
  • /utxo has a ceiling. mempool.space answers 400 past 500 unspent outputs, and the library passes that on as an HTTPError, so the genesis address is exactly the one you can't list. Blockstream draws the same line.
  • OP_RETURN pushes are decoded from every output. hex is always there; text only when the bytes are printable UTF-8, so Runes and Omni carriers never become mojibake.
  • getTxDetail reads Ordinals inscriptions from the input witnesses. A body past 4096 bytes comes back as its size alone. Transactions says why.
  • Fee units are sat/vB on Bitcoin and litoshi/vB on Litecoin, and the unit is in the answer.

Where it lives

src/providers/mempool.ts, with the shared Esplora mapping in src/core/esplora.ts.