bip39ProcessRecoverySecret

fun bip39ProcessRecoverySecret(recoverySecret: String, mustBeValid: Boolean = true): String

Given a string, this cleans up extra whitespace, changes to lowercase, and returns the words as a string. if mustBeValid is true, this function checks that there are 12 words (longer recovery secrets are not supported), that each word is in the bip39 word list, and that those words form a valid checksum.

Parameters

recoverySecret

the secret

mustBeValid

if true IllegalArgumentException is the recoverySecret does not pass basic checks