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

@luxxon/sdk

v0.3.0

Published

TypeScript SDK for the Luxxon API — full surface: sessions, pricing, wallet, settlements, workspaces, API keys, auth.

Readme

@luxxon/sdk

TypeScript SDK for the Luxxon API. Pure fetch, no native dependencies, ships ESM + types. Tracks the full public REST surface.

npm install @luxxon/sdk

Quick start

import { Luxxon } from "@luxxon/sdk";

const lx = new Luxxon({ apiKey: process.env.LUXXON_API_KEY });

// Open a session, push-dispatch an operator, wait for LIVE,
// and get a viewer URL in one call.
const { session, viewer } = await lx.requestLiveView({
  lat: 4.71, lng: -74.05,
  maxDurationSeconds: 30,
});

// Or grab a JPEG once the cache fills (~3-5s after LIVE).
const { bytes } = await lx.sessions.frame(session.id);

// Tear it down whenever — your call.
await lx.sessions.end(session.id);

Auth

API key (server-side), wallet session cookie (browser), or a pre-formatted bearer header:

new Luxxon({ apiKey: "lxxn_live_..." });
new Luxxon({ bearer: "Bearer lxxn_live_..." });
new Luxxon({ cookie: "lx_session=eyJ..." });   // browser / SSR

Surface

11 resources covering every public path on api.luxxon.dev/api/v1:

| Resource | Methods | |---|---| | lx.auth | challenge / login / selectWorkspace / logout | | lx.me | get | | lx.config | get | | lx.health | get | | lx.coverage | list | | lx.demand | heatmap | | lx.pricing | quote | | lx.workspaces | challenge / create / list / get / update / setAvailability / heartbeat / createApiKey / revokeApiKey | | lx.sessions | create / get / dispatch / accept / start / end / cancel / frame / viewerToken / producerToken / waitFor | | lx.wallet | get / events | | lx.settlements | get |

Plus one high-level convenience at the top level:

  • lx.requestLiveView({ lat, lng, maxDurationSeconds }) → orchestrates create + dispatch + waitFor(LIVE) + viewerToken in one call.

For anything not exposed yet, drop to the escape hatch:

const data = await lx.json("/some-new-endpoint");
const res  = await lx.raw("/some-new-endpoint", { method: "POST", body });

Patterns

Lifecycle, manual:

const s = await lx.sessions.create({ lat, lng, maxDurationSeconds: 60 });
await lx.sessions.dispatch(s.id);  // 503 NO_COVERAGE if no operator in range
const live = await lx.sessions.waitFor(s.id, (x) => x.state === "LIVE");
// … poll frames or hand `live.whepUrl` to a WebRTC player …
await lx.sessions.end(s.id);

Quote first, lock the rate:

const quote = await lx.pricing.quote({ lat: 4.71, lng: -74.05, durationSeconds: 30 });
const s     = await lx.sessions.create({ lat: 4.71, lng: -74.05, maxDurationSeconds: 30, quoteId: quote.quoteId });

Wallet inspection:

const state  = await lx.wallet.get();              // tracked balance + last block
const events = await lx.wallet.events({ limit: 50 }); // deposits / settles / approvals

Settlement check after a session ends:

const settle = await lx.settlements.get(sessionId);
// settle.state: NOT_READY | PENDING | SUBMITTED | CONFIRMED
// settle.txHash when state === CONFIRMED

Operator side — accept + start + heartbeat:

await lx.workspaces.setAvailability(workspaceId, "ONLINE");
await lx.sessions.accept(sessionId);
const { whipUrl } = await lx.sessions.start(sessionId);
// Publish via WHIP; keep heartbeating while you stream.
await lx.workspaces.heartbeat(workspaceId, {
  lat, lng, accuracyMeters: 8, sequence: Date.now(),
});

Errors

Typed errors with a stable code per the error reference:

import type { LuxxonError } from "@luxxon/sdk";

try {
  await lx.sessions.frame(id);
} catch (err) {
  const e = err as LuxxonError;
  if (e.code === "FRAME_NOT_AVAILABLE") {
    // First keyframe hasn't arrived — retry in 1s.
  } else if (e.code === "NO_COVERAGE") {
    // Dispatch found no operator in range.
  } else {
    throw err;
  }
}

Common codes: NOT_AUTHENTICATED, NOT_AUTHORIZED, INVALID_INPUT, INVALID_STATE, NOT_FOUND, NO_COVERAGE, FRAME_NOT_AVAILABLE, CONFLICT, AUTHZ_ERROR, DATABASE_ERROR.

Stability

v0.x — minor versions can change the typed surface. Pin exact version until 1.0. The underlying REST API is what's stable; this SDK is one of many possible bindings.

MCP

The MCP server in @luxxon/mcp wraps this SDK as agent-callable tools for Claude Desktop / Cursor / Claude Code.