-
Notifications
You must be signed in to change notification settings - Fork 38
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
Polyfill the other secp256k1 libs #367
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK a50d16d
Tested both Import and Creation of HD wallets.
Received from Shield, sent to self, then sent to an external wallet - no issues.
Generated many addresses, checked the xpub on the explorer.
A-OK.
Abstract
Through various dependencies we are currently using 3 different secp256k1 libraries.
The aim of this PR is to remove these dependencies in favor of @noble/secp256k1.
tiny-secp256k1
A noble based library was already developed by bitcoiner lab
secp256k1
A replacement for this library was developed in-house here.
The original tests are being used to test this version of the library.
Why switch to a single secp256k1?
Using a single library allows us to reduce the bundle size, and the potential vulnerabilities.
The other libraries have a larger amount of dependencies, like
elliptic.js
andbn.js
, and as far as I can tell have not been audited.This brings the main bundle size down from 361KB to 325 KB(gzipped)
Testing
When testing is done, secp256k1-noble will be released on npm (With a better name)