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

@chain-protocol/cli

v0.7.0

Published

The chain command: runs the SDK simulator for a Chain.wtf casino or PvP game in its own repository.

Readme

@chain-protocol/cli

The chain command for building Chain.wtf games in your own repository.

Start a game

npx @chain-protocol/cli init casino my-game
cd my-game
npm install
npm run dev          # serves the game frontend

In a second terminal, start the SDK simulator:

npm run simulator

With Bun, run bunx @chain-protocol/cli init casino my-game, bun install, bun run dev and bun run simulator. Open the URL npm run simulator prints and play a round.

chain init

chain init <casino|pvp> [directory] [--template coinflip|bones|rps] creates a game from an example: its frontend, its contract under contracts/src/ and the deployment.ts that names the contract. package.json depends on the SDK and the CLI at ^ this CLI's version, so the game takes their patch releases, and has a dev and a simulator script.

| Command | Creates | | ----------------------------------------- | ------------------------------------------------------- | | chain init casino my-game | The coinflip example. Frontend on port 3100. | | chain init pvp my-game --template bones | The Bones example. Frontend on port 3200. | | chain init pvp my-game --template rps | The Rock Paper Scissors example. Frontend on port 3500. |

  • The directory defaults to the example's name. It must be missing or empty.
  • chain init pvp without --template asks which example to use. Outside a terminal it exits 1 and asks for --template.
  • The package name in package.json is the directory's name, lowercased.

chain dev

npx chain dev casino --frontend-url http://localhost:5173

With Bun, run bunx chain dev casino --frontend-url http://localhost:5173.

chain dev casino (or chain dev pvp) starts the SDK simulator of the SDK your project installed: the dev chain, the VRF node, the platform's contracts, the game your deployment.ts names (redeployed when you save its contract) and the simulator page. Run it next to deployment.ts. Open the URL it prints. The simulator page loads your game frontend from --frontend-url. Press Ctrl-C to stop everything.

chain dev options

| Option | Default | | ---------------- | ---------------------------------------------------------------------- | | --frontend-url | http://localhost:5173 | | --port | The simulator page port: casino 3300, pvp 3400. 0 picks a free port. | | --rpc-port | The dev chain port: 8545 |

chain slots

chain slots builds a slot title with the slot engine of the casino SDK your project installed:

| Command | Does | | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | chain slots compile <title.json> | Prints each bet configuration's exact figures. | | chain slots check-mapping <title.json> | Checks the display mappings cover every prize. | | chain slots deploy <title.json> --rpc <url> --deployer <address> | Deploys the title, naming --developer or the signer as its game developer. Signs with SLOT_ENGINE_PRIVATE_KEY. | | chain slots decode <title address> --rpc <url> | Rebuilds tier lists and RTP from a live title's chain bytes. | | chain slots import-stake <publish_files> --out <dir> | Converts a Stake Engine math export into a title. |

Run chain --help or chain <command> --help for the full list of flags.

Requirements

The CLI carries the dev chain, solc and the VRF node, so the SDK stays light. It needs Node 22+ or Bun 1.4.2+, and runs no install script. Its version moves with the SDKs: install the same version of both. A breaking release publishes under the canary dist-tag first; install @chain-protocol/cli@canary together with the SDK's canary.