Files
zeekay 2e1b7dcaf8 feat: @luxwallet/create — stamp a branded Lux Wallet from one brand.json
Generator that scaffolds a ready-to-run branded Lux Wallet web app for a new
chain/org from a single BrandConfig. One command per new chain.

- CLI `create-lux-wallet <brand-ref> [outDir] [--force]` + programmatic
  generate(brand, outDir): validates the brand via @luxwallet/brand's
  defineBrand, then stamps apps/web/ (Vite + React) that mounts @luxwallet/ui
  via WalletUIProvider, authenticates with @hanzo/iam (HIP-0111), reaches
  chains through @luxwallet/sdk, and ships the brand's /brand.json.
- DRY runtime-brand.json strategy: ONE brand-neutral app shell, byte-identical
  across brands (enforced by test). Only public/brand.json + public/logo.svg
  differ. No per-brand forks. *.tmpl files get {{brand.*}} interpolation.
- Example brands lux/hanzo/zoo/pars with canonical @luxwallet/chains ids
  (lux-c 96369, zoo 200200, hanzo 36963, pars 494949) + _template.json.
- New chains: add to @luxwallet/chains registry, reference id in brand.chains[].
- MIT, zero GPL — never imports @luxfi/wallet. @luxwallet/* + @hanzo/* are
  workspace deps with a documented switch to npm versions once published.

Verified headlessly: CLI tsc --noEmit clean; 7/7 node:test pass (tree,
brand.json validity via defineBrand, no token leak, DRY shell identity, force,
resolution); sample generation of all four brands validates.
2026-06-23 15:28:28 -07:00

33 lines
1.3 KiB
Cheetah

{
"name": "{{brand.id}}-wallet-web",
"private": true,
"version": "0.1.0",
"description": "{{brand.name}} — branded Lux Wallet web app. Generated by @luxwallet/create.",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"typecheck": "tsc -b --noEmit"
},
"//deps": "These @luxwallet/* + @hanzo/* packages are not yet published to npm. While developing against the monorepo, replace each version with a workspace/path dep (e.g. \"@luxwallet/ui\": \"workspace:*\" under pnpm, or \"file:../../sdk/packages/ui\"). The pinned versions below are the (future) npm versions to switch to once published.",
"dependencies": {
"@hanzo/gui": "^7.3.0",
"@hanzo/iam": "^0.12.3",
"@luxwallet/brand": "^0.1.0",
"@luxwallet/sdk": "^0.1.0",
"@luxwallet/ui": "^0.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"//optional-connect": "Web3 wallet (SIWx) login is OPTIONAL. To enable the wallet-connector path in src/Login.tsx, add \"@luxwallet/connect\": \"^0.1.0\" (or its workspace/path dep) and follow the TODO there.",
"devDependencies": {
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"typescript": "^5.7.3",
"vite": "^6.0.7"
}
}