mnemonic
Version, currently master branch1 version
- master branchlatestMar 13, 2024
github.com/Hamdy/mnemonic.cr
Mnemonic code for generating deterministic keys, BIP39 in Crystal lang
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
mnemonic:
github: Hamdy/mnemonic.cr
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.34.0- License
- MIT
- Author
- hamdy
Dependencies
Runtime Dependencies
- sodium*github: didactic-drunk/sodium.cr
README
mnemonic.cr
Reference implementation of BIP-0039: Mnemonic code for generating deterministic keys built python-mnemonic as a reference
Installation
-
Add the dependency to your
shard.yml:dependencies: mnemonic: github: crystaluniverse/mnemonic.cr -
Run
shards install
Usage
require "mnemonic"
en = Mnemonic::Mnemonic.new
# only get seed
seed = en.to_entropy "finger feel food anchor morning benefit stable gesture kiwi tortoise amount glide deputy cake party few canyon title effort gentle route tape gallery over"
# get Signing key from pass phrase directly
sk = en.get_signing_key "finger feel food anchor morning benefit stable gesture kiwi tortoise amount glide deputy cake party few canyon title effort gentle route tape gallery over"
# An example on using signing key to sign a message
id = 40
created = Time.utc.to_unix
expires = created + 1000
headers = %((created): #{created}\n)
headers += %((expires): #{expires}\n)
headers += %((key-id): #{id})
signature = Base64.strict_encode(String.new sk.sign_detached(headers))
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Mar 13, 2024
- Crystal
0.34.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Hamdy/mnemonic.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 17, 2026
- Synced
- Aug 17, 2026
- Versions
- 1