input-output-hk / js-chain-libs

chain-libs javascript SDK
Apache License 2.0
18 stars 14 forks source link

Fix key generation functions #59

Open SebastienGllmt opened 5 years ago

SebastienGllmt commented 5 years ago

I noticed that both generate_ed25519 and generate_ed25519extended fail when called from Javascript with this error

self.crypto is undefined (permanently unavailable)
ecioppettini commented 5 years ago

Is this in node or in a browser? or perhaps in electron? I can't reproduce neither in firefox, chrome or node

SebastienGllmt commented 4 years ago

I tried looking into this and it seems to only happen to me for nodejs. The bug occurs in OsRng and I tried to update the package but it seems we're stuck on this version (because every version of rand_os is a breaking change by design and one of the dependencies curve25519-dalek doesn't support a higher version)