Closed bomzj closed 1 year ago
Try 'tiny-secp256k1-asmjs' package for browser environments.
@junderw thank you for pointing out!
Just wondering should one use 'tiny-secp256k1-asmjs' for just one thing to generate bitcoin private key only? Is it an overkill for that purpose?
My assumption is that I can use window.crypto.getRandomValues
instead
const privateKeyBytes = new Uint8Array(32)
window.crypto.getRandomValues(privateKeyBytes)
But I'm not sure how reliable it is.
What would you suggest in this case?
The following line causes crash in browser environment, but works in Node.
Note: tiny-secp256k1 version is 2.2.3.