[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1724":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":29,"discoverSource":30},1724,"SatoshiGuesser","Pathos0925\u002FSatoshiGuesser","Pathos0925","Roll for lost bitcoin.","https:\u002F\u002Fsatoshiguesser.com",null,"JavaScript",180,51,1,0,2,9,3,49.05,"MIT License",false,"main",[24,25],"bitcoin","bitcoin-wallet","2026-06-12 04:00:11","# Satoshi Guesser\n\nA slot-machine web game that \"guesses\" Satoshi Nakamoto's Bitcoin private\nkeys. The odds are astronomically remote (~1 in 5.27 × 10⁷² per spin), but\nthe cryptography is real: every pull rolls a random 256-bit number, derives\nthe Bitcoin address, and checks it against a curated set of ~22,000\nPatoshi-pattern coinbase addresses plus the genesis block. If the derived\naddress ever matches, the random number you rolled **is** the working\nprivate key for that wallet — no server, no API, no catch.\n\nLive at **[satoshiguesser.com](https:\u002F\u002Fsatoshiguesser.com)** (when deployed).\n\n---\n\n## How it works (no blockchain required)\n\nBitcoin's address derivation is a one-way deterministic chain:\n\n```\nrandom 256-bit number  ──►  secp256k1 public key  ──►  HASH160  ──►  Base58Check address\n   (private key)              (point on curve)         (RIPEMD160(SHA256))\n```\n\nEvery Bitcoin address has exactly one private key that controls it. So when\nthe game generates a random 256-bit number, that number **is** a valid\nprivate key — it just controls some random address with (almost certainly)\nzero balance. If that derived address ever matches one of Satoshi's, the\nrandom number is the private key to that wallet, full stop. The math is\nthe verification.\n\nWhat ships with the page (at build time):\n\n1. The set of Satoshi-attributed addresses, as a Bloom filter for fast\n   lookup (~135 KB) plus a sorted (hash160, balance_sats) table for prize\n   readout (~615 KB, lazy-loaded only on a Bloom hit).\n2. A hardcoded BTC\u002FUSD constant with a snapshot date.\n\nNothing else. No node connection, no API call, no telemetry.\n\n---\n\n## Features\n\n- **Two reel modes:** classic 3-reel ✗\u002F✓, or \"realistic\" 64 hex cells that\n  reveal the full candidate private key with red\u002Fgreen flash on result.\n- **No-delay toggle:** skip animations, snap results in synchronously.\n  Spam-clickable as fast as your finger goes (~2,500 spins\u002Fsec headroom).\n- **Autospin:** chains spins automatically. 250 ms between spins normally;\n  drops to 16 ms (one paint frame) when no-delay is also on. Auto-pauses\n  on win.\n- **Live header:** jackpot in BTC and USD, per-spin odds, wallet count,\n  price snapshot date, \"Win up to X billion dollars!\" tagline (computed,\n  not hardcoded).\n- **Win UX:** modal with the matched address, the WIF private key, the\n  prize in BTC and USD, \"Copy\" button, confetti, and a win-arpeggio sound.\n- **Dev-win flag:** append `?devwin=1` to the URL to force a \"win\" against\n  the genesis address. The shown WIF won't actually unlock anything (we\n  don't have Satoshi's key) — it's purely for verifying the win UI.\n- **Synthesised audio:** lever click, reel-stop tick, lose thunk, win\n  arpeggio. Generated via Web Audio API — no asset downloads.\n- **Spacebar** also pulls the lever.\n\n---\n\n## Quick start\n\nRequires Node 22 or newer.\n\n```bash\nnpm install\nnpm run dev          # http:\u002F\u002Flocalhost:5173\n```\n\nThe `predev` hook regenerates `public\u002Fdata\u002Fsatoshi-bloom.bin`,\n`satoshi-wallets.bin`, and `wallet-stats.json` from `data\u002Fwallets.csv` on\nevery dev start, so editing the CSV propagates automatically.\n\n```bash\nnpm run build        # production bundle in dist\u002F\nnpm run preview      # serve dist\u002F for a final smoke test\nnpm test             # 11 unit\u002Fintegration tests\n```\n\n---\n\n## Project layout\n\n```\nSatoshiGuesser\u002F\n├── index.html                    # single page, no framework\n├── src\u002F\n│   ├── main.js                   # app entry: wires UI, audio, game loop\n│   ├── game\u002F\n│   │   ├── crypto.js             # privkey → secp256k1 → HASH160 → P2PKH; WIF\n│   │   ├── bloom.js              # Bloom filter (serialise + has\u002Fadd)\n│   │   ├── wallet-table.js       # sorted (hash160, balance) binary search\n│   │   ├── wallets.js            # lazy-loads bloom + table; checkHash160s()\n│   │   └── spin.js               # one-spin pipeline; supports devwin override\n│   ├── ui\u002F\n│   │   ├── log.js                # rolling log textarea\n│   │   ├── slot-classic.js       # 3-reel ✗\u002F✓ animation\n│   │   ├── slot-realistic.js     # 64 hex cells with red\u002Fgreen flash\n│   │   └── win-dialog.js         # modal + confetti + clipboard\n│   ├── audio\u002Faudio.js            # Web Audio synthesised SFX\n│   └── styles\u002F{main,slot}.css\n├── data\u002F\n│   └── wallets.csv               # canonical input — 21,954 addresses + balances\n├── scripts\u002F\n│   ├── fetch-patoshi.js          # downloads bensig CSV → data\u002Fwallets.csv\n│   ├── build-wallet-set.js       # data\u002Fwallets.csv → public\u002Fdata\u002F*.bin\n│   └── bench-spin.js             # microbench (per-spin cost)\n├── public\u002F\n│   ├── data\u002F                     # generated artifacts (gitignored)\n│   └── audio\u002F                    # reserved for future audio assets\n├── tests\u002F\n│   ├── crypto.test.js            # known privkey\u002Fpubkey\u002FWIF vectors + genesis\n│   ├── wallets.test.js           # bloom + table round-trip\n│   └── spin.test.js              # end-to-end-ish miss\u002Fhit\n├── PLAN.md                       # original design plan\n└── package.json\n```\n\n---\n\n## The wallet dataset\n\n`data\u002Fwallets.csv` is the canonical input. Format:\n\n```csv\n# comments OK; blank lines OK\naddress,balance_btc[,note]\n1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,50.0,Genesis\n12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX,50.0\n1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1     # balance defaults to 50 BTC\n```\n\nThe current file holds **21,954 unique addresses** totalling\n**1,097,702.49 BTC** — 21,953 Patoshi-pattern coinbase outputs plus the\ngenesis block.\n\n### Regenerating from upstream\n\n```bash\nnpm run fetch:patoshi      # downloads + converts P2PK → P2PKH addresses\nnpm run build:wallets      # rebuilds bloom + sorted table\n```\n\nThe fetcher pulls\n[bensig\u002Fpatoshi-addresses](https:\u002F\u002Fgithub.com\u002Fbensig\u002Fpatoshi-addresses)\n(curated by Sergio Demian Lerner \u002F Jameson Lopp), hex-decodes each P2PK\nuncompressed public key to its P2PKH address, aggregates by address (in\ncase any two coinbases share a key), appends the genesis address as a\nsupplement, and writes a sorted, self-documenting CSV.\n\n### Build-time artifacts\n\n`scripts\u002Fbuild-wallet-set.js` emits three files into `public\u002Fdata\u002F` (all\ngitignored — they're rebuilt from `wallets.csv`):\n\n| File                  | Format                                                   | Size  |\n| --------------------- | -------------------------------------------------------- | ----- |\n| `satoshi-bloom.bin`   | Bloom filter, m=1,078,320 bits, k=30, p≈10⁻⁹             | 135 KB |\n| `satoshi-wallets.bin` | Sorted `(hash160, balance_sats)` table, 28 bytes\u002Fentry   | 615 KB |\n| `wallet-stats.json`   | Counts, totals, BTC\u002FUSD price, snapshot date             | \u003C 1 KB |\n\nThe Bloom filter is sized for 25,000 entries to leave headroom for future\nupdates without changing the FP rate.\n\n---\n\n## Configuration\n\nTwo constants live in `scripts\u002Fbuild-wallet-set.js`:\n\n```js\nconst BTC_USD_APPROX = 76_228.52;      \u002F\u002F refresh near deploy time\nconst PRICE_SNAPSHOT_DATE = …;          \u002F\u002F auto-set to build date\n```\n\nRefresh the price, run `npm run build:wallets` (or just rebuild — `prebuild`\nruns it), and the header strip + tagline update automatically.\n\nThe autospin delays live in `src\u002Fmain.js`:\n\n```js\nconst AUTOSPIN_DELAY_MS = 250;          \u002F\u002F normal autospin pacing\nconst AUTOSPIN_DELAY_NO_DELAY_MS = 16;  \u002F\u002F when \"No delay\" is also on\n```\n\n---\n\n## Tests\n\n```bash\nnpm test\n```\n\n11 tests covering:\n\n- known privkey → pubkey → P2PKH address vectors (Bitcoin wiki test vectors)\n- WIF encoding (uncompressed and compressed)\n- HASH160 round-trip\n- Bloom filter add \u002F has + serialise \u002F deserialise\n- Sorted table binary-search hit and miss\n- End-to-end miss path (random key against the real bloom)\n- Planted hit path (genesis hash160 → balance)\n\n---\n\n## Performance\n\nBenchmark (`npm run bench` — well, `node scripts\u002Fbench-spin.js`):\n\n```\nspins:                 5000\naddress set size:      134790 bytes (1078320 bits, k=30)\nbloom hits (FPs):      0\nderive (secp+hash):    avg 0.391 ms\u002Fspin\nbloom check (×2):      avg 0.004 ms\u002Fspin\ntotal per spin:        avg 0.396 ms\u002Fspin\nthroughput:            ~2490 spins\u002Fsec\n```\n\nThe Bloom check is **independent of address-set size** — k=30 hash lookups\nregardless of n. 99% of per-spin cost is the elliptic-curve point\nmultiplication. The data set could grow 100× and you'd notice the page\nbeing heavier on first load and absolutely nothing else at runtime.\n\n---\n\n## Deploy to Cloudflare Pages\n\nThis is a static site — no Workers, no Durable Objects, no R2.\n\n### Path A — Pages + Git (recommended)\n\n1. Push the repo to GitHub.\n2. Cloudflare dashboard → **Workers & Pages** → **Create** → **Pages** → connect repo.\n3. Build settings:\n   - Build command: `npm run build`\n   - Build output directory: `dist`\n   - Root directory: (blank)\n4. Save and deploy. Auto-redeploys on every push.\n5. **Custom domain** → add `satoshiguesser.com` and `www.satoshiguesser.com`. If the\n   domain is in your Cloudflare account, DNS auto-wires.\n\n### Path B — Wrangler direct upload\n\n```bash\nnpm install -D wrangler\nnpx wrangler login\nnpm run build\nnpx wrangler pages deploy dist --project-name satoshi-guesser\n```\n\n### Pre-flight\n\n- `data\u002Fwallets.csv` is committed (build needs it).\n- `public\u002Fdata\u002F*.bin` and `wallet-stats.json` are gitignored — they\n  regenerate via the `prebuild` hook in CI.\n- Node 22 LTS or newer (Pages default works).\n\n---\n\n## The odds, for context\n\n```\nkeyspace        = 2^256              ≈ 1.158 × 10⁷⁷ valid private keys\nsatoshi addrs   = 21,954\nodds per spin   = 21,954 \u002F 2^256     ≈ 1 in 5.27 × 10⁷²\n```\n\nFor scale: about **10 million times harder** than picking one specific\natom from the entire observable universe. At one spin per millisecond\n(faster than this app runs), you'd expect a hit roughly once per\n1.7 × 10⁶² years — about 10⁵² times the current age of the universe. The\nheat death of the universe occurs first, by a comically wide margin.\n\n---\n\n## Credits\n\n- **Sergio Demian Lerner** — discoverer of the Patoshi pattern.\n- **Jameson Lopp** — curated dataset.\n- **[bensig\u002Fpatoshi-addresses](https:\u002F\u002Fgithub.com\u002Fbensig\u002Fpatoshi-addresses)**\n  — distribution of the curated CSV used by the fetch script.\n- **[@noble\u002Fsecp256k1](https:\u002F\u002Fgithub.com\u002Fpaulmillr\u002Fnoble-secp256k1),\n  [@noble\u002Fhashes](https:\u002F\u002Fgithub.com\u002Fpaulmillr\u002Fnoble-hashes),\n  [@scure\u002Fbase](https:\u002F\u002Fgithub.com\u002Fpaulmillr\u002Fscure-base)** — Paul Miller's\n  audited, dependency-free crypto primitives.\n- **[canvas-confetti](https:\u002F\u002Fgithub.com\u002Fcatdad\u002Fcanvas-confetti)** — the\n  confetti.\n\n---\n\n## License\n\nMIT\n","Satoshi Guesser 是一个基于网页的老虎机游戏，旨在通过随机生成私钥来“猜测”中本聪的比特币钱包私钥。该项目使用JavaScript开发，其核心功能是每次旋转都会生成一个256位的随机数，并根据这个数字计算出相应的比特币地址，然后与一组约22,000个已知的Patoshi模式创币地址及创世区块地址进行比对。如果匹配成功，则该随机数即为所匹配地址的有效私钥。此过程完全在客户端完成，无需服务器、API调用或任何外部连接。Satoshi Guesser适合于对比特币加密原理感兴趣的开发者以及希望以趣味方式探索区块链技术的用户。此外，项目提供了多种游戏模式和用户体验优化选项，如自动旋转、无延迟模式等，增强了互动性和娱乐性。","2026-06-11 02:45:41","CREATED_QUERY"]