Closed shrugs closed 5 years ago
isomorphic-webcrypto
is a weird dependency that's really only in our library for legacy reasons. Its SHA-256 implementation is asynchronous for some reason, which never sat well with me.
I pushed up a branch that axes isomorphic-webcrypto
and replaces it with js-sha256
. Want to try using it with your Parcel build and see if it works any better?
(I'll probably wind up merging this in anyway, as the latter library seems superior here.)
Confirmed working on my end (and feels faster, just maybe?). Check it out at https://github.com/shrugs/azid / https://azid.shrugs.now.sh
Sweet, I'll merge it in and push a release. And your project looks great!
When bundling within a Parcel/typescript project, the isomorphic-crypto import is actually under
crypto.default
, not the top-levelcrypto
import, so references to it return undefined. I expect this is because it treats the dependency as a modern es6 module rather than a commonjs require (or something like that, i don't really understand JS anyway).Anyway, importing the
urbit-key-generation/dist
is a fine stopgap for now.