1.1.0 • Published 3 years ago

tetsy-wordlist v1.1.0

Weekly downloads
6
License
GPL-3.0
Repository
github
Last release
3 years ago

Tetsy-Wordlist

Tetsy Brain Wallets wordlist library

Rust Documentation

RUST

# Cargo.toml

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

extern crate tetsy_wordlist;

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

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

JavaScript

$ npm i tetsy-wordlist --save
// main.js

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