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

@coinsensors/sdk

v0.1.1

Published

Official TypeScript SDK for the CoinSensors token security API

Readme

@coinsensors/sdk

Official TypeScript SDK for the CoinSensors token security API. Scan tokens for rug pull indicators, get trust scores (0-100), and receive AI-powered risk analysis across Solana, Ethereum, BNB Chain, and Base.

Installation

npm install @coinsensors/sdk

Quick Start

import { CoinSensorsClient } from '@coinsensors/sdk';

const client = new CoinSensorsClient({
  apiKey: 'your-api-key',
});

// Scan a token
const result = await client.scan('TOKEN_MINT_ADDRESS');
console.log(result.score.trustScore); // 0-100
console.log(result.score.riskLevel); // LOW | MODERATE | HIGH

Usage

Scan a Token

// Basic scan
const result = await client.scan('TOKEN_MINT_ADDRESS');

// Specify chain (auto-detected by default)
const result = await client.scan('0xTOKEN_ADDRESS', { chain: 'ethereum' });

// Force rescan (bypass cache)
const result = await client.scan('TOKEN_MINT_ADDRESS', { force: true });

Get Token Details

const token = await client.getToken('TOKEN_MINT_ADDRESS');

console.log(token.info.name);
console.log(token.score.trustScore);
console.log(token.checks); // Individual check results
console.log(token.aiNarrative?.narrative); // AI risk analysis

List Analyzed Tokens

const tokens = await client.listTokens({
  page: 1,
  limit: 20,
  riskLevel: 'HIGH',
  sortBy: 'newest',
});

Scan a Wallet

// One-shot scan
const wallet = await client.scanWallet('WALLET_ADDRESS');
console.log(wallet.portfolio.overallScore);

// Stream results progressively via SSE
const stream = client.scanWalletStream('WALLET_ADDRESS');

stream.on('holdings_discovered', (data) => {
  console.log(`Found ${data.holdings.length} tokens`);
});

stream.on('token_scored', (data) => {
  console.log(`${data.token.symbol}: ${data.score.trustScore}`);
});

stream.on('scan_complete', (data) => {
  console.log('Done!', data.portfolio);
});

Real-Time Feed

const feed = client.subscribeFeed();

feed.on('message', (msg) => {
  console.log('New token:', msg);
});

feed.on('error', (err) => console.error(err));

Error Handling

import {
  CoinSensorsClient,
  ValidationError,
  AuthenticationError,
  NotFoundError,
  RateLimitError,
  ServerError,
} from '@coinsensors/sdk';

try {
  await client.scan('invalid-address');
} catch (err) {
  if (err instanceof ValidationError) {
    console.log('Bad request:', err.message);
  } else if (err instanceof AuthenticationError) {
    console.log('Invalid API key');
  } else if (err instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${err.retryAfter}s`);
  } else if (err instanceof NotFoundError) {
    console.log('Token not found');
  } else if (err instanceof ServerError) {
    console.log('Server error:', err.message);
  }
}

Supported Chains

| Chain | Address Format | |-------|---------------| | Solana | Base58 (e.g. So11111111...) | | Ethereum | 0x + 40 hex chars | | BNB Chain | 0x + 40 hex chars | | Base | 0x + 40 hex chars |

Chain is auto-detected from the address format. You can also specify it explicitly via the chain option.

Types

All API types are re-exported from the SDK:

import type {
  TokenDetail,
  TokenInfo,
  TokenScore,
  ScanResponse,
  CheckResult,
  WalletScanResponse,
  Chain,
} from '@coinsensors/sdk';

License

MIT