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

@aghanim-sdk/checkout

v0.4.3

Published

Aghanim Checkout JS SDK — accept payments through the Aghanim checkout without leaving your web game

Readme

@aghanim-sdk/checkout

Accept payments in your web game through the Aghanim checkout — no page leave, no server-side runtime.

📖 Full guide: docs.aghanim.com/checkout/javascript-sdk

Install

npm install @aghanim-sdk/checkout

Or via script tag (exposes window.Aghanim):

<script src="https://cdn.jsdelivr.net/npm/@aghanim-sdk/checkout/dist/aghanim-checkout.global.js"></script>

Quick start

import { Aghanim } from "@aghanim-sdk/checkout";

// Key from Dashboard → Integration → API keys.
const aghanim = Aghanim.init({ apiKey: "sdk_..." });

// As soon as your game knows who the player is;
// clearPlayerId() on sign-out.
aghanim.setPlayerId("player_1");

const order = await aghanim.orders.create({ items: [{ sku: "gems-100" }] });
const checkout = await aghanim.openCheckout(order);

checkout
  .onPaid(() => showSuccessUI())
  .onClosed(() => game.resume());

Orders created by this SDK are consumable. paid is a UX signal only: grant items from the item.add webhook, or drain the unconsumed list on boot, on resume, and after paid.

// Always grant first — consuming the same order twice fails.
for (const order of await aghanim.orders.unconsumedDetails()) {
  grantToPlayer(order.items);
  await aghanim.orders.consume(order.id);
}

Already creating orders server-side? Pass the opaque checkout_url straight through:

const checkout = await aghanim.openCheckout(checkoutUrlFromYourBackend);

Develop without a backend

const aghanim = Aghanim.init({
  apiKey: "sdk_mock",
  mock: { scenario: "instant_success" },
});

Scenarios (instant_success, open_external, three_ds, failure, poll_fallback, unconsumed) play scripted events through the real parsing pipeline. See examples/.

Reference

  • Presentation modes (overlay, embedded, external, auto), events, options, granting: docs.aghanim.com/checkout/javascript-sdk
  • Wire-level types only: import type { OrderRead } from "@aghanim-sdk/checkout/protocol"
  • Evergreen browsers (ES2020), zero runtime dependencies.