Hey guys I'm working on a vanity address generator using the Stellar JS SDK inside web workers to relief the main thread from heavy computations. However, it is giving me an error 'no PRNG' regarding random number generation only in Safari 10. It is working perfectly in Chrome, Firefox, and Opera.

Any workaround is highly appreciated.

Here is the test code:

// Web worker

var keypair = StellarSdk.Keypair.random();
var address = keypair.publicKey();
var secret  = keypair.secret();
var account = {publicKey:address, secretKey:secret};

1 Answer 1


I think the issue is with the limitations of web workers in Safari. I already commented your issue in GitHub.

  • I saw your comment but that doesn't solve my issue, I need a workaround. What's the specific problem with random number generators in workers and what can be done to offer a bypass or add a better library if that's the case?
    – Kuyawa
    Jan 18, 2018 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.