paulmillr / scure-btc-signer

Audited & minimal library for creating, signing & decoding Bitcoin transactions.
https://paulmillr.com/noble/#scure
MIT License
158 stars 41 forks source link

Address.decode issue for LTC address #112

Closed nikashitsa closed 2 months ago

nikashitsa commented 2 months ago

Hi, thanks for great lib!

I use it with Litecoin and faced issue when try to decode Litecoin address like this LTCHodBXqzzfDvkL1kA3dHRVsx4SCL3Y13 It's p2pkh address, but due to bech32 for Litecoin is ltc it's treated as bech32 address here https://github.com/paulmillr/scure-btc-signer/blob/b38a853261a2b556f1b5ac7a9b3c7cdff59ddd2b/src/payment.ts#L722 and I get error below Error: String must be lowercase or uppercase.

I understand that this doesn't affect Bitcoin address decode, but probably you can make easy fix for this case also?

bitspill commented 2 months ago

Yea, that's malware.... not even closely relevant to the issue

@paulmillr if you can hide/delete those messages. I'd hope no one here would download and run but can't be too sure