A golang implementation of the BIP0039 spec for mnemonic seeds
package main
import (
"github.com/dv-net/go-bip39"
"fmt"
)
func main(){
entropy, err := bip39.NewEntropy(256) //nolint:mnd
if err != nil {
return nil, fmt.Errorf("generate entropy: %w", err)
}
mnemonic, err := bip39.NewMnemonic(entropy)
if err != nil {
return nil, fmt.Errorf("generate mnemonic: %w", err)
}
// Display mnemonic and keys
fmt.Println("Mnemonic: ", mnemonic)
}