Node.js and npm. Locally, Hunch falls back to file-backed JSON storage under .data/, so nothing else is required to run it: no database to provision, no house wallet to fund. Production storage and house funding are both opt-in through environment variables, see the README.

npm install npm run build && npm start

Hunch is built for the Nimiq Pay WebView, dev bundles don’t run inside it, so a production build is the normal way to actually open it in Nimiq Pay under Mini Apps → Custom URL. The hidden dev menu, a 10-second long-press on settings, switches to testnet and hands out free NIM for testing.

Nimiq Pay / Nimiq Hub | v Wallet signature | v Hunch API / server +---------+---------+ | | Split engine Pair engine | | | Trust / Ultimatum | | +---------+---------+ | Round state | +-------+-------+ | | Settlement Results | | v v Nimiq blockchain Live / Research
ComponentResponsibility
WalletSigns decisions, provides payout authority
Commit APIVerifies signed decisions before anything is stored
Split engineHandles the NIM chain, self-funded and house-funded
Pair engineHandles blind two-player commitments for Trust and Ultimatum
Payout systemCalculates and settles NIM, tracks queued/sending/sent/failed
Abuse layerLimits repeated house-funded play by wallet, device, and pair
ResultsShows a player’s local history, stored on-device
LiveShows anonymised real observations, no identity in the shape
ResearchCompares Hunch’s observations with published work

Routes live under app/, one folder per experiment or page. Everything that isn’t UI, the round engines, payout logic, abuse controls, wallet signing, storage, lives under lib/ as small, single-purpose modules rather than one shared utility file. Storage goes through one adapter (lib/db.ts), so swapping the local JSON files for Postgres in production is a one-file change, not a refactor.

Environment variables, the storage schema, the admin tooling, and deployment specifics are documented directly in the repository rather than here, they change with the code, and a second copy on this page would only ever be the stale one.

View the repository →