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

@bloxwap/smart-hyperevm

v0.1.0

Published

Performance-optimized, load-balanced RPC transport for HyperEVM. A drop-in upgrade over viem's fallback transport.

Readme

Features

| Feature | Value | | ------------------ | --------------------------------------------------------------------------- | | Adaptive routing | Routes by per-method latency, errors, load, and block lag. | | Racing & failover | Parallel reads, hedging, retries, circuit breakers, and rate-limit budgets. | | Warm cache | Sub-millisecond reads, background refresh, and local block numbers. | | Incremental logs | Rolling 1,000-block index; fetches only new blocks. | | Consistent reads | Pins "latest" across endpoints. | | Request efficiency | Coalescing, HTTP batching, and memoized hot paths. | | Lifecycle | Saved scores, hidden-tab pause, and idle shutdown. | | Integration | TypeScript, drop-in viem transport, and offline CI tests. | | Runtimes | Bun, Node.js, browsers, and edge; no runtime dependencies beyond peer viem. |

Performance

One live HyperEVM run compared smartHyperevm() defaults with direct viem http() connections to four public RPC providers. The workload combined block-number, multicall, precompile, log, and balance reads. Latencies are p95 at the transport's request; lower is better.

| Transport | Sequential, all reads | Sequential, warm reads | Concurrent, mostly warm | Errors (sequential / concurrent) | | -------------------------------- | --------------------: | ---------------------: | ----------------------: | -------------------------------: | | smartHyperevm() (defaults) | 129 ms | 0.17 ms | 0.10 ms | 0% / 0% | | Hyperliquid (direct) | 149 ms | 149 ms | 189 ms | 75% / 90% | | HypurrScan (direct) | 196 ms | 196 ms | 185 ms | 0% / 0% | | dRPC (direct) | 218 ms | 223 ms | 224 ms | 20% / 20% | | Stakely (direct) | 2,104 ms | 2,318 ms | 1,482 ms | 0% / 1% |

Warm columns exclude the first iteration; direct providers do not cache. Cold reads still require the network, and the concurrent phase started with a warm smartHyperevm() cache. Cached answers can be one block behind by default, and background refreshes increase upstream traffic. See the full benchmark methodology and results.

Documentation

Browse the full documentation for configuration, routing, caching, telemetry, and benchmarks.

Installation

Bun

bun add @bloxwap/smart-hyperevm

Node.js 22.12+

npm i @bloxwap/smart-hyperevm

pnpm

pnpm add @bloxwap/smart-hyperevm

Yarn

yarn add @bloxwap/smart-hyperevm

Quick Example

Read

// 1. Import module
import { createPublicClient } from "viem";
import { hyperEvm } from "viem/chains";
import { smartHyperevm } from "@bloxwap/smart-hyperevm";

// 2. Set up client with transport
const client = createPublicClient({
  chain: hyperEvm,
  transport: smartHyperevm(),
});

// 3. Query data
const block = await client.getBlockNumber();

Configure

// 1. Import modules
import { http } from "viem";
import { smartHyperevm } from "@bloxwap/smart-hyperevm";

// 2. Set up transport with your endpoints
const transport = smartHyperevm({
  endpoints: ["https://rpc.hyperliquid.xyz/evm", http("https://rpc.hypurrscan.io", { batch: true })],
});

// 3. Use it from a viem client
// createPublicClient({ chain: hyperEvm, transport })

Hedging is off unless you set hedge. When it is on, a slow idempotent read is copied to the next endpoint and the first success wins. Racing is on by default: each idempotent read goes to the two best-scored endpoints at once (race: { width } for more, race: false for one), and the first answer wins. Sends are never hedged or raced. Signed raw transactions fail over on endpoint errors. Other sends go to one endpoint.

Production

Use explicit, trusted endpoints in services and create the transport once per process or Worker isolate.

import { smartHyperevm } from "@bloxwap/smart-hyperevm";

const transport = smartHyperevm({
  endpoints: [
    { url: env.HYPERPC_URL, label: "hyperpc" },
    { url: env.DRPC_URL, label: "drpc" },
    "https://rpc.hyperliquid.xyz/evm",
  ],
  timeout: 3_500,
  hedge: true,
});
  • On Workers, set headLag: { probeInterval: false } to avoid timers outside requests.
  • Racing, pinning, coalescing, and caching are on by default. Cached answers may be one block behind and increase upstream traffic; forward log scanners should use cache: { maxStaleBlocks: 0 }.
  • Set endpoint rps and burst values to stay within provider rate limits.
  • Call transport.value.close() on shutdown to stop timers and save persisted scores.

See all options and defaults.

Observe

const transport = smartHyperevm({
  onEvent(event) {
    if (event.type === "failover") console.log(event.from, "->", event.to);
  },
});

Use onEvent for telemetry and transport.value.snapshot() for current routing state.

[!WARNING]

  • Load private RPC URLs from the environment and never commit credentials. Events and errors expose labels rather than keyed URLs.
  • Signed raw transactions may be rebroadcast after endpoint errors. Set rebroadcastRawTransactions: false to send only once.
  • This package routes JSON-RPC; it does not sign transactions or hold a wallet.