Wordlist
Susy Brain Wallets wordlist library
RUST
# Cargo.toml
[dependencies]
rs-wordlist = "1.2"
# main.rs
extern crate rs_wordlist;
fn main() {
println!("Words: {}", rs_wordlist::random_phrase(12));
let phrase = "violin oblivion cylinder list disarray wobbly fastball showplace oasis patronize septic spearhead";
println!("Valid: {:?}", rs_wordlist::validate_phrase(phrase, 12));
}
JavaScript
$ npm i @s/wordlist --save
// main.js
import { randomPhrase, verifyPhrase } from '@s/wordlist'
console.log(randomPhrase(12))
// This will throw if the phrase is not valid:
verifyPhrase("violin oblivion cylinder list disarray wobbly fastball showplace oasis patronize septic spearhead", 12)