2026-07-29 13:54:34 +02:00
|
|
|
# Prompt for a new session: build Theseus, the browser
|
|
|
|
|
|
2026-09-10 22:21:19 +02:00
|
|
|
Copy everything below the line into a fresh coding-CLI session (suggested
|
2026-07-29 13:54:34 +02:00
|
|
|
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.
|