Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while using bip39.generateMnemonic(128) in react native #189

Open
rachna-khatnawlia opened this issue Mar 21, 2023 · 5 comments
Open

Comments

@rachna-khatnawlia
Copy link

enviromment doesn't have random bytes function while using bip39.generateMnemonic(128) in react native

@rachna-khatnawlia
Copy link
Author

solution for this issue:

npm install react-native-crypto
import { randomBytes } from 'react-native-crypto';

const entropy = randomBytes(16);
const mnemonic = bip39.entropyToMnemonic(entropy);

@Ekaanth
Copy link

Ekaanth commented May 7, 2023

@rachna-khatnawlia I'm getting this error
`
assert could not be found within the project or in these directories:
node_modules
1 | var unorm = require('unorm')

2 | var assert = require('assert')
`
did you get the same error ?

@lumsdnb
Copy link

lumsdnb commented Jul 24, 2023

@Ekaanth you might be missing assert library as a dependency

@Somnath-Chattaraj
Copy link

I am getting error while using bip39.generateMnemonic() in react. Below is the error image. Please help.
Screenshot 2024-08-17 at 10 20 28 PM

@dev4bitcoin
Copy link

I am getting error while using bip39.generateMnemonic() in react. Below is the error image. Please help. Screenshot 2024-08-17 at 10 20 28 PM

Did you find the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants