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

@winsznx/potforge

v0.1.0

Published

TypeScript SDK for Pot — stablecoin fundraisers on Celo (cUSD) + Stacks (sBTC). Contract bindings, share helpers, badge metadata.

Readme

potforge

TypeScript SDK for Pot — stablecoin fundraisers on Celo (cUSD) and Stacks (sBTC). Read the contract, sign a createPot, decode contribution events, build share URLs, claim from the STX faucet.

pnpm add @winsznx/potforge viem

viem is a peer dependency (^2.21.0). The Stacks subpath is dependency-free — it talks to the Hiro v2 API over fetch so consumers don't pay the @stacks/connect bundle weight unless they want to.

What's in the box

  • Contract bindings for the live Pot deployments (Celo mainnet + Stacks mainnet)
  • Read helpers for getPot, nextPotId, event indexing with configurable lookback
  • Write helpers for createPot, contribute, endorsePot, votePot, plus a cUSD allowance no-op
  • Metadata utilities — canonical JSON shape + keccak256 hash so on-chain metadataHash always verifies
  • Formatters for cUSD wei + microSTX, address shortening, time-left math
  • Share intents — twitter / whatsapp / telegram URL builders
  • Hiro v2 balance + tx-status fetch with explorer URL helpers

Layout

@winsznx/potforge             chain-neutral utilities (formatters, share URLs, addresses, types)
@winsznx/potforge/celo        viem-based reads + writes against the EVM Pot.sol
@winsznx/potforge/stacks      hiro v2 + Clarity call-shape builders

Tree-shakeable, dual ESM + CJS, source maps shipped. Strict TypeScript, noUncheckedIndexedAccess on.

Quick start — Celo

import { makePublicClient } from "@winsznx/potforge/celo";
import { readPot, readNextPotId } from "@winsznx/potforge/celo";
import { formatCusd, progressLabel } from "@winsznx/potforge";

const client = makePublicClient({ selector: "mainnet" });

const total = await readNextPotId(client);
const pot = await readPot(client, 0n);

console.log(
  `Pot 0 — ${formatCusd(pot.raised)}/${formatCusd(pot.target)} cUSD (${progressLabel(pot.raised, pot.target)})`,
);

Create a pot (Celo)

import { makeWalletClient, writeCreatePot, ensureCusdAllowance } from "@winsznx/potforge/celo";
import { metadataHash, parseCusd, CELO_ADDRESSES } from "@winsznx/potforge";

const wallet = makeWalletClient(process.env.PRIVATE_KEY as `0x${string}`);

const hash = await writeCreatePot(wallet, {
  target: parseCusd("500"),
  deadlineSec: Math.floor(Date.now() / 1000) + 7 * 24 * 3600,
  refundIfMissed: true,
  metadataHash: metadataHash({
    title: "Replace the school roof",
    description: "Storm took it out last week.",
  }),
});

console.log("tx", hash);

Stacks — read balance + build a call

import { fetchStxBalance, claimStxCall, formatStx } from "@winsznx/potforge/stacks";
import { STACKS_CONTRACTS } from "@winsznx/potforge";

const bal = await fetchStxBalance("SP31DP8F8CF2GXSZBHHHK5J6Y061744E1TNFGYWYV", "mainnet");
console.log("STX:", formatStx(bal.balance));

// Pass into @stacks/connect's request('stx_callContract', ...) in your app:
const shape = claimStxCall("mainnet");
console.log(shape.contract); // SP31...WYV.stx-faucet

Addresses (mainnet)

Develop

pnpm install
pnpm typecheck
pnpm test
pnpm build

License

MIT — see LICENSE.