Results 594 comments of Paul Miller

@lucacasonato proper direction.

Ideally everything is just uint8arrays.

@alexgleason @fr4nzap tree-shaking in noble works perfectly well. sha256 bundle only has code relevant to sha256. If it doesn't work for you, then you're doing something wrong.

if you can attach bundled nostr-tools with just generatePrivateKey I can help to investigate/decrease bundle size

Yeah. It's all necessary because `schnorr.utils` is not tree-shakeable. If you want your generatePrivateKey imports to be as minimal as possible, you can re-implement it by copy-pasting this code: https://github.com/paulmillr/noble-curves/blob/ce7a8fda552d052a7cc01796c4909af56a945734/src/abstract/weierstrass.ts#L853...

@fr4nzap everything you import is tree-shakeable. So, all imports are **needed** and actually used. `generatePrivateKey()` is a property of `schnorr.utils`, so it is not tree-shakeable. And I don't see any...

This sounds good to me. But ensure there is also `require` for all modules, so every module needs to have both commonjs and esm compiled versions, just like noble-curves.

What would be the use case?

Quote from contributor about ESM transition: --- Got it, thank you for explaining the rationale! Might be worth considering that extended support for Node.js v18 will be provided for users...

md5 is available in `test/misc/md5.ts`