bitcoinjs / bolt11

A library for encoding and decoding lightning network payment requests as defined in BOLT #11.
MIT License
92 stars 64 forks source link

replace crypto with create-hash. #31

Closed fiatjaf closed 4 years ago

fiatjaf commented 4 years ago

The nodejs crypto package is only being used to create hashes, but then this package doesn't work on browsers unless some complicated shim stuff is done.

The create-hash package has the same API as crypto.createHash and uses the same nodejs crypto when available, but uses its own pure-JS thing when in browsers or browser-like environments like react-native.

Plus: it was also already being included by some deep dependency.

junderw commented 4 years ago

Please include package-lock.json changes as well.

fiatjaf commented 4 years ago

I'm not well-versed in package-json.lock things but I think I tried to generate one and it didn't have any difference.