-
Notifications
You must be signed in to change notification settings - Fork 74
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
Replacing the module crypto #40
Comments
Is there any functionality that bip32 doesn't offer that you need? Besides not having bitcoin in the name... lol |
My main issue with bip32 is that it depends on tiny-secp256k1 which needs to be recompiled every time you install it. I used it in my main project until very recently. Besides that, I don't see how your comment is related. I'm proposing a small change that would improve this lib's portability. |
I don't see how tiny-secp256k1 compilation step is related to browsers, since we fallback to pure JS when packaging for browsers. If the compilation fails you will use pure JS in node environment too. Since you were talking about browsers, I suggested a bip32 library that works in browsers out of the box. Asking why you don't use that helps me understand exactly what you are aiming for with this suggestion to hdkey library. I don't know why hdkey doesn't use browser friendly dependencies, but by asking you why you didn't use one that did (bip32), it gives us more context and information for considering your request. |
I'm leading an effort to remove native dependencies (except N-API based ones) from the Ethereum js ecosystem. Why?
As part of this process, I'm also making sure that the dependencies being used work well with web bundlers and don't produce unnecessarily large bundles. The problems with the Why |
In Example: {
"main": "hdkey.js",
"browser": {
"./lib/thingy.js": "./lib-browser/thingy.js",
"foo-dep": "foo-browser-dep"
}
} Anything that installs this as a dependency would get the correct bundle for that bundle system. |
@alcuadrado Also FYI tiny-secp256k1 has since moved to WASM, no more compilation, but now you have to deal with bundlers WASM support. (webpack works pretty well in my experience) |
Thanks for the heads up, @junderw! |
New Breaking Version 3.0I'm rewriting this today, in about 10 minutes (for probably 4-6 hours).
The stream will be live at https://twitch.tv/dashincubator and stored at https://youtube.com/@dashincubator. Changes I'm making include:
Node v18-only changes
These defineProperty / prototype changes are necessary because they don't work with I have the prerequisite PR up at dashhive/DashHD.js#4. I'm considering wether to try to get the old mocha tests going or to migrate them to modern table-driven tests. I will submit the PRs here too, but we'll be maintaining our own fork either way. |
Hi,
I'm opening this issue to know if you are open to replacing the use of
crypto
for more browser-friendly libraries likecreate-hmac
andrandombytes
.I've had a hard time using this library with Rollup, which led me to bundling my own version here: https://github.com/ethereum/js-ethereum-cryptography/tree/master/hdkey-without-crypto-config
I'd love not to have to do that, and the needed change is really small. I can prepare a PR for this, making sure that the builtin implementations are used on node.
The text was updated successfully, but these errors were encountered: