Inventory โ local for a wallet-less player, real on-chain items (1Sat Ordinals) when they connect, in one merged bag.
import { createSatchel } from "@metanet-games/satchel";
// chain: your indexer, { list: (pubkey) => item[] }
const bag = createSatchel({ identity, store: localStorage, chain });
bag.add({ type: "potion", stackable: true, qty: 3 });
bag.add({ type: "sword", meta: { atk: 5 } });
await bag.sync(); // pulls the player's on-chain items in
bag.items(); // merged: each { โฆ, origin: "local" | "chain" }
A wallet-less player collects items locally; when they connect, sync() merges their real on-chain items into the same bag, tagged by origin. Local items are yours to add and remove; on-chain ones are owned property โ spending an ordinal is a transaction your app makes, not a local delete.
Part of chainkit โ verifiable building blocks for BSV games. Verify don't trust.
๐งฉ github.com/metanet-games/chainkit ยท ๐น๏ธ the games ยท metanet.games