isValid method

bool isValid(
  1. String mnemonic
)

Checks if a given mnemonic phrase is valid.

Returns true if the mnemonic is valid, false otherwise.

Implementation

bool isValid(String mnemonic) {
  try {
    validate(mnemonic);
    return true;
  } catch (e) {
    return false;
  }
}