isValidMnemonic static method
Checks if a mnemonic is a valid Electrum V2 mnemonic of the specified type.
mnemonic The mnemonic to check.
mnemonicType (Optional) The Electrum V2 mnemonic type to check against.
Implementation
static bool isValidMnemonic(
Mnemonic mnemonic, [
ElectrumV2MnemonicTypes? mnemonicType,
]) {
if (_isBip39OrV1Mnemonic(mnemonic)) {
return false;
}
return (mnemonicType != null
? _isType(mnemonic, mnemonicType)
: _isAnyType(mnemonic));
}