Function wildland_corex::utils::new_mnemonic_from_phrase
source · pub fn new_mnemonic_from_phrase(phrase: &str) -> Result<Mnemonic, CryptoError>
Expand description
Derivate mnemonic from a given phrase. the phrase must be a valid english phrase.
Errors
If the phrase is not a valid english phrase, a
CryptoError::MnemonicGeneratioError
is returned.
Examples
use wildland_crypto::utils;
let mnemonic = utils::new_mnemonic_from_phrase("abandon abandon abandon abandon abandon abandon
abandon abandon abandon abandon abandon about").unwrap();