eCash Explorer
eCash Explorer
- ecash
- Chains
- 1
- Auth
- none
- Operations
- 2 of 10
Operations
- balance
getBalanceabsent - history
getTxHistoryserved - tx detail
getTxDetailabsent - utxos
getUtxosabsent - pubkey
getPubkeyabsent - contract
getContractInfoabsent - tokens
getTokenBalancesabsent - transfers
getTokenTransfersabsent - gas
getGasDataabsent - block
getBlockInfoserved
Access
- Create
create("ecash") - Import
@agntn/explorers/providers/ecash - Host
explorer.e.cash - Statusproviders on the docs worker
Address it
import { ECash } from "@agntn/explorers/providers/ecash";
const xec = new ECash(); // or create("ecash")
await xec.getTxHistory("ecash:qq5r308v2mkh6x5mkqpr6wytszz6f9r7qcnfttev0z", "ecash", { limit: 10 });
await xec.getBlockInfo(963629, "ecash");
One chain, no key. explorer.e.cash is the block explorer Bitcoin ABC runs on top of its Chronik indexer. baseUrl is the explorer root, https://explorer.e.cash by default.
Why bother, when Blockchair already reads eCash? Because keyless Blockchair spends one request on the address and one more on every transaction in it. A handful of reads later your IP sits on its blacklist. Here a whole page of history is one request. So history and blocks now start on eCash Explorer, and with BLOCKCHAIR_API_KEY set they start on Blockchair and fall back here. Any other chain is an UnsupportedChainError.
What it reads
| Operation | Route |
|---|---|
| history | /api/address/{address}/transactions?page=&take= |
| block | /api/blocks/{height - 1}/{height} |
That's the whole JSON side. The balance, a single transaction and the unspent outputs only exist as HTML pages. Scraping them? No thanks. getBalance throws UnsupportedOperationError, and the automatic choice sends balances to Blockchair, which still answers them fine.
Gotchas
- The explorer reads one spelling: lowercase CashAddr with the
ecash:prefix. Anything else gets a 500 page. So the provider checks the address with@agntn/chainsfirst, then adds the prefix and lowers the case. A Bitcoin Cash address fails before a request goes out. - A history row gives only the net change of the address, never the other side. Negative means a send:
fromis the address,toisnullandvalueis what left minus the fee, the way Mempool counts it. Anything else is a receive, withfromempty andtothe address. - The fee is inputs minus outputs. A block reward has no inputs, so it gets no
feeat all. timestampis when Chronik first saw the transaction. That can be minutes before its block was mined. The block time shows up only for a transaction that never sat in Chronik's mempool.- Mempool transactions come first and read as
pendingat block 0. - Newest first and only that way, so
sort: "asc"throws. No block bounds either, sostartBlockandendBlockthrow instead of being ignored. limitup to 100, andpagefrom 1 becomes Chronik's page index from 0. Past the last page you get an empty list.- Token rows keep their token details in
raw.tokenTransfersstays empty, because the row only says how much of one token moved, not between whom. - A block range comes newest first. The provider asks for the block and the one below it, so the parent hash costs no extra request. Genesis gets the all-zero parent, and a height past the tip is a
NotFoundError. - A block has an empty
minerand gas fields of"0". eCash has no gas, no surprise.
Where it lives
src/providers/ecash.ts.