bip39local

package
v0.0.0-...-da2935b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Last11BitsMask          = big.NewInt(2047)
	RightShift11BitsDivider = big.NewInt(2048)
	BigOne                  = big.NewInt(1)
	BigTwo                  = big.NewInt(2)
)
View Source
var EnglishWordList = strings.Split(strings.TrimSpace(englishWordList), "\n")

Language-specific wordlists

View Source
var WordList = EnglishWordList

The wordlist to use

Functions

func IsMnemonicValid

func IsMnemonicValid(mnemonic string) bool

IsMnemonicValid attempts to verify that the provided mnemonic is valid. Validity is determined by both the number of words being appropriate, and that all the words in the mnemonic are present in the word list.

func NewEntropy

func NewEntropy(bitSize int) ([]byte, error)

NewEntropy will create random entropy bytes so long as the requested size bitSize is an appropriate size.

func NewMnemonic

func NewMnemonic(entropy []byte) (string, error)

NewMnemonic will return a string consisting of the mnemonic words for the given entropy. If the provide entropy is invalid, an error will be returned.

func NewSeed

func NewSeed(mnemonic string, password string) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL