/wordlist

Parity Brain Wallets Word List Library

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Wordlist

Parity Brain Wallets wordlist library

Rust Documentation

RUST

# Cargo.toml

[dependencies]
parity-wordlist = "1.2"
# main.rs

extern crate parity_wordlist;

fn main() {
  println!("Words: {}", parity_wordlist::random_phrase(12));

  let phrase = "violin oblivion cylinder list disarray wobbly fastball showplace oasis patronize septic spearhead";
  println!("Valid: {:?}", parity_wordlist::validate_phrase(phrase, 12));
}

JavaScript

$ npm i @parity/wordlist --save
// main.js

import { randomPhrase, verifyPhrase } from '@parity/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)