forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.go
36 lines (29 loc) · 1.24 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package aezeed
import "fmt"
var (
// ErrIncorrectVersion is returned if a seed bares a mismatched
// external version to that of the package executing the aezeed scheme.
ErrIncorrectVersion = fmt.Errorf("wrong seed version")
// ErrInvalidPass is returned if the user enters an invalid passphrase
// for a particular enciphered mnemonic.
ErrInvalidPass = fmt.Errorf("invalid passphrase")
// ErrIncorrectMnemonic is returned if we detect that the checksum of
// the specified mnemonic doesn't match. This indicates the user input
// the wrong mnemonic.
ErrIncorrectMnemonic = fmt.Errorf("mnemonic phrase checksum doesn't " +
"match")
)
// ErrUnknownMnemonicWord is returned when attempting to decipher and
// enciphered mnemonic, but a word encountered isn't a member of our word list.
type ErrUnknownMnemonicWord struct {
// Word is the unknown word in the mnemonic phrase.
Word string
// Index is the index (starting from zero) within the slice of strings
// that makes up the mnemonic that points to the incorrect word.
Index uint8
}
// Error returns a human-readable string describing the error.
func (e ErrUnknownMnemonicWord) Error() string {
return fmt.Sprintf("word %v isn't a part of default word list "+
"(index=%v)", e.Word, e.Index)
}