commit 7898e78ff4bb803b8557297ced25f590bdb75723 Author: Local Dev Date: Wed Jul 29 13:54:34 2026 +0200 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 diff --git a/BROWSER-PROMPT.md b/BROWSER-PROMPT.md new file mode 100644 index 0000000..9257275 --- /dev/null +++ b/BROWSER-PROMPT.md @@ -0,0 +1,76 @@ +# 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. diff --git a/PACKAGING-PROMPT.md b/PACKAGING-PROMPT.md new file mode 100644 index 0000000..5cb2274 --- /dev/null +++ b/PACKAGING-PROMPT.md @@ -0,0 +1,91 @@ +# Theseus Navigator — packaging session brief + +Goal of this session: turn Theseus from "runs via `npm start`" into a +**downloadable, secret-free Windows installer** hosted at `dl.silentmode.st`, +with its SHA-256 published on-chain. Do it in the three phases below, in order. + +Working dir: `D:\Dev\SilentMode\TheseusNavigator`. Prefix shell commands with +`rtk`. Windows + PowerShell primary; Bash tool available. + +**Read first:** `..\README.md` (hub), `..\BUILD-ROADMAP.md` (this is Stage 5), +`..\SECURITY.md` (Rules 0/2/3 govern this session), `..\_coordination\INTERFACES.md` +(the resolver contract), and this file. Theseus already works for `.bch`; the +engine (`..\Argus\src\lib\resolver-web.js`) is already multi-TLD and zero-dep. + +--- + +## Current state (verified 2026-07-25) +- Theseus **runs** (`npm start`): Electron, tabs, back/fwd/reload/home, address + bar, DuckDuckGo search box, home page, **Tor toggle** (bundled `tor/tor.exe`, + routes web session + resolver WS + content fetch via SOCKS). +- Resolution reuses `..\Argus\src\lib\resolver-web.js` (import in `main.js`). +- `bns://` custom protocol serves content; provenance strip shows chain/Sia/server. +- **NOT** packaged: no `electron-builder`, no installer. +- **Two blockers for a public build (must fix):** + 1. `main.js` `resolveHost()` is still `.bch`-only + (`host.replace(/\.bch$/,"").split(".").pop()`), and `navigate()` / + `serveBns()` / `subFolder()` assume `.bch`. The engine is multi-TLD; the + browser must catch up. + 2. `serveBns()` fetches `s3` content with **your Sia credentials** + (`getAws()` reads `..\Argus\sia-s3.json`). **A public build MUST NOT ship + credentials** (SECURITY.md Rule 0). Switch `s3` to the public gateway. + +## Phase 1 — Multi-TLD + registry badge (browser catches up to engine) +- `resolveHost(host)`: stop stripping `.bch`/`.pop()`. Pass the **full host** to + `resolveName(host, { WebSocket: currentWS() })` — it already normalizes any + `.