Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let currentFile = 0;
  2. let filePath = `./bip39-${timestamp}-${currentFile}.txt`;
  3.  
  4. entropy.on('nextFile', function () {
  5.     writeStream.end();
  6.  
  7.     ++currentFile;
  8.     filePath = `./bip39-${timestamp}-${currentFile}.txt`;;
  9.     writeStream = fs.createWriteStream(filePath);
  10. });
  11.  
  12. let writeStream = fs.createWriteStream(filePath);
  13.  
  14. while (true) {
  15.     const mnemonic = bip39.entropyToMnemonic(entropy.next()) + '\r\n';
  16.     writeStream.write(mnemonic);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement