Commit Graph

5 Commits

Author SHA1 Message Date
Oliver Gugger
5904efe9ed
aezeed: export wordlist and properties
To make it possible to use the wordlist used for aezeed outside of the
aezeed package we export certain properties of the word list and the
word list itself.
2021-06-30 14:20:32 +02:00
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