stacks.js
stacks.js copied to clipboard
React Native: Environment does not have randomBytes function
What version of Stacks.js are you using?
@stacks/wallet-sdk v 6.13.1
Describe the bug
Been getting Environment does not have randomBytes function. Tried on expo as well as react native projects Did all pollyfills required for Buffer, TextEncoder, Crypto etc Tried modifying the metro config file Tried rn-nodeify and imported the shim file generated Nothing seems to solve the issue
How to reproduce
- Create a new react native project
- Install @stacks/wallet-sdk
- Call generateSecretKey()
Thanks for the report. I will create a React-Native example / guide tomorrow to find out what's missing 🙏
Hi -- I added a Guide to our docs 🙏