theseus/BROWSER-PROMPT.md
Local Dev 7898e78ff4 Initial commit — Silent Mode baseline (2026-07-29)
Snapshot of the decentralized-web stack at the point of the resolver+Theseus
rebuild deploy. Includes:

- Argus (BNS engine + resolver daemon + Sia gateway)
- AriadneResolver (Windows Inno installer bundle + Android APK sources +
  Firefox extension)
- TheseusNavigator (Electron browser)
- site/ (silentmode.st content, deployed to Sia at bns/silentmode/)
- design docs, roadmap, protocol spec

Secrets excluded via .gitignore: Argus/sia-s3.json, Argus/wallets.json,
Argus/ca/*.key,*.crt. Build outputs, node_modules, and bundled runtimes
also excluded.

Shipped hashes on dl.silentmode.st at this commit:
  AriadneResolver-Setup-0.1.0.exe    5bcb216eef31ea28ed767e4134ab74bd5ac69dfbd365fd249e9e6938e55c986a
  TheseusNavigator-Setup-0.0.1.exe   7c735e88bad2da3347145adba3016c8f626a18b8422289c8c6ba471972e2952b
  TheseusNavigator-0.0.1-portable.exe 008fd84445babeabb401b2bca40ea9466b24b0e6d6c85104da7640c5c5c84521
  ariadne-v0.2.apk                   635c8f04d44ef855a8390b9eeddb8cd2d50622e81cc4e5004e8daffc1bb0425c
2026-07-29 13:54:34 +02:00

76 lines
3.9 KiB
Markdown

# Prompt for a new session: build Theseus, the browser
Copy everything below the line into a fresh Claude Code session (suggested
working directory: `D:\Dev\BnsBrowser`).
---
Build **Theseus Navigator** ("Theseus" for short) — a standalone desktop web
browser with native support for decentralized `.bch` domain names, resolved
from the Bitcoin Cash blockchain. Windows 10 first; Electron is the expected
shell (Chromium engine, no forking).
Branding: *Theseus Navigator, by Silent Mode — a Deviant project*. The name refers to the
thread through the labyrinth: the blockchain is the thread. Read
`D:\Dev\SilentMode\README.md` first for the whole picture. `theseus.bch` is
already registered on chipnet and can serve the browser's own homepage.
## Context — a working stack already exists
`D:\Dev\NameCoin` contains a complete, tested prototype (read its README.md,
PROTOCOL.md, and ROADMAP.md first):
- `src/lib/bns.js` — the resolver core: reads the "BNS1" protocol from BCH
chipnet via electrum (mainnet-js). Names are CashTokens NFTs; records are
JSON in OP_RETURN (`ip`, `u`, `p`, `h`, `s3`, `tls` types); discovery via a
beacon address. Subdomains map through the parent name (see bnsd.js).
- `src/daemon/bnsd.js` — reference gateway: serves `h` (on-chain HTML), `p`
(reverse proxy), `s3` (Sia storage via an S3 endpoint configured in
`sia-s3.json`), redirects `u`, and resolves `ip` records at DNS level.
- `ca/` — a local root CA ("BNS Local Root CA") that signs per-name certs;
fingerprints can be pinned via on-chain `tls` records.
- Live test names on chipnet right now: `hello.bch` (on-chain HTML),
`coinspectrum.bch` (ip → real nginx server), `siatest.bch` and
`coinspectrum.deviant.bch` (Sia-backed, subdomain namespace),
`theseus.bch` and `silentmode.bch` (on-chain HTML, brand pages).
Reuse `bns.js` as a library (npm file: dependency or copied module) — do not
reimplement the protocol. The browser must NOT require the system daemon,
NRPT rules, or the OS trust store: everything in-process.
## Requirements
1. **Chrome-like shell**: tabs, address bar, back/forward/reload, history.
Electron BrowserViews/WebContentsViews per tab.
2. **Native .bch resolution**: typing `hello.bch` or `x.deviant.bch` resolves
via the BNS core inside the app (no OS DNS involvement). Everything else
browses the normal web unchanged.
3. **Record handling**: `h` render directly; `ip` connect to the host (http);
`p`/`s3` fetch via an in-app gateway on a loopback port; `u` redirect.
4. **TLS for .bch without touching the OS store**: intercept at the session
level (Electron `setCertificateVerifyProc`) — accept certs for .bch hosts
when they chain to the BNS root or match the name's on-chain `tls`
fingerprint; normal CA validation for everything else.
5. **UI truthfulness**: a visible indicator when a page came from the chain /
Sia / a direct ip record, showing the NFT category and record type — the
"padlock" for decentralized provenance.
6. **Fallback honesty**: unregistered .bch → a clean NXDOMAIN page naming the
chain; electrum outages → readable error, not a hang.
7. Package with electron-builder into a Windows installer (unsigned is fine).
## Definition of done
All four live names above load correctly in tabs alongside normal websites
(e.g. wikipedia.org), with provenance indicators, from a packaged .exe on
Windows 10 — no admin rights, no system daemon, no OS DNS or cert changes.
## Constraints & notes
- BCH chipnet; electrum servers as in mainnet-js defaults (see bns.js usage).
- `sia-s3.json` in D:\Dev\NameCoin holds the S3 endpoint + keys for `s3`
records (server-side s3d at https://coinspectrum.duckdns.org:8600) — copy
it into the browser's config directory; do not commit it.
- Wallet/registration UI is OUT of scope (exists in the NameCoin repo's
wallet app); this session is the *viewing* side only.
- Test names may be unconfirmed on chipnet — the resolver handles mempool
entries; height -1 is normal.