Skip to content

Conversation

@lnbc1QWFyb24
Copy link
Owner

@lnbc1QWFyb24 lnbc1QWFyb24 commented Feb 24, 2023

This PR makes Lnmessage work in both NodeJS and the Browser without any polyfilling necessary.

  • Remove CryptoJS dependency
  • Add @noble/hashes dependency to replace CryptoJS and browser crypto
  • Add ws dependency and dynamically load it if not in a browser environment. So browsers will not load this dep in to their bundler
  • Fix deprecated usage of Buffer()
  • Remove async and await keywords as the new SHA256 function is synchronous

Fixes #3

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit 7f3478e into develop Feb 24, 2023
@lnbc1QWFyb24 lnbc1QWFyb24 deleted the enhancement/nodejs branch February 24, 2023 03:17
@lnbc1QWFyb24 lnbc1QWFyb24 mentioned this pull request Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants