Uncaught TypeError on browserified telehash.generate()
iaaaan opened this issue · 2 comments
Hi,
I've been trying to get telehash-js to work in the browser without success.
After browserifying the source and running the example, I get the following error on telehash.generate():
TypeError: sodium.crypto_box_keypair is not a function
in bundle.js:32074
Of course I don't have any problem running this in node. This might be me missing something, but I've been stuck for a few days so I figured I might ask.
Thank you for your great work! it's very exciting stuff.
Hmm, that shouldn't be getting included at all in the browserify build (yet), this is a just a temporary test workaround but could you see if this works, putting this before the generate?
require('e3x').cs['3a'].generate = false;
The browser/browserify build is still pretty young, I'm really rusty on the browser side of things so all/any suggestions very welcomed :)
It fixed it! :)
I am still playing around at this stage but later on if I can be helpful regarding the browser side of things I will definitely let you know.
Thanks a lot!