feat(wallet): QR scan modal — camera + animated QR, wired into Home/Send/Receive

New WalletScanModal scans QR codes with the device camera (BarcodeDetector
with jsQR fallback) including animated/multi-frame QRs via qrloop, then
routes what it saw: BOLT11 invoices -> lightning pay (amount locked from
the invoice when present), bitcoin:/BIP21 URIs -> on-chain send, Cashu
tokens -> redeem, Fedimint invites -> join. Entry points: camera button on
the wallet card (far right), and a Scan button centered between the
Close/Send and Close/Receive buttons of both modals.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-21 13:14:31 -04:00
co-authored by Claude Fable 5
parent be5122048b
commit 8968d41ca9
9 changed files with 882 additions and 16 deletions
+9
View File
@@ -0,0 +1,9 @@
declare module 'qrloop' {
export type FramesState = unknown
export function parseFramesReducer(state: FramesState | null, frame: string): FramesState
export function areFramesComplete(state: FramesState): boolean
export function framesToData(state: FramesState): { toString(encoding: string): string }
export function totalNumberOfFrames(state: FramesState): number
export function currentNumberOfFrames(state: FramesState): number
export function progressOfFrames(state: FramesState): number
}