← all modules
@metanet-games/

chaintag

🪪
live on npm zero deps npm ↗ source ↗ Apache-2.0

Portable, wallet-optional player identity — anonymous by default, upgradeable to a real wallet key, with a deterministic name + identicon.

Install

$ npm i @metanet-games/chaintag

Example

import { anon, fromWallet, profile, challenge } from "@metanet-games/chaintag";

const me = anon(window.localStorage);   // stable, wallet-free identity
profile(me);                            // { name: "Swift Otter", avatar: "data:image/svg…" }

// later, they connect a wallet (your app gets the pubkey):
const account = fromWallet({ pubkey }); // portable across every game
const c = challenge(account);           // sign c.message, verify with @bsv/sdk

Plug it into your game

Give every player an identity the moment they arrive — anonymous, persistent, with a name and identicon, no wallet required. When they connect one, upgrade to their real key and carry their progress over. A connected wallet is an account, not consent — what it's allowed to do stays your call.

Part of chainkit — verifiable building blocks for BSV games. Verify don't trust.

🧩 github.com/metanet-games/chainkit · 🕹️ the games · metanet.games