Closed Giszmo closed 8 years ago
Please take a look at this: https://github.com/bitpay/bitcore/issues/1168
Hope it solves the problem. Report if it doesn't
I wonder if there is a way that browserify or other can build for use in a web worker.
Thank you very much @maraoz ! Your link worked :)
I still wonder if it would not be possible to depend less on those environment things in this crypto library.
This should be fixed with: https://github.com/bitpay/bitcore/pull/1322
Mnemonic.prototype.toHDPrivateKey()
takes 20s on my Anroid and thus I'd like to create it "in the background".Putting it in a
new Worker()
yieldsUncaught Error: Uncaught ReferenceError: window is not defined
. Apparently this stems from bitcore:if ((inBrowser && window._bitcore) || (!inBrowser && global._bitcore)) {
.I browserified Mnemonic and try to include it like this:
importScripts(e.data.url + '/lib/bundle2.browser.js') // in this line above error is thrown
(I would prefer to have bitcore to offer a promise-based way to do expensive stuff like this ;) )