0.0
No release in over 3 years
Low commit activity in last 3 years
This implementation conforms to BIP-39/BIP39 and PBKDF2 RFC 2898, and has been tested using the test vectors in https://github.com/trezor/python-mnemonic and Appendix B of RFC 3962. This is a fork of original bip_mnemonic with updates.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0
>= 0
 Project Readme

Build Status Gem Version

README

BipMnemonic is a ruby gem to generate BIP-39 compliant Mnemonic Words from specific entropy or random entropy of n bits and also to generate the BIP-32 seed from the BIP-39 Mnemonic.

Supported Languages:

USAGE

Specified Entropy in Hex

BipMnemonic.to_mnemonic(entropy: 'c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05')
BipMnemonic.to_mnemonic(entropy: 'c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05', language: 'english')

Entropy of n bits

BipMnemonic.to_mnemonic(bits: 128)
BipMnemonic.to_mnemonic(bits: 128, language: 'french')

Retrieving entropy from Mnemonic

BipMnemonic.to_entropy(mnemonic: 'scissors invite lock maple supreme raw rapid void congress muscle digital elegant little brisk hair mango congress clump')
BipMnemonic.to_entropy(mnemonic: 'satira lusinga mordere nastrare sposo responso replica varcato colza opinione distanza erario monetario bici india narice colza cilindro', language: 'italian')

Seed from Mnemonic Words

words = BipMnemonic.to_mnemonic(entropy: 'c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05')
BipMnemonic.to_seed(mnemonic: words)

LANGUAGE USAGE

Pass language: 'language' to methods to_mnemonic or to_entropy with supported values.

Supported Values:

  • english
  • japanese
  • korean
  • spanish
  • chinese_simplified
  • chinese_traditional
  • french
  • italian

TODO

  • Introduce tests for International Languages

CHANGELOG

Version 2.0.0

Original git repository is gone and seems this gem became abandoned. I think it's too risky to rely on crypto gems where author has gone. So I will keep maintaining it.

  • Didn't make any functional changes
  • Found git repo copy and verified that checksums match with original gem v0.0.4 from RubyGems
  • Updated dependencies
  • New file layout lib/bip_mnemonic2 (You don't need to change any code)
  • Updated gem's description and homepage to point to this repo
  • Removed Codecov test dependency (it's useless)
  • Added Bundler tasks to Rakefile so you can simply do rake install
  • Added test case for Korean mnemonic

Version 0.0.4

  • Added support for International Languages
  • Test compatibiltiy updated

Version 0.0.3

  • Major bug fix - Switched from pseudo_bytes to random_bytes

CREDITS