findLanguage method

Tuple<MnemonicWordsList, MnemonicLanguages> findLanguage(
  1. Mnemonic mnemonic
)

Finds the language and word list for a given mnemonic phrase.

If a language is specified, it is used. Otherwise, the wordsListFinder is used to determine the appropriate language and word list for decoding.

Implementation

Tuple<MnemonicWordsList, MnemonicLanguages> findLanguage(Mnemonic mnemonic) {
  if (language == null || wordsList == null) {
    return wordsListFinder.findLanguage(mnemonic);
  }
  return Tuple(wordsList!, language!);
}