505ad2ab70
* Migrating auctions module from DXNS * Adding appropriate comments on proto definitions * Addressing review comments and fixing build issues * Addressing review comments * Adding README for auction module and fixing build/run issues * Removing DXNS references and migrating DXNS utils to Ethermint * Setting default genesis param values * Defining constants in params and assigning ParamSetPairs * Fixing issues with auction bid reveals Co-authored-by: bipulprasad <Bipul@qubecinema.com>
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
|
|
}
|