From 6539f84b247cbf7f93e380786716367b5d6c6d6d Mon Sep 17 00:00:00 2001 From: Local Dev Date: Mon, 31 Aug 2026 03:35:39 +0200 Subject: [PATCH] electrum: wire wss://silentmode.st/electrum as first-choice (port 443 reachable) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bns-indexer on VPS was only exposed on port 50011 via nginx, which corporate firewalls, mobile carriers, and many VPNs block. Added an nginx location on 443 that proxies to the same 127.0.0.1:50010, giving us a browser-friendly WSS endpoint on the standard HTTPS port. * lib/electrum.js CHIPNET_ELECTRUM: wss://silentmode.st/electrum listed first (used by registrar.connect() + everything that depends on it). * lib/resolver-web.js CHIPNET_ELECTRUM: same, kept in lockstep per the "change both together" comment. * bns-register.js bundle rebuilt to bake the new list. * portal.html imports the bundle with ?v= so Chrome's in-memory ES-module map doesn't serve a stale copy across tabs. Portal now connects successfully; next remaining issue is that bns-indexer only supports (server.version, get_history, transaction.get) — `blockchain.scripthash.listunspent` for wallet address queries is not implemented, so the "list your names" step fails there. Follow-up: add a GET /api/holdings/
to public-gateway.mjs backed by the existing BCHN electrum access, so the portal can pull holdings over plain HTTP. --- src/lib/electrum.js | 5 +++++ src/lib/resolver-web.js | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/electrum.js b/src/lib/electrum.js index ad1d9e3..4665f80 100644 --- a/src/lib/electrum.js +++ b/src/lib/electrum.js @@ -12,6 +12,11 @@ // whole resolver down. A server reachable on 443 is therefore worth more than // three more on 50004; put your own there and list it first. export const CHIPNET_ELECTRUM = [ + // Silent Mode's own bns-indexer proxied over standard HTTPS/443 via nginx + // (bns-electrum-wss vhost extended into silentmode-st). This is the entry + // that makes the resolver work from every network, including corporate + // firewalls and mobile carriers that block the non-standard ports below. + "wss://silentmode.st/electrum", "wss://chipnet.bch.ninja:50004", "wss://chipnet.imaginary.cash:50004", "wss://tbch4.loping.net:62002", diff --git a/src/lib/resolver-web.js b/src/lib/resolver-web.js index 4660e0b..3965ab8 100644 --- a/src/lib/resolver-web.js +++ b/src/lib/resolver-web.js @@ -41,9 +41,13 @@ function canonicalKey(raw) { // best-effort fallback: when DNS works the fresh hostname is always used, and the // authoritative, updatable server list lives on-chain (see ELECTRUM_LIST_NAME). export const CHIPNET_ELECTRUM = [ - // Silent Mode's own BCHN-backed BNS-only indexer (Argus/src/indexer/bns-indexer.js). - // Tried first so we prefer our own infrastructure; the public servers below - // remain as fallbacks and cross-checks against a single-server view. + // Silent Mode's own BCHN-backed BNS-only indexer, exposed on standard port + // 443 so browsers on restrictive networks (corporate firewalls, mobile + // carriers, VPNs) can reach it. Same backend as the :50011 endpoint below, + // just proxied through the silentmode.st nginx on the normal https port. + // Tried first so we prefer our own infrastructure on the most-reachable + // route; the public servers below remain as fallbacks and cross-checks. + { url: "wss://silentmode.st/electrum", ip: "195.184.247.106" }, { url: "wss://coinspectrum.duckdns.org:50011", ip: "195.184.247.106" }, { url: "wss://chipnet.bch.ninja:50004", ip: "135.148.236.244" }, { url: "wss://chipnet.imaginary.cash:50004", ip: "66.29.152.199" },