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

@rhinestone/sanctions

v2.0.0

Published

Self-hosted sanctioned-address screening (OFAC SDN, UK OFSI, Japan MoF). is-sanctioned utilities for EVM / Solana / Tron.

Readme

@rhinestone/sanctions

Fast, self-hosted sanctioned-address screening. Bundles a sanitized list of sanctioned crypto addresses (compiled from official government sources by the pipeline in this repo) and exports zero-latency isSanctioned utilities.

Matching is a bundled in-memory Set lookup — no network calls, no API keys.

Install

pnpm add @rhinestone/sanctions

Zero runtime dependencies. The exported Address type is 0x${string} (the same shape as viem's Address, so viem values are assignable) — no viem install required.

Usage

import {
  isSanctioned,
  isSanctionedEvmAddress,
  isSanctionedSolanaAddress,
  isSanctionedTronAddress,
  assertNotSanctioned,
  SanctionedAddressError,
  sanctionsMeta,
} from "@rhinestone/sanctions";

// Auto-detects the chain from the address shape:
isSanctioned("0x098B716B8Aaf21512996dC57EB0615e2383E2f96"); // true

// Throw on a hit — catch it at the API boundary and map to a 403:
try {
  assertNotSanctioned(recipient);
} catch (err) {
  if (err instanceof SanctionedAddressError) {
    // err.address is the offending address
  }
}

// Provenance for audit logging:
sanctionsMeta.sources[0].publishDate; // e.g. "2026-07-23"
sanctionsMeta.contentHash;            // "sha256:…"

API

| Export | Description | |---|---| | isSanctioned(address) | True if sanctioned on any supported chain (auto-detect). | | isSanctionedEvmAddress(address) | EVM check; checksum-insensitive. Accepts viem Address or string. | | isSanctionedSolanaAddress(address) | Solana check (case-sensitive). | | isSanctionedTronAddress(address) | Tron check (case-sensitive). | | assertNotSanctioned(address) | Throws SanctionedAddressError if sanctioned. | | SanctionedAddressError | Error carrying .address. | | sanctionsMeta | { generatedAt, counts, sources[], contentHash }. | | bundleAgeDays() | Age of the bundled list in days (since generatedAt). | | assertFresh(maxDays) | Throws StaleSanctionsListError if the list is older than maxDays, or if its timestamp is unparseable or in the future. | | StaleSanctionsListError | Error carrying .ageDays and .maxDays. |

All lookups trim / NFC-normalize input and return false on malformed or non-string input (never throw). The package throws at import if the bundled list is empty or malformed (fails closed).

Coverage

EVM, Solana, and Tron addresses from US OFAC SDN, UK OFSI, and Japan MoF (the lists overlap heavily on DPRK designations). EVM addresses are stored lowercased and matched checksum-insensitively; Solana/Tron are base58 and matched verbatim. sanctionsMeta.sources lists exactly which snapshots are bundled.

Data freshness

The list is baked into the package at publish time. Update cadence is driven by the pipeline / CI in the repo root — pin a range like ^2.0.0 to pick up data updates. sanctionsMeta tells you exactly which snapshot you're running.

License

AGPL-3.0-only — see LICENSE. If you run a modified version of this package as part of a network service, the AGPL obliges you to offer that service's Corresponding Source to its users. If that is incompatible with your project, do not use this package.

Because the upstream repository is private, this package's own Corresponding Source ships inside the npm tarball: see src/ alongside dist/.

The bundled address data is not covered by the AGPL. It is compiled from official government publications and retains their terms — US OFAC (public domain), UK OFSI (Open Government Licence v3.0, attribution required), Japan MoF (政府標準利用規約, CC BY 4.0-compatible). Full attribution is in NOTICE, which ships with the package.

This project does not accept outside contributions.