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

@theqrl/web3-providers-http

v1.0.3

Published

HTTP provider for Web3

Downloads

554

Readme

@theqrl/web3.js - Http Provider

ES Version Node Version NPM Package Downloads

This is a sub-package of @theqrl/web3.js.

@theqrl/web3-providers-http contains the Web3.js provider for the HTTP protocol.

Installation

You can install the package either using NPM or using pnpm

Using NPM

npm install @theqrl/web3-providers-http

Using pnpm

pnpm add @theqrl/web3-providers-http

Getting Started

Request bounds

Every request is bounded by default. No configuration is required, and the bounds cannot be disabled — only re-tuned to a different finite value.

| Option | Default | Bounds | | ------------------- | -------------- | ----------------------------------------------- | | connectionTimeout | 30_000 (30s) | Time to response headers only | | requestTimeout | 120_000 (2m) | The whole request, body read included | | maxResponseBytes | 10485760 (10 MiB) | Decoded response bytes accepted from the node |

const provider = new HttpProvider('https://node.example', {
	requestTimeout: 300_000, // a longer, still finite deadline
	maxResponseBytes: 32 * 1024 * 1024,
});

// Per-request override, composed with a caller signal.
await provider.request(payload, { requestTimeout: 5_000, signal: controller.signal });

Precedence. requestOptions.requestTimeout > the constructor's requestTimeout > the 120s default. The two timeouts are separate phases: connectionTimeout is retired once headers arrive, so it never truncates a slow body read.

Composed abort. A caller signal is composed with the deadline, never substituted for it — whichever fires first wins, and neither can be used to disable the other. A caller abort propagates with the caller's own reason; only a deadline yields a timeout error.

No infinite opt-out. Infinity, NaN and values <= 0 are rejected at the point they are supplied. An expensive archival, log or batch call should name a longer finite deadline rather than opting out. There is intentionally no per-method timeout table: the finite transport default applies uniformly.

Response cap. Response bytes are counted as they stream in and the read is aborted as soon as the total exceeds maxResponseBytes, so an oversized body is never fully buffered. content-length is only an early-rejection optimization — it may be absent on a chunked response, or simply false — so the streamed count is authoritative.

Errors

| Error | Meaning | | ------------------------- | ------------------------------------------------------------- | | ConnectionTimeoutError | Response headers did not arrive within connectionTimeout | | RequestTimeoutError | The request exceeded requestTimeout | | ResponseTooLargeError | The response exceeded maxResponseBytes | | ProviderCapabilityError | A non-empty response exposed no readable body, so the size bound could not be enforced; the provider fails closed rather than reading it unbounded | | ProviderError | An invalid (non-finite) timeout option |

[!IMPORTANT] A timeout means the outcome is unknown — not that the request was rejected. The node may have received, accepted and executed the call; only the answer failed to arrive in time. For state-changing calls such as transaction submission, never treat a timeout as "it did not happen": resubmitting without checking first risks a duplicate. Query by hash/nonce to establish the actual outcome. A caller abort carries the same caveat — it stops you waiting, it does not undo anything already in flight.

ResponseTooLargeError extends BaseWeb3Error, not ResponseError: a refused response has no JSON-RPC error payload to carry.

Prerequisites

Package.json Scripts

| Script | Description | | ---------------- | -------------------------------------------------- | | clean | Uses rimraf to remove dist/ | | build | Uses tsc to build package and dependent packages | | lint | Uses eslint to lint package | | lint:fix | Uses eslint to check and fix any warnings | | format | Uses prettier to format the code | | test | Uses jest to run unit tests | | test:integration | Uses jest to run tests under /test/integration | | test:unit | Uses jest to run tests under /test/unit |