laconicd/utils/mnemonic.go
Sai Kumar e90b21bc8e migrate: add dxns module
1. add bond,auction, nameserivce module
2. update to v0.12.2 ethermint version
3. fix the test cases
4. add gql server
2022-04-05 12:39:27 +05:30

26 lines
383 B
Go

//
// Copyright 2020 Wireline, Inc.
//
package utils
import "github.com/cosmos/go-bip39"
const (
mnemonicEntropySize = 256
)
func GenerateMnemonic() (string, error) {
entropySeed, err := bip39.NewEntropy(mnemonicEntropySize)
if err != nil {
return "", err
}
mnemonic, err := bip39.NewMnemonic(entropySeed[:])
if err != nil {
return "", err
}
return mnemonic, nil
}