loadWordsList method
Loads the words list for a given language and verifies its length.
This method is used to load a words list for the specified language and
ensures that the loaded list contains the expected number of words.
Subclasses may use this method when implementing getByLanguage
.
Implementation
MnemonicWordsList loadWordsList(MnemonicLanguages language, int wordsNum) {
if (language.wordList.length != wordsNum) {
throw ArgumentException(
"Number of loaded words list (${language.wordList.length}) is not valid");
}
return MnemonicWordsList(language.wordList);
}