aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-23 23:05:52 -0700
committerAdam Soltys <[email protected]>2026-06-23 23:05:52 -0700
commitd5e55c9c577feb6f8000bad3c37045a2cd7c9b4c (patch)
treec4260128cae53c949c29e1fe802c4d4a5aca94d0 /package.json
parentca7d85e8603ad5ee6a31afbf56777cedfc3931b5 (diff)
downloadcoinosv3-d5e55c9c577feb6f8000bad3c37045a2cd7c9b4c.tar.gz
coinosv3-d5e55c9c577feb6f8000bad3c37045a2cd7c9b4c.zip
Add QR scanner to the send page (lazy-loaded decoder)
Scan a Bitcoin address, a BIP21 URI (fills address + amount), or a signed-transaction QR (opens a broadcast confirmation, then relays it) from a viewfinder button on the Send form. Decoder strategy keeps the main bundle small: - Prefer the native BarcodeDetector (Chrome desktop/Android) — no lib. - Otherwise lazy-load jsQR from a separate dist/jsqr.js, only when the scanner is opened. jsQR stays out of index.html (~424 KB vs ~551 KB) and off the initial load. - The service worker precaches jsqr.js so offline scanning works for installed PWAs on browsers without BarcodeDetector. The scanner needs a camera + secure context, so it never shows on a standalone file:// page; offline air-gapped signing is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'package.json')
-rw-r--r--package.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/package.json b/package.json
index eef5b5d..a9d2971 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"@scure/bip32": "^1.7.0",
"@scure/bip39": "^1.6.0",
"@scure/btc-signer": "^1.8.1",
+ "jsqr": "^1.4.0",
"nostr-tools": "^2.23.5",
"qrcode-generator": "^2.0.4"
},