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

inferlane-exchange

v0.0.5

Published

Official TypeScript SDK for the InferLane Exchange — verified AI inference marketplace with consensus, audits, and per-call settlements.

Readme

inferlane-exchange

Official TypeScript SDK for the InferLane Exchange — a verified AI inference marketplace with consensus, audits, and per-call settlements.

Install

npm install inferlane-exchange

Quickstart

import { ExchangeClient } from 'inferlane-exchange';

const client = new ExchangeClient({
  baseUrl: 'https://app.inferlane.com',
  apiKey: process.env.INFERLANE_API_KEY!,  // starts with `il_`
});

// As a buyer: check wallet balance
const wallet = await client.wallet.get();
console.log(`Balance: $${(Number(wallet.balanceUsdCents) / 100).toFixed(2)}`);

// As a buyer: run a classification with verified consensus across 3 providers
const result = await client.compute.invokeReplicated({
  taskType: 'classification',
  input: 'Schedule a meeting with Sarah tomorrow at 2pm.',
  outputSchema: { label: 'string', confidence: 'number' },
  replicationFactor: 3,
});

console.log('consensus:', result.consensusOutput);
console.log('judge:', result.judge?.rationale);
console.log('cost:', result.receipt?.totalChargedUsdCents);

// As an operator: discover and apply to tasks
const tasks = await client.tasks.listOpen({ category: 'code-review' });
await client.tasks.apply(tasks.tasks[0].id, {
  estimatedHours: 2,
  estimatedCostUsd: 80,
});

What it covers

| Surface | Methods | |---------|---------| | client.wallet | get, topup | | client.providers | list, get, register, deregister | | client.compute | invoke, invokeReplicated | | client.tasks | listOpen, get, post, fund, approve, reject, apply, submit, listMine | | client.disputes | list, addEvidence, withdraw | | client.notifications | list, markAllRead | | client.webhooks | listSubscriptions, createSubscription, deleteSubscription | | client.admin.providers | listApplications, admit, decline, recordCalibration, promoteToAnchor, writeoffAccrual |

Auth

Get an API key from /dashboard/settings/api-keys after signing in. Keys start with il_. The SDK validates the prefix at construction time so you can't accidentally pass a SHA-256 hash instead of the raw token.

Error handling

import { ExchangeError } from 'inferlane-exchange';

try {
  await client.compute.invoke({ taskType: 'classification', input: '...', outputSchema: {} });
} catch (e) {
  if (e instanceof ExchangeError) {
    console.error(`HTTP ${e.status}: ${e.code} — ${e.message}`);
    // e.body contains the server response JSON if available
  }
}

Custom fetch / timeouts

Per-request timeout defaults to 30s. Override via constructor or per-request:

const client = new ExchangeClient({
  baseUrl,
  apiKey,
  timeoutMs: 60_000,           // global default
  fetch: customFetchImpl,      // e.g. for Node 16 polyfill
});

// Per-request override via the low-level http surface:
await client.http.request('POST', '/api/exchange/compute/invoke', {
  body: { /* ... */ },
  timeoutMs: 5_000,
});

Status

Early access. The 8 client surfaces above cover the buyer + operator + admin v1 flows. Compute substrate (single-mode + replicated) is production-ready; third-party provider settlements (STRIPE_BOND_ESCROW_WIRED) are gated until the Exchange operator flips the production gate.

License

MIT