mirror of
https://github.com/luxwallet/create.git
synced 2026-10-30 19:49:39 +00:00
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.