Build a Read-Only Litecoin Explorer with a Public API
Build a static browser with safe rendering, exact units, caching, pagination, and honest error states.
Read the field note · 7 minA lightweight HTML5 and Tailwind CSS v4 interface, with read-only browser requests and explicit provider limits. No database or server application is required to serve this package.
The site serves static HTML pages and a compiled stylesheet. Its small JavaScript adapter requests supported public data directly from BlockCypher after the visitor enables it. All guides, images, and navigation remain available without the remote API. No API credential, wallet connection, signing operation, or transaction-broadcast endpoint is included.
The adapter uses the provider’s Litecoin mainnet resource. These are public read-only request shapes, not endpoints hosted by this website. The BlockCypher API reference defines supported fields, pagination parameters, base-unit amounts, and rate-limit behavior.
GET https://api.blockcypher.com/v1/ltc/main
GET https://api.blockcypher.com/v1/ltc/main/blocks/{height}?txstart=0&limit=25
GET https://api.blockcypher.com/v1/ltc/main/txs/{txid}?limit=50
GET https://api.blockcypher.com/v1/ltc/main/addrs/{address}?limit=25
GET https://api.blockcypher.com/v1/ltc/main/txs?limit=12
Selected records use ordinary directory pages with URL parameters. The containing HTML page exists on the server, so custom rewrite rules are unnecessary. These dynamic-detail shells are marked noindex; the substantive guides and browse landing pages are indexable.
/block/?height={selected-block-height}
/transaction/?id={selected-transaction-hash}
/address/?address={selected-transparent-address}
A URL parameter is still untrusted input even though there is no search form. The client checks identifier shapes, bounds block heights, encodes request paths, escapes remote text, and restricts generated external links to a known explorer origin. Lightweight address checks are preliminary, not a replacement for full wallet-grade validation.
Supported amount fields are rendered from exact base-unit integers with eight decimal places. Missing or unsupported values are labeled unavailable rather than converted to zero. The API’s fee estimates retain their base-units-per-kilobyte label.
Public responses can be cached in session storage for 90 seconds. Their fetch time stays attached to the observation. There is no background polling. The visitor’s first-click permission lasts only for the tab’s session and can be cleared on the privacy page.
Requests are sequentially paced and have a 12-second timeout. Rate-limit, not-found, network, and unsupported-response states are displayed explicitly. An API or CORS failure does not disable local articles. Never embed a private provider key in this static JavaScript.
Block transaction identifiers paginate in groups of 25. Transaction views show up to 50 supplied inputs and outputs. Address views show at most 25 recent references, not complete wallet history. The mempool view samples at most 12 pending records. Large or unusual transactions, some address formats, and MWEB-specific data may not be fully supported by the provider.
For independent verification rather than a provider view, investigate running an appropriately configured node. Litecoin Core’s RPC interface documentation describes that different trust boundary. Do not expose a wallet-enabled RPC interface directly to the public web.
The complete API field note discusses safe rendering, testing, browser cross-origin access, and the distinction between a static client and an independently validating explorer infrastructure.
Build a static browser with safe rendering, exact units, caching, pagination, and honest error states.
Read the field note · 7 minMake sense of block height, hashes, timestamps, transaction counts, and derived measurements.
Read the field note · 7 minFind the right record, follow a payment, and understand what an explorer can actually prove.
Read the field note · 7 min