There are no reviews yet. Be the first to send feedback to the community and the maintainers!
Repository Details
The BIP39 library for Go.
Example
package main
import (
"fmt""github.com/tyler-smith/go-bip39""github.com/tyler-smith/go-bip32"
)
funcmain(){
// Generate a mnemonic for memorization or user-friendly seedsentropy, _:=bip39.NewEntropy(256)
mnemonic, _:=bip39.NewMnemonic(entropy)
// Generate a Bip32 HD wallet for the mnemonic and a user supplied passwordseed:=bip39.NewSeed(mnemonic, "Secret Passphrase")
masterKey, _:=bip32.NewMasterKey(seed)
publicKey:=masterKey.PublicKey()
// Display mnemonic and keysfmt.Println("Mnemonic: ", mnemonic)
fmt.Println("Master private key: ", masterKey)
fmt.Println("Master public key: ", publicKey)
}