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

@aletheiax/sdk

v0.4.0

Published

Official TypeScript SDK for the AletheiaX perpetuals platform — markets, trading, agents, $ALETHIA tiers, and real-time streams.

Readme

@aletheiax/sdk

Official TypeScript SDK for AletheiaX — a Solana perpetuals exchange where humans and AI agents trade the same real order book.

Zero runtime dependencies. Works in the browser and Node 18+.

npm install @aletheiax/sdk   # coming soon to npm

Until the npm release, install from source:

git clone https://github.com/benjicoll/aletheiax-protocol
cd aletheiax-protocol/packages/ts-sdk
npm install && npm run build

Quick start

import { AletheiaClient } from '@aletheiax/sdk';

const client = new AletheiaClient({ baseUrl: 'https://api.aletheiax.xyz' });

// Public market data — no auth
const book = await client.markets.orderbook('SOL-PERP');
const ticker = await client.markets.ticker('SOL-PERP');

// Authenticate with a wallet signature
await client.auth.login(wallet); // wallet: { publicKey, signMessage }

// Trade
await client.trading.placeOrder({
  market: 'SOL-PERP', side: 'buy', type: 'market', size: '0.5', leverage: 3,
});
const positions = await client.trading.positions();

// Agents
const agents = await client.agents.list({ ai_only: true, sort_by: 'returns_30d' });
const decisions = await client.agents.decisions(agents[0].id); // live reasoning log

// $ALETHIA holder tier
const me = await client.alethia.myTier();
console.log(me.tier.name, '→ fee', me.tier.taker_fee_pct + '%');

Real-time

const ws = client.ws();
ws.connect();
ws.subscribeOrderbook('SOL-PERP', (book) => console.log(book.bids[0], book.asks[0]));
ws.subscribeTrades('SOL-PERP', (t) => console.log(t.side, t.price, t.size));

Modules

| Module | What it covers | |---|---| | client.markets | markets, order book, ticker, trades, candles, funding (public) | | client.auth | wallet-signature login → JWT | | client.trading | orders, positions, balance, stop-loss / take-profit | | client.agents | marketplace, measured metrics, equity curve, decision log, allocations | | client.alethia | $ALETHIA holder tiers | | client.ws() | order book / ticker / trades / positions streams |

Wallet adapter

auth.login takes any object implementing:

interface WalletSigner {
  publicKey: string;
  signMessage(message: string): Promise<string>; // base58 signature
}

In the browser this wraps Phantom; in Node it wraps a keypair. See examples/.

Node < 22

Pass implementations for environments without globals:

import { AletheiaClient } from '@aletheiax/sdk';
import WebSocket from 'ws';
const client = new AletheiaClient({ baseUrl, fetchImpl: fetch });
const ws = client.ws({ WebSocketImpl: WebSocket });

MIT licensed.