Versions in this module Expand all Collapse all v1 v1.0.0 Nov 19, 2024 Changes in this version + const BitlenDivisor + const GroupBitlen + const Iterations + const KeyLength + const LengthDivisor + const MaxBitlen + const MaxLength + const MinBitlen + const MinLength + const PasswordPrefix + var ErrInvalidEntropyBitlen = errors.New("entropy bitlen must be one of 128, 160, 192, 224 or 256") + var ErrInvalidMnemonicChecksum = errors.New("invalid mnemonic checksum") + var ErrInvalidMnemonicLength = errors.New("mnemonic length must be one of 12, 15, 18, 21 or 24") + func BitlenToBytelen(bitlen uint) uint + func BytelenToBitlen(bytelen uint) uint + func ExtractMnemonic(entropy Entropy, list words.List) ([]string, error) + func ExtractSeed(mnemonic []string, list words.List, password string) ([]byte, error) + func NormalizeMnemonic(mnemonic []string) []string + func PadLeftToBitlen(bytes []byte, bitlen uint) []byte + func RandomBytes(length uint) []byte + func SplitMnemonic(mnemonic string) []string + func ValidateMnemonic(mnemonic []string, list words.List) error + type ChecksumEntropy []byte + func (e ChecksumEntropy) Bitlen() uint + func (e ChecksumEntropy) EntropyBitlen() uint + func (e ChecksumEntropy) RemoveChecksum() (Entropy, []byte) + type Entropy []byte + func ExtractEntropy(mnemonic []string, list words.List) (Entropy, error) + func NewEntropy(bitlen uint) (Entropy, error) + func (e Entropy) AddChecksum() ChecksumEntropy + func (e Entropy) Bitlen() uint + func (e Entropy) IsValidChecksum(checksum []byte) bool