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

@energy8platform/stake-kit

v0.6.3

Published

The Stake-side toolkit for an Energy8 slot game: a generic **book adapter** that teaches `@energy8platform/stake-bridge` how to slice a round-book into per-spin segments, plus a **dev harness** (a Vite plugin) that runs the game against a local dev-RGS ba

Readme

@energy8platform/stake-kit

The Stake-side toolkit for an Energy8 slot game: a generic book adapter that teaches @energy8platform/stake-bridge how to slice a round-book into per-spin segments, plus a dev harness (a Vite plugin) that runs the game against a local dev-RGS backed by the curated math books — so you can play, buy bonuses, and replay rounds without a live Stake session.

Sub-paths

  • @energy8platform/stake-kit — the browser-safe adapter toolkit (createGameAdapter, coerceLuaArrays, deriveArrayFields, types). No Node/Vite.
  • @energy8platform/stake-kit/harness — the Node-only Stake backend plugin (stakeRgsPlugin) for @energy8platform/harness. Dev-only (apply: 'serve'); never bundled into the browser build.

Book adapter

import { createGameAdapter } from '@energy8platform/stake-kit';
import { model } from '../game.spec';
import { spinSchema } from '../game/schema';

export const adapter = createGameAdapter({
  model,
  schema: spinSchema,
  segmentOf: ({ event, payload, round }) => ({
    action: event.type === 'free_spin' ? 'free_spin' : round.triggerAction,
    winX: payload.total_win ?? 0,
    session: { roundId: round.roundId },
  }),
});

splitRound reads the canonical Stake book event shape ({ type, spin }), runs each payload through the schema + coerceLuaArrays (Lua {}[]), and emits one BookSegment per event so the bridge can stream a bonus segment-by-segment. resumeFrom rewinds a mid-bonus reload to the first free spin.

Dev harness

vite.config.ts (in a scaffolded game):

import { defineGameConfig } from '@energy8platform/game-engine/vite';
import { createHarness } from '@energy8platform/harness';
import { stakeRgsPlugin } from '@energy8platform/stake-kit/harness';
import { reelDevtoolsPlugin } from '@energy8platform/game-engine/harness';

export default defineGameConfig({
  base: './',
  vite: {
    plugins: [
      createHarness({
        plugins: [
          stakeRgsPlugin({ config: './math.config.ts', booksDir: 'stake-math' }),
          reelDevtoolsPlugin(),
        ],
      }),
    ],
  },
});

The dev harness itself (iframe framing, screen presets, Settings/Replay UI, the panel host) lives in @energy8platform/harness. stakeRgsPlugin is only the backend (the RGS wire protocol + curated books); reelDevtoolsPlugin adds the reel-config sidebar.

npm run stake then serves an iframe wrapper (control bar: social toggle, currency, screen presets, replay) around the game, and mounts a dev-RGS at /__rgs/* implementing the Stake RGS contract (authenticate / play / end-round / event / replay). Outcomes are picked from the curated books (stake-math/); a mode with no books falls back to running the game's Lua (LuaEngine), driving the full free-spins session so a bonus plays out as one multi-segment round.

Related packages

  • @energy8platform/stake-bridge — the host bridge that speaks Stake's RGS and consumes the adapter.
  • @energy8platform/stake-math-tools — produces the stake-math/ books the harness reads.
  • @energy8platform/create-slot — scaffolds a game wired to all of the above.