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

@nyen/sdk

v0.1.2

Published

Official TypeScript SDK for the NYEN /v1 public API — reads, satoshi-safe amounts, NTS token ops, unsigned tx build, broadcast, SSE events, HMAC webhooks, and Wallet Connect signing (Login-with-NyenID).

Readme

@nyen/sdk

⚠️ TESTNET — data resets at mainnet launch. The live /v1 API currently serves an ephemeral test chain. Addresses, txids, and token ids you see now are wiped when mainnet goes live — don't hard-code them. Check network / mainnet on /v1/chain or /v1/health (reads "testnet" until launch).

Official TypeScript SDK for the NYEN /v1 public API. Zero runtime deps, isomorphic (browser + Node ≥18). Wraps the read gateway (chain/block/tx/address/ token/fee reads), unsigned tx build, signed broadcast, SSE events, HMAC webhooks, and — in the browser — Wallet Connect signing (Login-with-NyenID, token send).

Security spine (unchanged from the API): read is open, the only server-side write is broadcast of an already-signed tx, and signing happens in the user's wallet — the SDK never holds keys.

Install

npm install @nyen/sdk

Read a balance + send a token in < 20 lines

import { NyenClient } from "@nyen/sdk";
import { NyenWallet } from "@nyen/sdk/wallet";

const nyen = new NyenClient({ baseUrl: "https://nyen.cc/v1", apiKey: "pk_…" });

// read (keyless, any address) — amounts are satoshi-exact, never floats
const { native, tokens } = await nyen.address("N9x…");
console.log(native.balance, "NYEN");
for (const t of tokens) console.log(t.balance, t.name);

const quote = await nyen.feeEstimate("tokentransfer");   // { fee, feesat, basis }

// send an NTS token — signed + broadcast in the desktop wallet (browser only)
const wallet = new NyenWallet();
await wallet.connect("My dApp");                          // Approve dialog in wallet
const result = await wallet.sendToken({ to: "R7y…", token: "MYTOKEN", amount: "10" });
console.log("sent", result, "fee ~", quote.fee);

Login-with-NyenID (D30)

const wallet = new NyenWallet();
await wallet.connect("My dApp");
// `nonce` comes from your server
const { ok, address, signature } = await wallet.loginWithNyenId(nyen, nonce);
// POST { address, signature, nonce } to your server; it re-verifies + issues a session

Live events (SSE)

const stop = nyen.subscribe({
  channels: ["block", "address:N9x…"],
  onEvent: (e) => console.log(e.type, e.data),
});
// …later
stop();

Webhooks (server-side)

const hook = await nyen.createWebhook({ url: "https://me.com/hook", events: ["deposit.confirmed"] });
// store hook.secret NOW — shown only once. Then verify each delivery:
const ok = await NyenClient.verifyWebhookSignature(
  hook.secret, req.headers["x-nyen-timestamp"], rawBody, req.headers["x-nyen-signature"],
);

Errors

Every failure throws a typed NyenError with a stable string code (tx-rejected, insufficient-funds, rate-limited, …), the daemon's verbatim reason, a plain-English hint, and a docs link. err.retryable flags rate-limit / upstream errors worth retrying.

Build from source

npm install && npm run build   # -> dist/ with .js + .d.ts

Types mirror the API's OpenAPI schema (GET /v1/openapi.json).