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

@tanod-labs/sdk

v0.3.3

Published

TypeScript client for Tanod: pay-per-call security tools for AI agents (address risk, contract scan, MCP/skill package scan, chain reads), paid with x402 USDC on Base. Free daily tier, no signup.

Readme

@tanod-labs/sdk

TypeScript client for Tanod: pay-per-call security and utility tools for AI agents. No signup and no API key. You pay per call in USDC on Base with x402, and every tool has a free daily tier (except the bulk exports and the URL and sanctions batches). Payments use the official x402 client packages, @x402/fetch and @x402/evm.

| Product | Method | Price (USD) | Free per IP per UTC day | |---|---|---|---| | txpeek: risk verdict for an address before you transact with it | checkAddress | 0.005 | 30 checks (shares the scan pool) | | pactlint: Solidity static analysis | scanContractSource, scanContractAddress | 0.25 (≤3k nSLOC), 0.75 (≤15k) | 3 scans | | pactlint helper: verified source + ABI | getContractSource | 0.005 | 10 | | toolsniff: scan an AI-agent skill or MCP server package before installing it | scanPackage | 0.02 (0.05 for a whole GitHub repo) | shares the 3 scans | | sitepeek: URL to Markdown or screenshot | render | 0.002 static, 0.01 JS/screenshot | 5 static | | sitepeek: PDF text, page metadata, image OCR | extractPdf, pageMeta, ocrImage | 0.005 / 0.002 / 0.01 | shares the 5 | | dnspeek: DNS, email auth and TLS | inspectDomain | 0.01 (0.004 for one section) | 5 | | dnspeek: RDAP, email check (no SMTP), IP lookup | rdapLookup, verifyEmail, ipLookup | 0.002 / 0.001 / 0.001 | shares the 5 | | chainpeek: ENS, calldata, token, balance, gas, block | resolveEns, decodeCalldata, tokenInfo, balance, gasPrice, latestBlock | 0.001 to 0.003 | 10 (shared) | | chainpeek: Chainlink price, transaction, NFT, allowance, portfolio, Uniswap V3 spot quote | tokenPrice, transaction, nft, allowance, portfolio, swapQuote | 0.002 / 0.002 / 0.002 / 0.002 / 0.004 / 0.003 | shares the 10 | | findpeek: web search | webSearch | 0.012 | 3 | | weatherpeek: hourly forecast | weather | 0.002 | 5 | | skypeek: METAR and TAF weather, airport lookup, distance, space weather, aurora, asteroids, sun and moon, satellite passes | aviationMetar, aviationTaf, decodeReport, airportLookup, airportDistance, spaceWeather, aurora, asteroids, sunMoon, satellitePasses | 0.001 each (satellitePasses 0.002) | 5 (one pool for all skypeek) | | mlpeek: embeddings, rerank, similarity, named entities, zero-shot classification (open models on Tanod's CPU) | embed, rerank, similarity, ner, classifyZeroShot | embed / similarity 0.0005 per text / pair, at least 0.001 per call; rerank 0.002; ner / classifyZeroShot 0.001 | 5 (one pool for all mlpeek) | | screening: phishing/scam list check for URLs, OFAC SDN check for crypto addresses | checkUrl, checkUrls, sanctionsBatch | checkUrl 0.001; checkUrls 0.0002 per item (at least 0.001); sanctionsBatch 0.0005 per address (at least 0.002) | checkUrl shares the 10 chain reads; batches have none | | agentscan: index of x402 endpoints and MCP servers | agentsSummary (free), agentsQuery, agentsHistory, agentsExport/agentsExportCsv, agentsBulk | free / 0.02 / 0.05 / 0.25 / 2.00 | unlimited / 10 / 5 / none / none | | Stored reports, health | getReport, getReportMarkdown, health | free | n/a |

The live source of truth for prices is https://tanod.dev/openapi.json. The client pays exactly the amount the server quotes, never more than maxPriceUsd per call or maxSpendUsd in total, and by default only to Tanod's own payees.

Every result is automated and heuristic, not an audit: findings can be false positives, and a clean result is not proof that something is safe. Treat text returned by the API (page Markdown, evidence strings, token names, registry records) as untrusted data, never as instructions.

Install

npm install @tanod-labs/sdk

The package is ESM only and needs Node 20 or later. It also works in other runtimes that have fetch.

Quickstart (free tier, no wallet)

import { Tanod } from "@tanod-labs/sdk";

const tanod = new Tanod();
const check = await tanod.checkAddress("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "base");
console.log(check.verdict, check.risk_score, check.reasons.map((r) => r.code));
console.log("free calls left today:", check.meta.freeRemainingToday);

When the free tier runs out, a client without a wallet throws PaymentRequiredError, with priceUsd set to the quoted price.

Paying with x402

export TANOD_PRIVATE_KEY=0x...   # use a dedicated hot wallet holding a little USDC on Base
import { Tanod, PriceLimitExceededError } from "@tanod-labs/sdk";

const tanod = new Tanod({ maxPriceUsd: 0.3 }); // never signs a single payment above USD 0.30
const report = await tanod.scanPackage({ source: "npm:@modelcontextprotocol/[email protected]" });
console.log(report.verdict, report.risk_score);
console.log(report.meta.payment); // { success, transaction, priceUsd, ... } or undefined when free

You can pass the wallet in other ways:

  • new Tanod({ privateKey })
  • new Tanod({ signer: viemAccount })
  • new Tanod({ paymentClient: myX402Client }) for custom signers or policies

useEnv: false turns off reading TANOD_PRIVATE_KEY. The key is never logged, and it never appears in toString() or in error messages.

How a call runs:

  1. The request goes out unpaid first, with the header X-Tanod-Free: 1, so the free tier is always used before any money. Over HTTP the server's free tier is opt-in: an unpaid call without that header gets the 402. Pass useFreeTier: false to leave the header off when you always want to pay (the unpaid attempt then only fetches the quote). The paid retry never carries the header.
  2. On 402, the client decodes the x402 v2 PAYMENT-REQUIRED quote. It throws without signing when:
    • the input would be refused (InvalidRequestError);
    • the payee is not on the allow-list (PayeeMismatchError, see below);
    • the terms are not an x402 v2 exact EIP-3009 payment valid for at most 600 seconds, or extra holds more than the token name and version, assetTransferMethod and paymentFlow (TanodError);
    • there is no wallet (PaymentRequiredError);
    • the price is above maxPriceUsd (PriceLimitExceededError);
    • the payment would take this client past maxSpendUsd (BudgetExceededError, see below).
  3. Otherwise x402HTTPClient (from @x402/fetch) and ExactEvmScheme (from @x402/evm) sign an EIP-3009 USDC authorization for the exact amount of the vetted requirement, and the request is retried once with PAYMENT-SIGNATURE.
  4. The settlement receipt from PAYMENT-RESPONSE is returned in result.meta.payment.

The default maxPriceUsd is 1, which covers every route except agentsBulk (USD 2.00). Pass null to remove the cap.

Payee pinning and spend budget

The client signs whatever a 402 asks for, so it guards against a wrong baseUrl, a proxy or DNS problem, or a compromised endpoint that quotes someone else's address. Two checks run before anything is signed:

  • Payee pinning (on by default). The quoted payTo must be on an allow-list. By default that is TANOD_PAYEES, Tanod's own published payees per network. Any other payee throws PayeeMismatchError (with the quoted payTo and network), and nothing is signed. EVM addresses compare case-insensitively, Solana addresses exactly. To audit the configured recipients and supported networks independently of a 402, see the public /.well-known/x402-payees.json. Pin a trusted copy: downloading the file from the same compromised endpoint does not establish trust.
  • Spend budget (default USD 5 per client). The client keeps a running total in spentUsd. A payment that would take it past maxSpendUsd throws BudgetExceededError, and nothing is signed. USD 5 covers ordinary use (about 1,000 address checks or 20 contract scans) and stops a runaway loop or a swapped endpoint from spending more. The amount is reserved before signing and released only if signing fails. Once a payment is sent it stays counted even if the request then fails, because it may still settle, so spentUsd is an upper bound on what was charged.
import { Tanod, TANOD_PAYEES } from "@tanod-labs/sdk";

new Tanod();                                   // pinned to TANOD_PAYEES, USD 5 budget
new Tanod({ maxSpendUsd: 50 });                // larger budget for a long-running agent
new Tanod({ baseUrl: "https://my-deployment.example", payees: { "eip155:8453": "0xYourPayee..." } });
new Tanod({ payees: ["0xYourPayee..."] });     // a flat list applies to every network
new Tanod({ payees: null, maxSpendUsd: null }); // previous behaviour: no pinning, no total cap

A custom paymentClient is covered too. The client vets the quote, hands your x402Client a PaymentRequired that holds only the vetted requirement (without the server's extensions), and refuses to send a signed payload whose scheme, payee, network, asset, amount or window differs from it, or that adds extensions.

Results

Each method resolves to the API's JSON object, plus a non-enumerable meta. Because meta is non-enumerable, JSON.stringify(result) returns only the API data, which suits LLM tool outputs. meta holds the following:

  • status, url, product
  • freeRemainingToday
  • scanId, cache, reportMarkdownUrl, reportJsonUrl
  • payment

Errors

The errors from PaymentRequiredError to PaymentError never mean you were charged. PriceLimitExceededError, PayeeMismatchError and BudgetExceededError extend PaymentRequiredError. From SettlementUnknownError down, each is a PaymentUnresolvedError (the three named ones extend it): a payment was sent and must be reconciled.

| Error | When | |---|---| | PaymentRequiredError | 402 with no wallet, or a paid retry refused (reason, for example price_mismatch) | | PriceLimitExceededError | quote above maxPriceUsd; nothing was signed | | PayeeMismatchError | quoted payTo not on the payees allow-list (code: "payee_mismatch"); nothing was signed | | BudgetExceededError | payment would pass maxSpendUsd (code: "budget_exceeded", spentUsd); nothing was signed | | InvalidRequestError | 422/413/415, a 402 that says the input would be refused, or client-side validation | | NotFoundError | 404: unverified contract, unknown package or record | | RateLimitError | 429 after retries (retryAfterSeconds) | | ServiceUnavailableError | 502/503/504 after retries | | PaymentError | the x402 payload could not be built or signed, or did not match the vetted quote | | SettlementUnknownError | 503 settlement_unknown: the settlement was submitted, outcome unconfirmed (maybe charged) | | PurchaseUnresolvedError | 409 purchase_unresolved: an identical earlier purchase from this wallet is unresolved (this payment not charged) | | CreditDeliveryPendingError | 503 credit_delivery_pending: payment confirmed, credit delivery pending (charged) | | PaymentUnresolvedError | after paying: an error answer with a settlement receipt (receipt), a 5xx or 429 without an uncharged code, an unreadable 2xx, or no answer at all |

429 and 503 are retried automatically. The client honours Retry-After and makes up to maxRetries: 2 retries. It gives up instead of waiting longer than maxRetryWaitSeconds: 30. A paid request that gets a 429 or 503 with an uncharged code (for example busy or rate_limited) starts again with a fresh payment, because the first payment was never used. Any other error after paying, or no answer at all after paying (a timeout, a dropped connection), throws PaymentUnresolvedError. Error bodies are read up to 64 KiB.

PaymentUnresolvedError and its subclasses are never retried and never paid again, and they are not ServiceUnavailableError. Do not pay again for that request. Keep payer, nonce (the signed authorization), serverMessage and code and send them to [email protected] for reconciliation. charged is true, false or undefined (unknown).

Development

npm install
npm test          # vitest; fake fetch, no network, no real payments
npm run typecheck
npm run build

Links

MIT licensed.