mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
ce21098e98
* CW-488 minor code cleanup * Add Derivation Path selector for BTC and LTC * CW-488 Initial Passphrase Impl * CW-488 Final Passphrase Impl * Quick Fix of language Service * CW-488 Implement PR Suggestions * CW-488 Implement PR Suggestions * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * remove monero and wownero support for passphrase until merged [skip ci] * CW-488 Apply requested change * CW-488 Add Passphrase to QR * CW-488 Fix Seed generation * CW-488 Implement Electrum Passphrases * CW-488 Add Seed Length Selector to BIP39 Seeds * CW-488 Minor fix [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
12 lines
394 B
Dart
12 lines
394 B
Dart
import 'dart:typed_data';
|
|
|
|
import 'package:bip39/bip39.dart' as bip39;
|
|
|
|
class MnemonicBip39 {
|
|
/// Generate bip39 mnemonic
|
|
static String generate({int strength = 128}) => bip39.generateMnemonic(strength: strength);
|
|
|
|
/// Create root seed from mnemonic
|
|
static Uint8List toSeed(String mnemonic, {String? passphrase}) =>
|
|
bip39.mnemonicToSeed(mnemonic, passphrase: passphrase ?? '');
|
|
}
|