Bundle the skycoin-web thin-client wallet into the wasm-visor PWA (theskywirenetwork.net) so it loads same-origin (not over dmsg) and only the node data crosses the mesh. Substitute for the discontinued skycoin mobile wallets. Follows the coin-node work (#3436/#3438) and the port-80/Origin fixes (#3439/#3441).
Why this shape
skycoin-web is a transport-agnostic HTTP thin client (client-side crypto via skycoin-lite.wasm, wallets in browser localStorage, node picker via Settings→Nodes gated by enableCustomNodes). Keep it a frozen vendored asset — do NOT add dmsg to it (dmsg is in-tree at skywire/pkg/dmsg; skywire vendors skycoin; importing dmsg into skycoin ⇒ skywire→skycoin→skywire dependency cycle).
- It's an external subprocess app (HTTP server on a port; the HV UI
WalletComponent iframes it). A browser tab can't run a subprocess/TCP listener, so the wasm path serves the static dist and routes /api in-browser via override.js → Core.ServeHTTP.
- Host-native already works with zero code change:
HTTP_PROXY=socks5://127.0.0.1:4443 skywire skycoin web --node-url http://<host>.<b32>.dmsg (Go default transport + socks5h remote DNS — verified live). Tracked separately below.
Wasm PWA build (8 tasks)
- Copy
vendor/.../src/skycoin-web/src/gui/dist (~11 MB; 4.7 MB is skycoin-lite.wasm) → pkg/visor/static/wallet/ (auto-embedded by //go:embed static). Add a Makefile sync target (à la make embed-wasm-visor).
- Rebuild the wallet with
ng build --base-href /wallet/ (or post-rewrite index.html asset paths) so its assets resolve under /wallet/. (ng build needs node_modules → CI/host build.)
serve.go: /wallet/ served by the existing fileServer fall-through once at static/wallet/ (verify dir-index behavior).
override.js: route /api/v1/* and /api/v2/* → dmsg to the configured node pk:port; everything else → Core (HV API has no /v1//v2/, so the prefix cleanly disambiguates — no wallet rebuild needed for routing).
pkg/wasmhv/router.go (Core): add an HTTP-over-dmsg fetch to a node pk:port (reuse the fetchDmsg / deep-link-gateway path).
browse.js: menu entry "Skycoin Wallet" → WinBox iframe /wallet/ (mirror createChatWindow).
sw.js: precache /wallet/* for offline launch.
- Node pk:port setting (default a known node; user-settable — the "wallet backend service"). Wallet keeps
nodeUrl:'' → same-origin /api/v1 → override routes it.
Validation needs a wasm build + hv serve + CDP browser drive (load /wallet/, create a seed wallet, read the chain over dmsg).
Host-native follow-ups (separate, small)
- Expose "route over dmsg" in the HV UI wallet tab: launch the
skycoin-web app with HTTP_PROXY=visor resolving proxy + a .dmsg node-url (app-launcher env injection).
- Add a
--socks5/--proxy flag to skywire skycoin web as a belt-and-suspenders fallback to the env var.
Bundle the skycoin-web thin-client wallet into the wasm-visor PWA (theskywirenetwork.net) so it loads same-origin (not over dmsg) and only the node data crosses the mesh. Substitute for the discontinued skycoin mobile wallets. Follows the coin-node work (#3436/#3438) and the port-80/Origin fixes (#3439/#3441).
Why this shape
skycoin-webis a transport-agnostic HTTP thin client (client-side crypto viaskycoin-lite.wasm, wallets in browser localStorage, node picker via Settings→Nodes gated byenableCustomNodes). Keep it a frozen vendored asset — do NOT add dmsg to it (dmsg is in-tree atskywire/pkg/dmsg; skywire vendors skycoin; importing dmsg into skycoin ⇒skywire→skycoin→skywiredependency cycle).WalletComponentiframes it). A browser tab can't run a subprocess/TCP listener, so the wasm path serves the staticdistand routes/apiin-browser via override.js →Core.ServeHTTP.HTTP_PROXY=socks5://127.0.0.1:4443 skywire skycoin web --node-url http://<host>.<b32>.dmsg(Go default transport + socks5h remote DNS — verified live). Tracked separately below.Wasm PWA build (8 tasks)
vendor/.../src/skycoin-web/src/gui/dist(~11 MB; 4.7 MB isskycoin-lite.wasm) →pkg/visor/static/wallet/(auto-embedded by//go:embed static). Add a Makefile sync target (à lamake embed-wasm-visor).ng build --base-href /wallet/(or post-rewriteindex.htmlasset paths) so its assets resolve under/wallet/. (ng buildneedsnode_modules→ CI/host build.)serve.go:/wallet/served by the existing fileServer fall-through once atstatic/wallet/(verify dir-index behavior).override.js: route/api/v1/*and/api/v2/*→ dmsg to the configured node pk:port; everything else →Core(HV API has no/v1//v2/, so the prefix cleanly disambiguates — no wallet rebuild needed for routing).pkg/wasmhv/router.go(Core): add an HTTP-over-dmsg fetch to a nodepk:port(reuse the fetchDmsg / deep-link-gateway path).browse.js: menu entry "Skycoin Wallet" → WinBox iframe/wallet/(mirrorcreateChatWindow).sw.js: precache/wallet/*for offline launch.nodeUrl:''→ same-origin/api/v1→ override routes it.Validation needs a wasm build +
hv serve+ CDP browser drive (load/wallet/, create a seed wallet, read the chain over dmsg).Host-native follow-ups (separate, small)
skycoin-webapp withHTTP_PROXY=visor resolving proxy + a.dmsgnode-url (app-launcher env injection).--socks5/--proxyflag toskywire skycoin webas a belt-and-suspenders fallback to the env var.