use crate::SingleListIndexingWordlist;
use lazy_static::lazy_static;
pub const BIP39_WORDLIST: [&'static str; 2048] =
include!("../../static/wordlists/bip39/converted/wordlist.json");
lazy_static! {
pub static ref BIP39: SingleListIndexingWordlist = {
let boxed = Box::new(BIP39_WORDLIST);
SingleListIndexingWordlist::new(
"S/KEY OTP Wordlist".to_string(),
boxed
)
};
}
#[cfg(test)]
mod test {
use super::{BIP39, BIP39_WORDLIST};
use crate::bits::pack_indexes;
use crate::{Result, Wordlist, WordlistByteConverter};
use bitvec::prelude::*;
#[test]
fn validate_list_complete() {
assert_eq!(2048, BIP39_WORDLIST.len());
BIP39_WORDLIST.iter().for_each(|v| assert!(!v.is_empty()));
}
#[test]
fn validate_bit_width() {
assert_eq!(11, BIP39.index_bit_width().unwrap());
}
}