bip39 icon indicating copy to clipboard operation
bip39 copied to clipboard

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

Open rachna-khatnawlia opened this issue 2 years ago • 6 comments

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

rachna-khatnawlia avatar Mar 21 '23 12:03 rachna-khatnawlia

solution for this issue:

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

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

rachna-khatnawlia avatar Mar 21 '23 13:03 rachna-khatnawlia

@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 ?

Ekaanth avatar May 07 '23 10:05 Ekaanth

@Ekaanth you might be missing assert library as a dependency

lumsdnb avatar Jul 24 '23 13:07 lumsdnb

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

Somnath-Chattaraj avatar Aug 17 '24 16:08 Somnath-Chattaraj