Litecoin portfolio-record backup tests — portfolio-backup-20261012-v1 Version: 1.0.0 Reviewed date: 12 October 2026 SCOPE Current Litecoin.watch portfolio v4 module functions were snapshotted byte for byte, identified with SHA256 and exercised in Node.js using fictional typed records. Six runtime modules were evaluated: tools-core, portfolio-fx, portfolio-ledger, portfolio-backup (legacy parsing/CSV support), portfolio-io and portfolio-crypto. portfolio-v4 is also snapshotted to document reviewed UI wiring; its DOM/browser-storage handlers were not executed. No real browser localStorage, wallet, seed, private key, account, trade, cloud service or API was accessed. No live application file was modified. FIXTURE Three accounts: main / Exchange records; cold / Offline wallet; unused / Unused account. Two distinct 0.75 LTC fills at USD 96 each, with USD 0.60 cash fee each, followed by a 0.4 LTC internal transfer with 0.0001 LTC extra fee, then a 0.2 LTC sale at USD 120 with USD 0.25 cash fee. All market prices, manual FX values and observed balance checks are fictional. Combined remaining quantity: 1.29990000 LTC. Main: 0.89990000 LTC. Cold: 0.40000000 LTC. Unused: zero. Saved main check declares 0.90000000 LTC, a 0.00010000 LTC difference. Saved cold check declares 0.40000000 LTC, no difference. Cash purchase cost: USD 145.20; net sale proceeds USD 23.75. At the hypothetical ending quote USD 110, remaining value is USD 142.989. Network fee releases USD 0.00968 pooled acquisition cost. Remaining pooled basis USD 125.83032. Total economic result USD 21.539 before tax/exit costs. Independent arithmetic uses BigInt litoshis and USD units scaled by 1e8. Cost comparisons allow a 1e-9 difference from the production Number arithmetic. MEASURED BEHAVIOR - JSON export/parse and merge into a fresh default Main-only portfolio preserve all accounts, transactions, saved checks and transaction metadata exactly after normalization. Export timestamp is not part of normalized state. - The SAME backup imported again adds zero and skips four transaction records. - A partial ledger with one original fill adds three and skips one, preserving both distinct identical fills in the complete snapshot. - Same transaction ID with a changed amount is rejected without mutating inputs. - Merging into a populated ledger retains its existing account name and saved check for that account, even when the imported check date is newer. - A record differing only in historical FX or pre-trade valuation is treated as a duplicate and those existing metadata values are retained. A fresh restore is therefore not interchangeable with updating an existing ledger. - CSV preserves the complete current transaction fields and used account names, including transfer fees, FX and valuations in this fixture; saved balance checks and unused accounts are omitted. Existing checks are not erased when merging a CSV back into a populated portfolio. - A tested formula-leading multiline note is escaped in CSV and parsed back. This one case is not an audit of arbitrary spreadsheet applications. - Optional encryption uses actual portfolio-crypto code with Node WebCrypto: AES-256-GCM; PBKDF2-SHA256; 600,000 iterations; 16-byte random salt; 12-byte random nonce. Correct password decrypts exact JSON; wrong password, a changed ciphertext byte and a changed nonce reject. Different encryptions produced different salt/nonce/ciphertext. Unsupported envelope work factor rejects. RUN Use Node.js 24 (recorded exact version in results.json), standard library only. Unzip source-snapshots.zip into the same folder as the fixture and runner, so source-manifest.json and source/*.js.txt are beside backup-test.cjs.txt. node backup-test.cjs.txt . For an independent rerun, use a NEW temporary copy of the release folder. The runner regenerates results and fictional export files in its own folder; it does not read/write actual browser portfolio storage. 60 assertions passed in the recorded run; 13 result cases are listed. The source loader validates each evaluated module hash before executing it. production-source-check.json records the live version check: all seven raw production source files matched their snapshots, and the portfolio page's seven corresponding hashed assets matched the local build bytes. This checks version identity, not browser-interface execution. Fresh backup exportedAt, encryption salt/nonce/ciphertext and times will differ. Compare normalized state, case outcomes and exact quantities, not ciphertext hash equality between two fresh encryptions. ENCRYPTED FIXTURE fixture-encrypted.json contains only the public fictional fixture. The public test password is: fictional-backup-test-only NEVER reuse that password for a real backup. It exists for reproducibility. Passwords are not wallet recovery seeds. Encrypting a downloaded record file does not encrypt the app's browser storage or secure an already compromised device. These tests do not constitute a cryptographic/security audit. INTEGRITY AND LIMITS SHA256SUMS.txt identifies the published byte versions. It does not establish third-party authenticity, record truth, exchange settlement or tax compliance. Module tests do not exercise browser UI, download handling, profile migration, storage loss, password managers, cloud copies or cross-browser compatibility. The article's manual restore procedure must be carried out in a separate empty environment while preserving the original browser data and backup file. A browser's backup-request status is not a successful-restore certificate. Research, code and drafting used AI assistance. No independent external review or human performed browser restore is claimed.