dgb-wallet/packages/web-ui/index.html
Digibyte.X d50286a9a5 DigiByte.X Wallet — recovery-first web wallet monorepo
Packages: core (BIP39/32/44/49/84/86 derivation, WIF), keystore (PBKDF2 +
AES-GCM), psbt, p2p (BIP157/158 SPV daemon, Dandelion++ broadcast with
relay-echo verification), blockbook, rpc, electrum, net, bns, web-ui
(React/Vite), mobile (Expo). ops/ holds the nginx vhost, systemd unit and
push.sh deploy script for digibyte.x/web.
2026-09-20 20:16:52 +02:00

48 lines
2.3 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<script>
// Runtime base fix. The wallet is loadable via two paths:
// • https://digibyte.x/web/ (direct, SNI-pinned)
// • https://navigate.st/bns/digibyte.x/web/ (public gateway)
//
// The gateway prepends <base href="/bns/digibyte.x/"> to every
// BNS-served HTML — helpful for sites written with relative
// paths, ruinous for ours because it steers ./assets/… one
// directory too shallow. This inline script (the FIRST child
// of <head>) strips any injected <base> and inserts its own,
// anchored to <origin><prefix-through-/web/>. Both asset URLs
// (built by Vite as ./assets/…) and API fetches (rewritten as
// ../p2p/…, ../rpc/…) then resolve to the correct absolute
// URL under whichever origin the wallet was loaded from.
//
// Must run inline + synchronous BEFORE the deferred module
// script tag lower down — that's why it's a bare <script>, not
// type=module, and placed first.
(function () {
var pathname = window.location.pathname;
var idx = pathname.indexOf('/web/');
// Anchor at .../web/ (index-inclusive so both slashes stay).
var prefix = idx >= 0 ? pathname.substring(0, idx + 5) : '/';
var head = document.head;
var bases = head.getElementsByTagName('base');
while (bases.length > 0) bases[0].parentNode.removeChild(bases[0]);
var base = document.createElement('base');
base.href = window.location.origin + prefix;
head.insertBefore(base, head.firstChild);
})();
</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="color-scheme" content="dark" />
<meta name="theme-color" content="#22A0FF" />
<meta name="description" content="Recovery-first DigiByte wallet — BIP39 import, BIP44/49/84/86 coverage, WIF import, on-chain-pinned TLS. Nothing leaves the browser." />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<link rel="mask-icon" href="./favicon.svg" color="#22A0FF" />
<title>DigiByte.X Wallet</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>