Skip to content
💰 Elixir implementation of BIP39 Mnemonics
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Update elixir.yml Feb 21, 2020
config Clean up bloat Jan 26, 2020
lib Add option for hex-encoded entropy Jan 29, 2020
test Test seed/1 clause Feb 20, 2020
.formatter.exs Initial commit Jan 25, 2020
.gitignore Initial commit Jan 25, 2020
LICENSE Add license Jan 26, 2020 Fixup Jan 29, 2020
mix.exs Add Credo Feb 20, 2020
mix.lock Add Credo Feb 20, 2020


Elixir implementation of BIP39.

(...) implementation of a mnemonic code or mnemonic sentence -- a group of easy to remember words -- for the generation of deterministic wallets.

mnemo library exposes the following interfaces:

  • Generate random English mnemonic
  • Generate English mnemonic for pre-existing binary entropy
  • Convert English mnemonic back to its binary entropy
  • Derive a PBKDF2 hex-encoded seed from any mnemonic

The library is tested against reference vectors from Trezor's implementation. Additionally, a simple property test guarantees mnemonic <-> entropy <-> mnemonic correctness.


iex(1)> Mnemo.generate
"seminar depart parent awake canal relief age emotion swap area always near voyage exist idea aunt around burst uphold web tumble mimic reopen note"
iex(1)> mnemonic = "insect miracle play mad cream upgrade engage march absorb pyramid december observe jazz senior
 betray family valve peasant cargo marriage table laundry melody morning"
iex(2)> Mnemo.entropy(mnemonic, hex: true)
iex(1)> Mnemo.mnemonic :crypto.strong_rand_bytes(16)
"emotion enroll aspect taxi nerve warrior become lens cactus stand stage pretty"
iex(1)> Mnemo.generate |> Mnemo.seed


The package can be installed by adding mnemo to your list of dependencies in mix.exs:

def deps do
    {:mnemo, "~> 0.1.0"}


Documentation can be generated locally with ExDoc.

The docs can be found at

You can’t perform that action at this time.