Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

OCaml implementation of mnemonic code for generating deterministic keys (i.e. BIP-0039)

License

Notifications You must be signed in to change notification settings

booklearner/mnemonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mnemonic

mnemonic is an OCaml implementation of mnemonic code for generating deterministic keys in other words, it is an implementation of BIP-0039 (Bitcoin Improvement Proposal) which introduces a mechanism to generate mnemonics (group of words) and convert them into a binary seed.

See also the reference implementation written in Python.

Development

For a quick introduction to OCaml, browse the official documentation. For a deeper understanding, check out Real World OCaml.

Install opam, then follow instructions below to install dependencies, build the project, and run it.

; opam install .
; dune build

Usage

mnemonic can be used as a standalone CLI tool to generate keys

; dune build @install
; mnemonic --help
mnemonic [options]
  -l  Specify the length of the mnemonic phrase (default is 24).
  -o  Specify the file to write the output to (default is stdout).
  --version  Display the version of the currently installed mnemonic.
  -help  Display this list of options
  --help  Display this list of options

To use as a library in another codebase, install mnemonic from opam.

; opam install mnemonic

dune:

(library
  (name <your library name>)
  (libraries mnemonic))

<program>.ml

open Mnemonic

(* TODO: add usage examples *)

TODO

  • finalize the exposed interface functions in a .mli file
  • test against reference implementation test suite
  • publish mnemonic to opam

License

BSD-3-Clause

About

OCaml implementation of mnemonic code for generating deterministic keys (i.e. BIP-0039)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages