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

@invonetwork/phaser

v1.0.0

Published

INVO game economy for Phaser 4: wallet, premium currency via INVO hosted checkout, item shop, soft-currency earnings and loyalty events, with a drop-in UI over your game canvas.

Readme

@invonetwork/phaser

INVO's game economy for Phaser 4: a wallet, premium currency sold through INVO's hosted checkout, an item shop, earned (soft) currency, and loyalty events, with a polished drop-in UI over your game canvas.

This is a thin adapter. Every economy rule lives in @invonetwork/web-sdk (3.27+) and is inherited here, never copied:

  • Balances come from your server, which asks INVO. The browser never decides a balance.
  • Premium purchases are credited exactly once, from INVO's signed webhook.
  • Spending premium currency splits the sale 90% to you and 10% to INVO automatically.

Install

npm install @invonetwork/phaser @invonetwork/web-sdk phaser

1. Server (Node)

Your game server holds the INVO secrets and the ledger. Mount the routes once:

import { createServer } from "node:http";
import { invoGameServerFromEnv, createFileGameStore, toNodeListener } from "@invonetwork/web-sdk/game-server";
import { economy } from "./economy"; // your shop: currencies, packs and items

const { server } = invoGameServerFromEnv({
  economy,
  env: process.env, // INVO_GAME_SECRET, INVO_WEBHOOK_SECRET, INVO_ENV=sandbox|production
  store: createFileGameStore({ file: ".data/invo-ledger.json" }),
});

createServer(toNodeListener(server, serveYourGame)).listen(3000);

Without the secrets the server still runs. The INVO routes answer 503 INVO_SETUP_REQUIRED, and the UI shows the developer a setup guide that notices when the keys arrive.

Set the INVO console's webhook URL to https://<your-game>/api/invo/webhook.

2. Game (browser)

import Phaser from "phaser";
import { installInvo, getInvo, InvoEvents, InvoBalanceText } from "@invonetwork/phaser";

const game = new Phaser.Game(config);
installInvo(game); // mounts the INVO UI and talks to /api/invo

// In any scene:
const { economy, ui } = getInvo(this);
economy.earn(5, "crystal mined");        // batched and rate-limited by the server
if (economy.owns("golden_skin")) applySkin();
this.game.events.on(InvoEvents.ITEM, (p) => applyItem(p.itemId));
ui?.openShop();                          // or let players use the HUD's Shop button
this.add.existing(new InvoBalanceText(this, 16, 16, "soft"));

API

| Export | What it does | |---|---| | installInvo(game, options?) | Mounts the UI over the canvas, pauses Phaser input while an INVO dialog is open, re-emits economy events on game.events. Returns { economy, ui, modalOpen, ready, destroy }. | | getInvo(scene) | The handle from any scene. | | InvoEvents | WALLET, SESSION, ITEM, PURCHASE, ERROR, MODAL, SETUP event names on game.events. | | InvoBalanceText | A Phaser.GameObjects.Text that always shows a live balance. | | InvoGameEconomy, mountInvoUI, types | Re-exported from @invonetwork/web-sdk/game. |

Options: economy (an instance or its options), ui (UI kit options or false to draw your own), container, pauseInputWhileModal (default true).

Starter template

A complete, forkable Phaser 4 + TypeScript starter (Replit-ready) wires all of this up: invo-game-templates.

For AI agents and step-by-step wiring, see INTEGRATION.md. Full docs: https://docs.invo.network