3.9 KiB
Prompt for a new session: build Theseus, the browser
Copy everything below the line into a fresh coding-CLI 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,tlstypes); discovery via a beacon address. Subdomains map through the parent name (see bnsd.js).src/daemon/bnsd.js— reference gateway: servesh(on-chain HTML),p(reverse proxy),s3(Sia storage via an S3 endpoint configured insia-s3.json), redirectsu, and resolvesiprecords at DNS level.ca/— a local root CA ("BNS Local Root CA") that signs per-name certs; fingerprints can be pinned via on-chaintlsrecords.- Live test names on chipnet right now:
hello.bch(on-chain HTML),coinspectrum.bch(ip → real nginx server),siatest.bchandcoinspectrum.deviant.bch(Sia-backed, subdomain namespace),theseus.bchandsilentmode.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
- Chrome-like shell: tabs, address bar, back/forward/reload, history. Electron BrowserViews/WebContentsViews per tab.
- Native .bch resolution: typing
hello.bchorx.deviant.bchresolves via the BNS core inside the app (no OS DNS involvement). Everything else browses the normal web unchanged. - Record handling:
hrender directly;ipconnect to the host (http);p/s3fetch via an in-app gateway on a loopback port;uredirect. - 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-chaintlsfingerprint; normal CA validation for everything else. - 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.
- Fallback honesty: unregistered .bch → a clean NXDOMAIN page naming the chain; electrum outages → readable error, not a hang.
- 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.jsonin D:\Dev\NameCoin holds the S3 endpoint + keys fors3records (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.