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

@keicoin/tokens

v0.5.3

Published

Kei native tokens and items: issue, mint, burn, transfer, balanceOf, policy flags, commits.

Readme

@keicoin/tokens

Native tokens and items: issue, mint, burn, transfer, balanceOf, policy flags, commits.

Part of kei-transaction — real currencies and items for browser games. Install kei-transaction instead unless you are counting bytes; these sub-packages exist for bundle size, not as a puzzle you have to solve.

bun add @keicoin/tokens     # or npm / pnpm / yarn

What is in here

A currency in one call, and an item that is just a token with supply 1:

const gems = await game.token.issue({
  name: 'Gems', symbol: 'GEM', decimals: 0, maxSupply: 1_000_000,
  transfer: 'open',   // 'open' | 'issuer-only' | 'none' — enforced by the chain
  swap: 'one-way',
})

await gems.mint(playerAddress, 500)
await gems.balanceOf(playerAddress)   // 500 — one call

An item is a token with supply 1, and it can carry stats:

const sword = await game.items.create({ name: 'Iron Sword', supply: 1000, stats: { attack: 10, weight: 3 } })

// With stats, the player is minted a variant of the sword rather than the sword.
const drop = await game.items.mint(sword.id, playerAddress, {
  label: 'Flaming', stats: { attack: 17, element: 'fire' },
})
drop.stats   // { attack: 17, weight: 3, element: 'fire' }

Stats are flat, on-chain, and part of the item's id, so the same roll always derives the same asset — the hundredth Flaming Sword costs no extra issuance burn. A bounded table of rolls is cheap; a random roll per drop is not. A roll is as plentiful as the item it varies, and create defaults to a supply of 1, so give the base a supply if many players are meant to hold rolls of it.

A sink is one block, signed by whoever holds the units — the ledger checks the holder, not the issuer, so a repair fee or a consumable needs no server round trip:

const gold = await kei.token('GOLD', gameAddress)
await gold.burn(40)     // player-signed; circulating supply falls by 40

Burning is also the only thing a soulbound token can do, and the only way a capped supply gets its headroom back (SPEC §5.4, §5.6.6).

transfer is immutable and protocol-enforced: it is the only real mechanism for a closed economy. Issuing burns n Kei for an account's nth asset — 1 for its first — because an asset record is permanent state on every node forever, and because the cost has to land on a large catalogue rather than on a first token. Transactions stay free.

Status

M3 of eleven. The public API now uses a real node at https://testnet.keicoin.org/rpc; MockNode remains the hermetic reference implementation. The testnet is one best-effort node with weak consensus and nothing there holds value.

See the full documentation.

MIT.