![The bip39 library for Go](https://raw.githubusercontent.com/kelevis/go-bip39/master/assets/images/banner.png)
![Contributors](https://camo.githubusercontent.com/7edd6871470a17668a9d1db5d3b79c0d44ef73294f25318c203253fb00bf394f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f74796c65722d736d6974682f676f2d62697033392e7376673f636f6c6f723d626c7565)
![Coverage Status](https://camo.githubusercontent.com/bd336b81cd1e5b9e5e2a6c3ff25785c1733ed55dbc83075e0e8a53d0fa09e0c0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f74796c65722d736d6974682f676f2d62697033392f62616467652e7376673f6272616e63683d6d6173746572)
package main
import (
"fmt"
"github.com/tyler-smith/go-bip39"
"github.com/tyler-smith/go-bip32"
)
func main(){
// Generate a mnemonic for memorization or user-friendly seeds
entropy, _ := bip39.NewEntropy(256)
mnemonic, _ := bip39.NewMnemonic(entropy)
// Generate a Bip32 HD wallet for the mnemonic and a user supplied password
seed := bip39.NewSeed(mnemonic, "Secret Passphrase")
masterKey, _ := bip32.NewMasterKey(seed)
publicKey := masterKey.PublicKey()
// Display mnemonic and keys
fmt.Println("Mnemonic: ", mnemonic)
fmt.Println("Master private key: ", masterKey)
fmt.Println("Master public key: ", publicKey)
}