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

@streamlock/operator-sdk

v0.1.9

Published

TypeScript SDK for the Streamlock Operator API. Run zero-sum games against Streamlock streams without custodying keys.

Readme

@streamlock/operator-sdk

TypeScript SDK for the Streamlock Operator API. Run zero-sum games against Streamlock streams without custodying keys. Streamlock builds the transaction bytes; you sign and broadcast.

What this is. Streamlock's conviction-locking primitive carries an entitlement ledger on every locked stream. A trusted operator can rewrite the ledger via signed, zero-sum game results. At unlock, SOL proceeds distribute according to the final bps. This SDK is the integration contract for that.

Install

npm install @streamlock/operator-sdk @solana/web3.js

Quickstart

import { StreamlockOperator } from "@streamlock/operator-sdk";
import { Keypair } from "@solana/web3.js";

const op = new StreamlockOperator({
  apiKey: process.env.STREAMLOCK_OPERATOR_KEY!,
  chain: "soldev",
  rpcUrl: "https://api.devnet.solana.com",
  signer: async (tx) => {
    const kp = Keypair.fromSecretKey(/* your bytes */);
    tx.sign([kp]);
    return tx;
  },
});

// 1. Discover eligible players
const { streams } = await op.tokens.streams("Bhjta…6S1v");

// 2. Start a game
const session = await op.sessions.create({
  tokenMint: "Bhjta…6S1v",
  participants: streams.slice(0, 8).map((s) => ({ wallet: s.holder, streamId: s.streamId })),
  endTs: Math.floor(Date.now() / 1000) + 3600,
  disputeWindowSec: 600,
});

// 3. …game runs, you compute a zero-sum scoresheet…

// 4. Submit + finalize
await op.sessions.submit(session.result.gameSessionPda, {
  startChunkIndex: 0,
  deltas: scoresheet,
});

// after dispute window:
await op.sessions.finalizeAndApplyAll(session.result.gameSessionPda, [
  { chunkIndex: 0, deltas: scoresheet },
]);

A full runnable example lives at examples/poker-operator.ts.

Design points

  • Signer is a callback. (tx: VersionedTransaction) => Promise<VersionedTransaction>. Use a Keypair, an HSM, a remote signer service — anything that can sign.
  • .build*() escape hatches. Every writer has a sibling .build*() that returns the unsigned tx bytes. Sophisticated operators who want HTTP-free writes (or to inspect the tx first) use those.
  • Client-side zero-sum validation. Bad scoresheets fail before the round-trip.
  • Idempotency keys. SDK auto-generates Idempotency-Key headers per write. Server-side memoization is rolled out incrementally.
  • WSS push events. op.stream.on("session.finalized", handler) connects lazily and reconnects with exponential backoff.

Spec

Full Operator API spec: docs/architecture/OPERATOR_API.md in the Streamlock monorepo. OpenAPI 3.1 schema served at https://streamlock.fun/v1/openapi.json (Phase 7).

License

MIT