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

@sova-intel/sdk

v0.1.3

Published

TypeScript SDK for the Sova Intel on-chain intelligence API — wallet profiles, PnL, holder maps, similarity scoring. Pay via API key or X402 (Solana USDC).

Readme

@sova-intel/sdk

TypeScript SDK for the Sova Intel API — on-chain intelligence for Solana wallets.

Get trader profiles, behavioral patterns, token holder maps, and wallet similarity scores. Pay per call with an API key or autonomously via X402 (Solana USDC).

API Docs →


Installation

npm install @sova-intel/sdk
# or
pnpm add @sova-intel/sdk

Node 18+ required. No external runtime dependencies — uses the built-in fetch API.


Authentication

Option A — API key (simplest)

import { SovaIntelClient } from "@sova-intel/sdk";

const client = new SovaIntelClient({
  baseUrl: "https://api.sova-intel.com/api/v1",
  auth: {
    kind: "apikey",
    apiKey: "ak_your_key_here",
  },
});

Credits are deducted from the key owner's account on each successful call.

Option B — X402 (autonomous Solana wallet)

Supply a buildPayment callback. The SDK calls it automatically when it receives a 402 response, passing the treasury address and required USDC amount. You sign and return a base64-encoded payment header.

import { SovaIntelClient } from "@sova-intel/sdk";
import { Connection, Keypair, PublicKey, Transaction } from "@solana/web3.js";
import {
  TOKEN_PROGRAM_ID,
  createTransferCheckedInstruction,
  getAssociatedTokenAddress,
} from "@solana/spl-token";

const USDC_MINT = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
const connection = new Connection("https://api.mainnet-beta.solana.com");
const keypair = Keypair.fromSecretKey(/* your wallet bytes */);

const client = new SovaIntelClient({
  baseUrl: "https://api.sova-intel.com/api/v1",
  auth: {
    kind: "x402",
    buildPayment: async (payTo: string, amountBaseUnits: bigint) => {
      const agentAta    = await getAssociatedTokenAddress(USDC_MINT, keypair.publicKey);
      const treasuryAta = await getAssociatedTokenAddress(USDC_MINT, new PublicKey(payTo));
      const { blockhash } = await connection.getLatestBlockhash("confirmed");
      const tx = new Transaction({ recentBlockhash: blockhash, feePayer: keypair.publicKey });
      tx.add(createTransferCheckedInstruction(
        agentAta, USDC_MINT, treasuryAta, keypair.publicKey, amountBaseUnits, 6, [], TOKEN_PROGRAM_ID,
      ));
      tx.sign(keypair);
      return Buffer.from(JSON.stringify({
        x402Version: 2,
        scheme: "exact",
        network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
        payload: { transaction: tx.serialize().toString("base64") },
      })).toString("base64");
    },
  },
});

Quickstart

Get a wallet HUD (1 credit)

The fastest signal: behavior code, win rate, PnL, bot/whale flags.

import { SovaIntelClient } from "@sova-intel/sdk";

const client = new SovaIntelClient({
  baseUrl: "https://api.sova-intel.com/api/v1",
  auth: { kind: "apikey", apiKey: process.env.SOVA_API_KEY! },
});

const hud = await client.getWalletHud("7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU");

console.log(hud.behaviorCode);       // "SWING_TRADER"
console.log(hud.winRate);            // 0.67
console.log(hud.trimmedMeanPnl);     // 12.4 (SOL)
console.log(hud.isBot);              // false
console.log(hud.dataQualityTier);    // "GOLD"

The server holds the connection for cold wallets and returns data in the same call. If it times out, the SDK polls the queued job and re-calls automatically — you always receive a WalletHud.

Analyze top holders of a token (20 credits)

Async job — the SDK queues it, polls until complete, and returns the full result.

import { SovaIntelClient } from "@sova-intel/sdk";
import type { HolderProfilesResult } from "@sova-intel/sdk";

const client = new SovaIntelClient({
  baseUrl: "https://api.sova-intel.com/api/v1",
  auth: { kind: "apikey", apiKey: process.env.SOVA_API_KEY! },
});

const result = await client.pollHolderProfiles<HolderProfilesResult>(
  "So11111111111111111111111111111111111111112", // token mint
  20,                                             // top N holders
);

for (const holder of result.profiles) {
  console.log(holder.walletAddress, holder.behaviorType, holder.supplyPercent);
}

All methods

| Method | Endpoint | Credits | |:-------|:---------|--------:| | getWalletProfile(address) | GET /intel/wallet/:addr | 5 | | getWalletHud(address) | GET /intel/wallet/:addr/hud | 1 | | getWalletTokens(address, params?) | GET /intel/wallet/:addr/tokens | 3 | | batchHud(wallets[]) | POST /intel/wallets/batch-hud | 5 flat | | queueHolderProfiles(mint, topN?) | POST /intel/token/:mint/holders | 20 | | pollHolderProfiles(mint, topN?) | same + auto-poll | 20 | | queueSimilarity(wallets[]) | POST /intel/wallets/similarity | 20 | | pollSimilarity(wallets[]) | same + auto-poll | 20 |

Full reference with schemas: docs.sova-intel.com


Error handling

import { SovaIntelClient, SovaHttpError, X402PaymentError } from "@sova-intel/sdk";

try {
  const hud = await client.getWalletHud(address);
} catch (err) {
  if (err instanceof X402PaymentError) {
    // Payment failed — check err.body for details
    console.error("Payment error:", err.body);
  } else if (err instanceof SovaHttpError) {
    if (err.status === 422) console.error("System/program wallet — not analyzable");
    if (err.status === 404) console.error("Wallet not found or result expired");
    if (err.status === 500) console.error("Server error — retry with backoff");
  }
}

| Status | Meaning | |:------:|:--------| | 400 | Invalid address or request body | | 402 | Payment required (X402 flow) | | 403 | Key or wallet blocked | | 404 | Not found or result key expired (15min TTL) | | 422 | System/program wallet — not analyzable, skip | | 500 | Server error — retry with exponential backoff |


TypeScript types

All request and response shapes are exported:

import type {
  WalletHud,
  WalletProfileResponse,
  KolIdentity,
  HolderProfile,
  HolderProfilesResult,
  SimilarityResult,
  SimilarityPairResult,
  SimilarityGlobalMetrics,
  TokenPnlResponse,
  BatchHudResponse,
  JobAcceptedResponse,
  SovaIntelClientConfig,
  Auth,
} from "@sova-intel/sdk";

Links