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

@axiom-stack/sdk

v0.5.0

Published

Verifiable on-chain attestations for AI agents — equity + crypto data oracle anchored on Solana.

Readme

@axiom-stack/sdk

Verifiable on-chain attestations for AI agents — equity + crypto data oracle anchored on Solana.

@axiom-stack/sdk is the official TypeScript SDK for the Axiom Stack Oracle. Promise-only async, typed exceptions mapped 1:1 from the API's RFC 7807 error contract, dual ESM + CJS output, zero HTTP-client deps (native fetch, Node 18.3+).

import { AxiomClient } from "@axiom-stack/sdk";

const client = new AxiomClient();                            // reads AXIOM_API_KEY
const att = await client.attestInstant({ asset_class: 2, asset_id: "AAPL" });
console.log(att.data.price_micros, att.attestation_pda);     // 308820000  CuN2…

0.4.0 BREAKING: public field names + option keys are now snake_case across the SDK (asset_class, asset_id, api_key, request_id, tx_sig, etc.) to match the wire format + the Python SDK. Old camelCase aliases still work for one version with a console.warn deprecation notice. See CHANGELOG for the full rename map + set AXIOM_SDK_SILENCE_DEPRECATION=1 to silence.

Install

npm install @axiom-stack/sdk

Issue a key at axiomstack.dev/dashboard/keys and:

export AXIOM_API_KEY="axm_live_…"

…or write ~/.axiomrc.json:

{ "default": { "api_key": "axm_live_…" } }

30-second terminal demo

npm install -g @axiom-stack/sdk
export AXIOM_API_KEY="axm_live_…"
axiom query BTC --crypto         # → JSON attestation, on-chain
axiom query AAPL --format table  # ASCII table

Library quickstart

import { AxiomClient, newIdempotencyKey } from "@axiom-stack/sdk";

const client = new AxiomClient();

// Equity (live audit + instant)
const aapl = await client.attestInstant({ asset_class: 2, asset_id: "AAPL" });
console.log(aapl.data.price_micros, aapl.request_id);

// Crypto (whitelist: BTC, ETH, SOL, USDC, USDT; instant only in V1)
const btc = await client.attestInstant({ asset_class: 6, asset_id: "BTC" });

// Idempotent retry
const key = newIdempotencyKey();
const a = await client.attestInstant({ asset_class: 2, asset_id: "NVDA" }, { idempotency_key: key });
const b = await client.attestInstant({ asset_class: 2, asset_id: "NVDA" }, { idempotency_key: key });
console.assert(a.attestation_pda === b.attestation_pda);     // replay

Typed errors

Every error from the API is application/problem+json with a stable type URI at https://docs.axiomstack.dev/errors/<slug>. The SDK translates each URI into a specific exception class — branch with instanceof.

import { AxiomClient, TierUnavailableForClass, InsufficientQuota } from "@axiom-stack/sdk";

const client = new AxiomClient();
try {
  await client.attestAudit({ asset_class: 6, asset_id: "BTC" });   // crypto audit not in V1
} catch (e) {
  if (e instanceof TierUnavailableForClass) {
    console.log("available tiers:", e.tiers_available);             // ['instant']
    // downgrade gracefully
    await client.attestInstant({ asset_class: 6, asset_id: "BTC" });
  }
}

try {
  await client.attestInstant({ asset_class: 2, asset_id: "AAPL" });
} catch (e) {
  if (e instanceof InsufficientQuota) {
    console.log(`retry in ${e.retry_after_seconds}s; request_id=${e.request_id}`);
  }
}

Full exception hierarchy: AxiomErrorAxiomAPIErrorUnauthorized / Forbidden / InvalidRequest / TierUnavailableForClass / NotFound / IdempotencyReplayMismatch / InsufficientQuota / ServiceUnavailable / InternalServerError. Plus AxiomConnectionError for transport-level failures.

Read an on-chain attestation by PDA

const state = await client.fetchAttestation("CuN2LbSuw227fu2aHLpN6y7sbXun2DPNz6DjncRqJ9RW");
console.log(state.asset_id, state.asset_data.variant_type);    // "AAPL" "EquityData"
console.log(state.attestations.length, "writers");

Discover supported classes + tiers

const classes = await client.listAssetClasses();
for (const c of classes) {
  console.log(c.id, c.name, c.status, c.tiers_available);
}

Configuration precedence

| # | Source | Note | |---|---|---| | 1 | constructor arg (new AxiomClient({ apiKey })) | wins over all | | 2 | AXIOM_API_KEY env var | recommended for prod | | 3 | AXIOM_CONFIG env (path to JSON file) | flexible | | 4 | ~/.axiomrc.json (XDG-aware) | local dev default |

Same precedence applies to baseUrl (env: AXIOM_BASE_URL). The base URL defaults to https://api.axiomstack.dev.

CLI reference

axiom query <asset_id> [--class equity|crypto|<int>] [--latency instant|audit]
                       [--format json|table] [--key <axm_live_…>] [--base-url URL]

# Shortcuts
axiom query AAPL                  # equity instant
axiom query BTC --crypto          # equivalent to --class crypto
axiom query AAPL --latency audit  # audit tier (equity only in V1)

API reference

Full OpenAPI 3.1 spec + endpoint reference: axiomstack.dev/developers/api. Machine-readable spec: api.axiomstack.dev/v1/openapi.json.

Python SDK with the same surface: axiom-stack on PyPI.

License

MIT © Axiom Stack LLC