e90b21bc8e
1. add bond,auction, nameserivce module 2. update to v0.12.2 ethermint version 3. fix the test cases 4. add gql server
26 lines
383 B
Go
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
|
|
}
|