โ† all modules
@metanet-games/

coinslot

๐Ÿช™
live on npm zero deps npm โ†— source โ†— Apache-2.0

A drop-in micropayment paywall + tip rail โ€” priced products, entitlements (durable / N-uses / timed) and receipts, over any wallet.

Install

$ npm i @metanet-games/coinslot

Example

import { createCoinslot } from "@metanet-games/coinslot";

// pay: your adapter around HandCash Connect / Yours
const slot = createCoinslot({ identity, store: localStorage, pay });
slot.define("continue", { sats: 100, uses: 1 });

// gate an action โ€” charges only if not already entitled
if ((await slot.require("continue")).ok) { slot.use("continue"); respawn(); }

Plug it into your game

Charge a few sats to unlock, continue, or tip. You plug in the wallet (HandCash/Yours) as the pay adapter; coinslot tracks entitlements and keeps receipts. It never auto-charges โ€” a connected wallet isn't standing permission โ€” and once paid it always grants. Anchor receipt.txid for tamper-evident sales.

Part of chainkit โ€” verifiable building blocks for BSV games. Verify don't trust.

๐Ÿงฉ github.com/metanet-games/chainkit ยท ๐Ÿ•น๏ธ the games ยท metanet.games