Commit Graph

4 Commits

Author SHA1 Message Date
positiveblue
5089cfc1be aezeed: fix mnemonic word validation
A user complained about getting a misleading error after a typo in the
mnemonic. The word was `hear` and it passed the check even when it is
not in the list of valid words.

The reason is that we where checking if the word is in the variable
`englishWordList` (which includes all the words) instead of checking if the
variable is in the `defaultWordList` (which is basically `englishWoldList`
split by spaces). That means that `hear` passed the check because `heart`
appears in the list.

Related issue [4733](https://github.com/lightningnetwork/lnd/issues/4733)
2020-11-02 23:25:50 +01:00
Olaoluwa Osuntokun
d5122b7f04
aezeed: publicly export the word field in ErrUnknownMnenomicWord
In this commit, we publicly export the `word` field as it makes it
easier to programmatically interact with the package when attempting to
re-derive proper `cipherseed` instances. We also add a new `Index` field
as well to provide additional context for programmatic manipulating of
seeds.
2019-07-16 19:31:35 -07:00
Conner Fromknecht
c824af11a1
aezeed: expose BirthdayTime conversion from offset 2018-04-26 16:03:05 -07:00
Oliver Gugger
0c7451c97c aezeed: add test vectors and test birthday calculation 2018-04-04 15:38:37 +02:00