Skip to content

Commit

Permalink
Updating docs. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored Sep 28, 2017
1 parent ca22d31 commit 4404e3a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Parity Brain Wallets wordlist library


[Rust Documentation](https://docs.rs/parity-wordlist/1.1.0/parity_wordlist/)


# RUST

```toml
Expand All @@ -17,7 +20,10 @@ parity-wordlist = "1.2"
extern crate parity_wordlist;

fn main() {
println!("Words: {}", parity_wordlist::random_phrase(12))
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));
}
```

Expand All @@ -33,8 +39,11 @@ $ npm i @parity/wordlist --save
```js
// main.js

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

0 comments on commit 4404e3a

Please sign in to comment.