func getWordIndex(word string) (int, bool) {
	idx, ok := wordMap[word]
	return idx, ok
}
getWordIndex gets word index in wordMap.
package bip39
import (
	"crypto/rand"
	"crypto/sha256"
	"crypto/sha512"
	"encoding/binary"
	"errors"
	"fmt"
	"math/big"
	"strings"
	"github.com/dabankio/wallet-core/bip39/wordlists"
	"golang.org/x/crypto/pbkdf2"
)
var (
	last11BitsMask  = big.NewInt(2047)
	shift11BitsMask = big.NewInt(2048)
	bigOne          = big.NewInt(1)
	bigTwo          = big.NewInt(2)
	wordLengthChecksumMasksMapping = map[int]*big.Int{
		12: big.NewInt(15),
		15: big.NewInt(31),
		18: big.NewInt(63),
		21: big.NewInt(127),
		24: big.NewInt(255),
	}
	wordLengthChecksumShiftMapping = map[int]*big.Int{
		12: big.NewInt(16),
		15: big.NewInt(8),
		18: big.NewInt(4),
		21: big.NewInt(2),
	}
	wordList []string
	wordMap map[string]int
)
var (
	ErrInvalidMnemonic = errors.New("invalid mnenomic")
	ErrEntropyLengthInvalid = errors.New("entropy length must be [128, 256] and a multiple of 32")
	ErrValidatedSeedLengthMismatch = errors.New("seed length does not match validated seed length")
	ErrChecksumIncorrect = errors.New("checksum incorrect")
)
func init() {
	SetWordList(wordlists.English)
}
func SetWordList(list []string) {
	wordList = list
	wordMap = map[string]int{}
	for i, v := range wordList {
		wordMap[v] = i
	}
}
func GetWordList() []string {
	return wordList
}