Skip to content

refactor: hashing to @noble/hashes#3997

Open
a-khushal wants to merge 2 commits intoZeusLN:masterfrom
a-khushal:hash-noble
Open

refactor: hashing to @noble/hashes#3997
a-khushal wants to merge 2 commits intoZeusLN:masterfrom
a-khushal:hash-noble

Conversation

@a-khushal
Copy link
Copy Markdown
Contributor

Description

Relates to issue: ZEUS-3989

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • LDK Node
  • Embedded LND

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the project's cryptographic hashing operations to the @noble/hashes library, replacing several legacy dependencies including fast-sha256, hash.js, js-sha256, create-hash, object-hash, and sha.js. The changes standardize hashing implementations across backends, stores, and components, and include necessary updates to the dependency configuration and Jest mapping. I have no feedback to provide.

@myxmaster
Copy link
Copy Markdown
Collaborator

Looks good, can you please check out this as well?

@a-khushal
Copy link
Copy Markdown
Contributor Author

Looks good, can you please check out this as well?

d674b0d

@myxmaster
Copy link
Copy Markdown
Collaborator

we should keep it async (scryptAsync with await)

@a-khushal a-khushal force-pushed the hash-noble branch 2 times, most recently from 9211df2 to ec6b7cb Compare April 22, 2026 23:00
@kaloudis
Copy link
Copy Markdown
Contributor

maybe we should break out hashing functionality out into a Hash/HashingUtils file. We could then add appropriate tests for the existing implementations, then potentially have some assurance that outputs don't change when switching to the new library.

@kaloudis kaloudis added Refactor Code that needs to be refactored Hashing labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hashing Refactor Code that needs to be refactored

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants