Documentation ¶
Index ¶
- func AddChecksum(entropy []byte) ([]byte, error)
- func GenEntropy(bitSize int) ([]byte, error)
- func GetEntropyFromMnemonic(mnemonic []string) ([]byte, error)
- func GetMnemonicFromEntropy(entropy []byte) ([]string, error)
- func GetSeedFromMnemonic(mnemonic []string, passphrase string) ([]byte, error)
- func SetWordList(newList []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChecksum ¶
AddChecksum takes an entropy byte slice and adds the first bit of its SHA-256 hash. This is meant to be called by the user only when manual addition of the checksum is needed (e.g. custom entropy generator).
func GenEntropy ¶
GenEntropy returns a new randomly generated byte slice with bitSize bits (must be between 128-256 and be a multiple of 32) plus the checksum bits
func GetEntropyFromMnemonic ¶
GetEntropyFromMnemonic takes a mnemonic string slice and returns the corresponding entropy byte slice
func GetMnemonicFromEntropy ¶
GetMnemonicFromEntropy takes the entropy byte slice and returns the corresponding mnemonic as a string slice
func GetSeedFromMnemonic ¶
GetSeedFromMnemonic takes a mnemonic string slice and a passphrase string and returns the 521-bit seed byte slice
func SetWordList ¶ added in v1.1.0
func SetWordList(newList []string)
SetWordList sets any given string slice as the word list for the mnemonic
Types ¶
This section is empty.