lib bip39.cr v0.1.0
initial release of lib bip39.cr - a native library implementing bip-0039 mnemonics purely for the crystal language.
installation
add the bip39
library to your shard.yml
dependencies:
bip39:
github: q9f/bip39.cr
version: "~> 0.1"
usage
# import bip39
require "bip39"
you can generate and recover mnemonics fully adhering to the bip-0039 specification.
m = Bip0039::Mnemonic.new
# => <Bip0039::Mnemonic:0x7f51769bcd20 @ent=128, @seed=183297182565288719506055787609377395053>
m.to_words
# => ["measure", "come", "cube", "ostrich", "wide", "inspire", "hello", "essay", "ready", "cute", "reform", "sustain"]
m.to_hex
# => "89e5c0d5ce7faaea9ab269b2c6d6d16d"
What's Changed
- bip39: add english dictionary by @q9f in #1
- src: add bip0039 module for mnemonics by @q9f in #2
- src: add bip0039 test vectors by @q9f in #3
- ci: add codecov by @q9f in #4
- docs: add html documenation by @q9f in #5
New Contributors
Full Changelog: https://github.com/q9f/bip39.cr/commits/v0.1.0