feat: v2 — view-key payment confirmation with live monitoring

- Payment monitor: enter private view key to track incoming payments
- Scans mempool + last 100 blocks via PHP proxy with 4-node failover
- Lightweight crypto: 30KB noble-curves bundle (Ed25519 + Keccak-256)
- Subaddress support (network byte 42 detection, a*D validation)
- Confirmation progress bar (0-10 confirmations)
- Underpayment detection
- Deadline badges (7/14/30 days) replacing minutes input
- QR code: standard colors (black on white) for wallet scanner compatibility
- QR hint positioned below QR code
- View key masked input, never stored or transmitted
This commit is contained in:
Alexander Schmidt
2026-03-25 09:09:46 +01:00
parent 35552b7dff
commit 1acf990943
9 changed files with 1062 additions and 31 deletions

8
sw.js
View File

@@ -1,11 +1,13 @@
var CACHE_NAME = 'xmrpay-v1';
var CACHE_NAME = 'xmrpay-v2';
var ASSETS = [
'/',
'/index.html',
'/app.js',
'/i18n.js',
'/monitor.js',
'/style.css',
'/lib/qrcode.min.js'
// xmr-crypto.bundle.js is lazy-loaded and runtime-cached
];
self.addEventListener('install', function (e) {
@@ -32,8 +34,8 @@ self.addEventListener('activate', function (e) {
self.addEventListener('fetch', function (e) {
var url = new URL(e.request.url);
// CoinGecko API — network only, don't cache
if (url.hostname !== location.hostname) {
// External APIs and RPC proxy — network only, don't cache
if (url.hostname !== location.hostname || url.pathname.startsWith('/api/')) {
e.respondWith(fetch(e.request));
return;
}