npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bitview-client

v0.13.0

Published

Bitcoin on-chain analytics client — thousands of metrics, block explorer, and address index

Readme

bitview-client

Zero-dependency JavaScript/TypeScript client for the Bitview Bitcoin analytics API.

npm | API Reference | Source

AI clients can use the same API through the official stateless, read-only MCP endpoint at mcp.bitview.space. No authentication is required.

Installation

npm install bitview-client

You can also copy the index.js file into a project. The published client is a single ES module with no runtime dependencies.

Quick start

import { BitviewClient } from 'bitview-client';

// Use the public API or point the client at a self-hosted Bitview server.
const client = new BitviewClient('https://bitview.space');

// Mempool.space-compatible blockchain endpoints.
const blockHash = await client.getBlockByHeight(800000);
const tx = await client.getTx(
  'a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d',
);

// Typed, chainable series access.
const prices = await client.series.price.close.by.day1
  .last(30)
  .fetch();

// Programmatic access when the series name is only known at runtime.
const samePrices = await client
  .seriesEndpoint('price_close', 'day1')
  .last(30)
  .fetch();

Series endpoints support first(n), last(n), slice(start, end), get(i), skip(n).take(m), fetchCsv(), len(), and version(). They are also thenable, so await endpoint.last(30) is equivalent to calling .fetch().

A value is null where it is missing (mostly a date period without blocks) or undefined (a NaN, or a ratio over zero). The types say exactly where: T | null at the indexes where a value can be missing, and everywhere for value types that can be undefined (floats, Cents, ratios, parts per million).

Pass an options object to configure request behavior:

const client = new BitviewClient({
  baseUrl: 'https://bitview.space',
  timeout: 10_000,
  browserCache: true,
  memCache: 100,
});

The memory cache retains parsed responses by URL and ETag. Node.js sends If-None-Match when it retains a response. A 304 reuses the parsed value without downloading or parsing another body. Browsers handle HTTP revalidation themselves, preserving their HTTP cache and avoiding extra CORS preflights. Changed responses are parsed and replace the cached value.