generateMnemonic function

String generateMnemonic({
  1. int strength = 128,
  2. RandomBytes randomBytes = _randomBytes,
  3. String language = _defaultLanguage,
})

Implementation

String generateMnemonic({
  int strength = 128,
  RandomBytes randomBytes = _randomBytes,
  String language=_defaultLanguage
}) {
  assert(strength % 32 == 0);
  final entropy = randomBytes(strength ~/ 8);
  return entropyToMnemonic(HEX.encode(entropy),language: language);
}