Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace node crypto methods with noble methods #709

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

twhy
Copy link
Contributor

@twhy twhy commented Jun 6, 2024

Description

This PR replaces Node crypto createHash, createHmac, createCipheriv ... with @noble/hashes and @noble/ciphers.

Once merged, there will be no import {} from 'crypto' or import {} from 'node:crypto' in Lumos packages.

Type of change

  • Refactor (non-breaking change)

How Has This Been Tested?

Unit Tests

Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lumos-website ✅ Ready (Inspect) Visit Preview Jun 7, 2024 6:34am

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 89.23077% with 7 lines in your changes missing coverage. Please review.

Project coverage is 87.12%. Comparing base (d4c2cba) to head (12cbbf7).

Current head 12cbbf7 differs from pull request most recent head d17df9e

Please upload reports for the commit d17df9e to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           browser     #709      +/-   ##
===========================================
+ Coverage    87.06%   87.12%   +0.05%     
===========================================
  Files          132      132              
  Lines        25246    25227      -19     
  Branches      2738     2737       -1     
===========================================
- Hits         21981    21979       -2     
+ Misses        3225     3208      -17     
  Partials        40       40              
Files Coverage Δ
packages/crypto/src/index.ts 100.00% <100.00%> (ø)
packages/hd/src/keychain.ts 100.00% <100.00%> (ø)
packages/hd/src/keystore.ts 92.01% <100.00%> (+0.31%) ⬆️
packages/hd/src/mnemonic/index.ts 39.53% <63.15%> (+4.56%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4c2cba...d17df9e. Read the comment docs.

@twhy twhy requested review from homura and Keith-CY June 6, 2024 09:56
packages/hd/package.json Show resolved Hide resolved
packages/hd/src/keychain.ts Show resolved Hide resolved
packages/hd/src/mnemonic/index.ts Show resolved Hide resolved
packages/crypto/src/index.ts Outdated Show resolved Hide resolved
packages/hd/src/keychain.ts Show resolved Hide resolved
packages/hd/src/keystore.ts Show resolved Hide resolved
packages/hd/src/keystore.ts Outdated Show resolved Hide resolved
.changeset/gorgeous-yaks-notice.md Outdated Show resolved Hide resolved
packages/hd/src/keystore.ts Outdated Show resolved Hide resolved
@twhy twhy merged commit d13f880 into browser Jun 7, 2024
9 checks passed
@twhy twhy deleted the crypto-to-noble branch June 7, 2024 07:14
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.

3 participants