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

@bufinance/kawaii

v0.1.0

Published

Canonical Kawaii Punk NFT contract config + holder-aware redirect resolver for BU.FI apps. Decides where to send a user: their punk page, the mint page, or the secondary market when sold out.

Readme

@bufinance/kawaii

Canonical Kawaii Punk NFT contract config + holder-aware redirect resolver for BU.FI apps. The single source of truth for "where do I send this user?":

  • holder → their punk page
  • non-holder, mints open → the mint page
  • non-holder, sold out → the secondary market(s)

Two live collections, both on Avalanche C-Chain (43114):

  • main — the current production collection (v3, live 2026-06-23).
  • beta — the former collection (v2), now the dev+staging TEST contract.

Zero runtime dependencies. Reads env via an override-first reader (process.envglobalThis.__BU_ENV__), so it runs in Node, Cloudflare Workers, edge runtimes, and the browser (defaults only).

Install

npm i @bufinance/kawaii

Pure core — @bufinance/kawaii

import {
  getKawaiiPunkContract,
  resolveKawaiiRedirect,
  getKawaiiRedirectTargets,
  kawaiiCollectionAddress,
} from "@bufinance/kawaii";

getKawaiiPunkContract("main");
// → { address: "0x3ce4f5…", chainId: 43114, rpcUrl: "https://api.avax.network/…" }

// Pure decision — you supply holder + sold-out status:
resolveKawaiiRedirect({ isHolder: false, soldOut: false });
// → { kind: "mint", url: "https://fx.bu.finance/en/kawaii-preview", alternatives: [] }

resolveKawaiiRedirect({ isHolder: true, soldOut: false, punkAddress: "0xabc" });
// → { kind: "punk", url: "https://fx.bu.finance/en/punk/0xabc", alternatives: [] }

resolveKawaiiRedirect({ isHolder: false, soldOut: true });
// → { kind: "secondary", url: "https://joepegs.com/…", alternatives: [Joepegs, OpenSea] }

Pass appBaseUrl: "" for same-origin (relative) in-app links in the browser; secondary-market links are always absolute.

With live state — @bufinance/kawaii/client

Resolves holder + sold-out from the BU.FI Kawaii HTTP APIs (/api/kawaii/status, /api/kawaii/curve/price), then picks the destination:

import { resolveKawaiiDestination, fetchKawaiiState } from "@bufinance/kawaii/client";

const dest = await resolveKawaiiDestination({ walletAddress: "0xabc" });
// → { kind, url, alternatives }

Env overrides

| Var | Default | |---|---| | KAWAII_PUNK_CONTRACT_MAIN | 0x3ce4f5fde5c8aae5b4b10f6b647fdcca1349cd4f | | KAWAII_PUNK_CONTRACT_BETA | 0x301faf452906d0d8e701d3e4c5ed9f2a023e48ee | | KAWAII_PUNK_CHAIN_ID_MAIN / _BETA | 43114 | | KAWAII_PUNK_RPC_MAIN / _BETA / AVAX_RPC_URL | https://api.avax.network/ext/bc/C/rpc | | KAWAII_APP_URL / NEXT_PUBLIC_APP_URL | https://fx.bu.finance | | KAWAII_MINT_PATH | /kawaii-preview | | KAWAII_PUNK_PATH | /punk/{address} | | KAWAII_SECONDARY_MARKETS (JSON [{label,url}]) | Joepegs + OpenSea (derived) | | KAWAII_DEFAULT_LOCALE | en |

License

MIT