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

@ramprasad4121/stale

v0.2.0

Published

Guardrail for onchain agents — BLOCK if Chainlink price is stale

Readme

stale

Guardrail for onchain agents. Before an agent acts on a Chainlink price, stale checks whether that price is still fresh. If it is stale, expired, or not-yet-valid, it returns BLOCK and a notify message. It never sends a transaction. It never invents a feed. It fails closed on every path that could let a stale price through.

Install

npm install @ramprasad4121/stale

(or)

git clone https://github.com/Ramprasad4121/stale.git && cd stale && npm install # secondary: local dev path

Use

CLI:

npx stale --rpc $RPC_URL --maxAge 3600 npx stale --rpc $RPC_URL --maxAge 60 --feed 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c --amount 0.5

Library:

import { checkPrice } from "@ramprasad4121/stale";

const r = await checkPrice({
  rpc: process.env.RPC_URL,
  feed: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
  maxAgeSeconds: 3600,
});

if (r.decision === "BLOCK") {
  // do not act
}

--rpc and --maxAge are required. Optional: --amount 0.5 --feed --json Exit 0 = ALLOW. Exit 1 = BLOCK.

Supported feeds (Ethereum mainnet, default ETH/USD): ETH/USD 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 and BTC/USD 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c — https://docs.chain.link/data-feeds/price-feeds/addresses?network=ethereum

maxAge is your policy. ETH/USD heartbeat is about 45-50 minutes. --maxAge 60 will usually BLOCK even when the feed is healthy.

What BLOCK means

Do not act. Reasons include: stale or future timestamp, updatedAt == 0, answer <= 0, incomplete round (answeredInRound < roundId), wrong chainId for the feed, unknown feed, bad RPC, or invalid input.

Source: https://docs.chain.link/data-feeds/api-reference

Contribute

See CONTRIBUTING.md.