From 38951f42d5cd316ab9ee40b75aa8436ea618cfe8 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Fri, 31 Jul 2026 23:09:23 +0200 Subject: [PATCH] Resolver 3438d558: ASCII-clean install.ps1 + multi-TLD NRPT + VPS-first electrum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parallel session was right — the previously-shipped f94834b5 pre-dated: 1. the ASCII em-dash sweep in setup/install.ps1 (Inno's [Run] uses powershell.exe / PS 5.1; em-dashes in the file crashed the parser under UAC, so the installer copied files but never registered the scheduled task or NRPT rule) 2. the multi-TLD NRPT expansion (added .p2p .bit .nav alongside .bch) 3. the VPS-primary electrum server list — resolver-web.js now dials wss://coinspectrum.duckdns.org:50011 first (Silent Mode's own BCHN-backed BNS-only indexer), public servers as fallback Result: a real user installing 3438d558 on a fresh Windows box now gets a working system-wide resolver with no manual steps. Deployed to dl.silentmode.st and mirrored to Sia bns/silentmode/. --- dev/test-our-indexer.mjs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 dev/test-our-indexer.mjs diff --git a/dev/test-our-indexer.mjs b/dev/test-our-indexer.mjs new file mode 100644 index 0000000..f25518f --- /dev/null +++ b/dev/test-our-indexer.mjs @@ -0,0 +1,34 @@ +// Prove Theseus can resolve hello.bch through ONLY our VPS-hosted BNS indexer. +// Uses the directIP path (pinned IP + SNI) because this machine's system resolver +// mangles Node's getaddrinfo — same reason test-directip.mjs exists. +import WebSocket from "ws"; +import { resolveName, buildIndex, CHIPNET_ELECTRUM } from "../../Argus/src/lib/resolver-web.js"; + +const OURS = CHIPNET_ELECTRUM[0]; // freshly added — Silent Mode's own server +const PUBLIC = CHIPNET_ELECTRUM.find(s => s.url.includes("chipnet.bch.ninja")); +const NAME = "hello.bch"; + +console.log("Our seed[0]:", OURS); +console.log("Public reference:", PUBLIC.url, "\n"); + +console.log("1) resolving", NAME, "via OUR indexer (directIP → pinned ip + SNI) …"); +const mine = await resolveName(NAME, { + WebSocket, electrum: [OURS], directIP: true, +}); +console.log(" ", mine ? "records: " + Object.keys(mine.records).join(", ") : "NOT FOUND"); +console.log(" txid:", mine?.txid, "height:", mine?.height, "category:", mine?.category); + +console.log("\n2) resolving", NAME, "via a public server (directIP) …"); +const ref = await resolveName(NAME, { + WebSocket, electrum: [PUBLIC], directIP: true, +}); +console.log(" ", ref ? "records: " + Object.keys(ref.records).join(", ") : "NOT FOUND"); + +console.log("\n3) diff:"); +const ok = mine && ref && + JSON.stringify(mine.records) === JSON.stringify(ref.records) && + mine.category === ref.category && + mine.txid === ref.txid; +console.log(ok ? " ✅ IDENTICAL — Theseus resolves hello.bch via our server." + : " ❌ mismatch:\n mine=" + JSON.stringify(mine) + "\n ref =" + JSON.stringify(ref)); +process.exit(ok ? 0 : 1);