validate

suspend fun validate(mnemonic: String, language: MnemonicLanguage = MnemonicLanguage.ENGLISH): Boolean

Validates a BIP-39 mnemonic phrase.

Checks that all words are in the word list and the checksum is valid.

This function is suspend because JavaScript requires async initialization of the cryptographic library. On JVM and Native platforms, the suspend keyword has zero overhead.

Return

true if the mnemonic is valid, false otherwise

Parameters

mnemonic

Space-separated mnemonic phrase

language

Word list language (default: English)