is_valid_bip39_word

Function is_valid_bip39_word 

Source
pub fn is_valid_bip39_word(word: &str, language: Option<Language>) -> bool
Expand description

Checks if a word is a valid BIP39 word for the specified language.

§Arguments

  • word - The word to check
  • language - Optional language (default: English)

§Returns

  • bool - true if the word is valid, false otherwise

§Example

use bitcoin_address_generator::is_valid_bip39_word;

assert!(is_valid_bip39_word("abandon", None));
assert!(!is_valid_bip39_word("notaword", None));