Skip to content

Instantly share code, notes, and snippets.

@liamsi
Created May 21, 2018 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liamsi/a4848b6b79e61719e383d1f6bd567b30 to your computer and use it in GitHub Desktop.
Save liamsi/a4848b6b79e61719e383d1f6bd567b30 to your computer and use it in GitHub Desktop.
package main
import (
"encoding/hex"
"fmt"
tyler "github.com/tyler-smith/go-bip39"
bartekn "github.com/bartekn/go-bip39"
)
func main() {
entropy,_ := hex.DecodeString("74D90614B3AC1AE18A297F532163A756858769208DF0DA9841A3DF6735681A85")
mne, err := tyler.NewMnemonic(entropy)
fmt.Println(mne)
fmt.Println(err)
b, err := tyler.MnemonicToByteArray(mne)
fmt.Printf("%X \n", b)
fmt.Println(err)
b, err = bartekn.MnemonicToByteArray(mne)
fmt.Printf("%X \n", b)
fmt.Println(err)
}
@liamsi
Copy link
Author

liamsi commented May 21, 2018

Here tyler's lib creates a completely different entropy :-/

inquiry sight lunch guard script ignore chunk copper farm arch truth public flash region lion safe surround search happy salute infant reduce head pilot
<nil>
0074D90614B3AC1AE18A297F532163A756858769208DF0DA9841A3DF6735681A8527 
<nil>
74D90614B3AC1AE18A297F532163A756858769208DF0DA9841A3DF6735681A85 
<nil>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment