Documentation ¶
Index ¶
- Variables
- func ErrUnknownWord(reason string) error
- func NewEntropy(bitSize int) ([]byte, error)
- func NewSeed(mnemonic string, password string) []byte
- func NewSeedWithErrorChecking(mnemonic string, password string, wl WordList) ([]byte, error)
- func SetDefaultLangugage(wordList WordList)
- type Mnemonic
- type WordList
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidMnemonic is returned when trying to use a malformed mnemonic. ErrInvalidMnemonic = errors.New("Invalid mnenomic") // ErrEntropyLengthInvalid is returned when trying to use an entropy set with // an invalid size. ErrEntropyLengthInvalid = errors.New("Entropy length must be [128, 256] and a multiple of 32") // ErrValidatedSeedLengthMismatch is returned when a validated seed is not the // same size as the given seed. This should never happen is present only as a // sanity assertion. ErrValidatedSeedLengthMismatch = errors.New("Seed length does not match validated seed length") // ErrChecksumIncorrect is returned when entropy has the incorrect checksum. ErrChecksumIncorrect = errors.New("Checksum incorrect") )
View Source
var AllWordLists = map[string]WordList{ "english": English, "chinese_simplified": ChineseSimplified, "chinese_traditional": ChineseTraditional, "czech": Czech, "french": French, "italian": Italian, "japanese": Japanese, "korean": Korean, "portuguese": Portuguese, "spanish": Spanish, }
View Source
var ChineseSimplified = newList("chinese_simplified", worddata.AllLanguages["chinese_simplified"], "e3721bbf")
View Source
var ChineseTraditional = newList("chinese_traditional", worddata.AllLanguages["chinese_traditional"], "3c20b443")
View Source
var Czech = newList("czech", worddata.AllLanguages["czech"], "d1b5fda0")
View Source
var English = newList("english", worddata.AllLanguages["english"], "c1dbd296")
View Source
var French = newList("french", worddata.AllLanguages["french"], "3e56b216")
View Source
var Italian = newList("italian", worddata.AllLanguages["italian"], "2fc7d07e")
View Source
var Japanese = newList("japanese", worddata.AllLanguages["japanese"], "acc1419")
View Source
var Korean = newList("korean", worddata.AllLanguages["korean"], "4ef461eb")
View Source
var PadByteSlice = padByteSlice
View Source
var Portuguese = newList("portuguese", worddata.AllLanguages["portuguese"], "e627a546")
View Source
var Spanish = newList("spanish", worddata.AllLanguages["spanish"], "266e4f3d")
Functions ¶
func ErrUnknownWord ¶
func NewEntropy ¶
func NewSeed ¶
NewSeed creates a hashed seed output given a provided string and password. No checking is performed to validate that the string provided is a valid mnemonic.
func NewSeedWithErrorChecking ¶
NewSeedWithErrorChecking creates a hashed seed output given the mnemonic string, password, and word list An error is returned if the mnemonic is not convertible to a byte array.
Types ¶
type WordList ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.