Skip to content

Litecoin payment URI parser tests

Twenty identical requests tested at the parsing boundary of Electrum-LTC 4.2.2.1 and Cake Wallet v6.4.5. Every input, output and software version is available.

Scope: source-isolated functions, not complete wallet applications. No phone camera, wallet GUI, signing or broadcast. A parser returning data does not mean the payment is valid or can be sent. Tests ran on 30 September 2026.

Compare exact results

Parser return values; neither column is a wallet safety rating
Input caseElectrum-LTC · function returnCake · extracted amount text
Address onlyReturned; no amountNo amount text
URI with no amountReturned; no amountNo amount text
Exactly eight decimalsReturned; 12345678 litoshis0.12345678
One litoshiReturned; 1 litoshis0.00000001
Nine decimalsReturned; 12345678 litoshis0.123456789
Negative amountReturned; -100000000 litoshis-1
Decimal commaError: failed to parse 'amount' field: InvalidOperation([<class 'decimal.ConversionSyntax'>])0,125
Duplicate amountError: Duplicate Key: 'amount'2
Empty amountReturned; no amountNo amount text
Unknown optional fieldReturned; 12500000 litoshis0.125
Unknown required fieldReturned; 12500000 litoshis0.125
UTF-8 and encoded ampersandReturned; 12500000 litoshis0.125
Unescaped ampersandReturned; 12500000 litoshis0.125
Wrong address checksumError: Invalid litecoin address: LLnCCHbSzfwWquEdaS5TF2Yt7uz5Qb1SZ20.125
Wrong currency schemeError: Not a litecoin URI0.125
Uppercase schemeReturned; 12500000 litoshis0.125
Native SegWit addressReturned; 12500000 litoshis0.125
Scientific notationReturned; 1 litoshis1e-8
Above total supplyError: failed to parse 'amount' field: InvalidBitcoinURI("amount is out-of-bounds: Decimal('8400000100000000') LTC")84000001
Time and expiry metadataReturned; 12500000 litoshis0.125

Reproduce the comparison

Electrum’s original URI and address-validation function bodies were executed from the verified release archive. Cake’s unchanged constructor and PaymentRequest.fromUri factory were compiled with Dart 3.13.5; guarded adapters throw on unrelated Lightning/ERC681/Nano branches. All fixtures avoid those paths. The complete apps and downstream address/amount checks were not loaded.

No private keys are known for the synthetic fixture addresses. Never send money to a corpus address. The table establishes a parser result for the pinned source and runtime; it does not establish that any complete wallet pays an invalid destination or negative amount.

Source versions: Electrum-LTC 4.2.2.1; Cake v6.4.5 source function. AI-assisted research, code and drafting; no independent review claimed.

Jarosław Wasiński
Editor-in-chief · Financial markets and Litecoin education

Editor-in-chief of Litecoin.watch and founder of MyBank.pl. His published work covers foreign exchange, financial education and Litecoin. On Litecoin.watch, his remit includes editorial direction, source transparency and the practical guides and research published by the site.

Background, selected work and editorial responsibility →

Founder of MyBank.pl Financial education and market analysis Named editorial responsibility