Hi,
At the moment there is no way to validate individual mnemonics before trying to recover the seed and decodeMnemonic is not available outside the module.
Therefore i am suggesting a public slip39.validateMnemonic(mnemonic: String, wordlist=DEFAULT_WORDLIST) => boolean function similar to the one available in bip39https://github.com/bitcoinjs/bip39/blob/master/src/index.js#L133. A common (and also my current use case for it) is the ability to validate user input before allowing them to enter the next share.
I could push a pull request to this repo if you like but due to the fact that your dart implementation is the primary one i think this new feature should land there too.
Hi, At the moment there is no way to validate individual mnemonics before trying to recover the seed and
decodeMnemonic
is not available outside the module.Therefore i am suggesting a public
slip39.validateMnemonic(mnemonic: String, wordlist=DEFAULT_WORDLIST) => boolean
function similar to the one available inbip39
https://github.com/bitcoinjs/bip39/blob/master/src/index.js#L133. A common (and also my current use case for it) is the ability to validate user input before allowing them to enter the next share.I could push a pull request to this repo if you like but due to the fact that your dart implementation is the primary one i think this new feature should land there too.