Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created April 29, 2018 05:23
Show Gist options
  • Save KamilLelonek/38582d24477b7433a5e6ca6d6839ba9d to your computer and use it in GitHub Desktop.
Save KamilLelonek/38582d24477b7433a5e6ca6d6839ba9d to your computer and use it in GitHub Desktop.
decoded_seed = Base.decode16!(seed, case: :lower)
hashed_seed = :crypto.hmac(:sha512, "Bitcoin seed", decoded_seed)
<<private_key::binary-32, chain_code::binary-32>> = hashed_seed
{private_key, chain_code}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment