@@ -6,43 +6,43 @@ import (
6
6
)
7
7
8
8
var (
9
- // ErrDeriveHardFromPublic describes an error in which the caller
10
- // attempted to derive a hardened extended key from a public key.
11
- ErrDeriveHardFromPublic = errors .New ("cannot derive a hardened key " +
12
- "from a public key" )
9
+ // ErrBadChecksum describes an error in which the checksum encoded with
10
+ // a serialized extended key does not match the calculated value.
11
+ ErrBadChecksum = errors .New ("bad extended key checksum" )
13
12
14
13
// ErrDeriveBeyondMaxDepth describes an error in which the caller
15
- // has attempted to derive more than 255 keys from a root key.
14
+ // has attempted to derive a key chain longer than 255 from a root key.
16
15
ErrDeriveBeyondMaxDepth = errors .New ("cannot derive a key with more than " +
16
+
17
17
"255 indices in its path" )
18
+ // ErrDeriveHardFromPublic describes an error in which the caller
19
+ // attempted to derive a hardened extended key from a public key.
20
+ ErrDeriveHardFromPublic = errors .New ("cannot derive a hardened key " +
21
+ "from a public key" )
18
22
19
23
// ErrInvalidChild describes an error in which the child at a specific
20
24
// index is invalid due to the derived key falling outside of the valid
21
- // range for secp256k1 private keys. This error indicates the caller
25
+ // range for secp256k1 private keys. This error indicates the caller
22
26
// should simply ignore the invalid child extended key at this index and
23
27
// increment to the next index.
24
28
ErrInvalidChild = errors .New ("the extended key at this index is invalid" )
25
29
26
- // ErrUnusableSeed describes an error in which the provided seed is not
27
- // usable due to the derived key falling outside of the valid range for
28
- // secp256k1 private keys. This error indicates the caller must choose
29
- // another seed.
30
- ErrUnusableSeed = errors .New ("unusable seed" )
30
+ // ErrInvalidKeyLen describes an error in which the provided serialized
31
+ // key isn't of the expected length.
32
+ ErrInvalidKeyLen = errors .New ("the provided serialized extended key " +
33
+ "length is invalid" )
31
34
32
35
// ErrInvalidSeedLen describes an error in which the provided seed or
33
36
// seed length is not in the allowed range.
34
37
ErrInvalidSeedLen = fmt .Errorf ("seed length must be between %d and %d " +
35
38
"bits" , MinSeedBytes * 8 , MaxSeedBytes * 8 )
36
39
37
- // ErrBadChecksum describes an error in which the checksum encoded with
38
- // a serialized extended key does not match the calculated value.
39
- ErrBadChecksum = errors .New ("bad extended key checksum" )
40
-
41
- // ErrInvalidKeyLen describes an error in which the provided serialized
42
- // key is not the expected length.
43
- ErrInvalidKeyLen = errors .New ("the provided serialized extended key " +
44
- "length is invalid" )
45
-
46
40
// ErrNoEnoughEntropy signals more entropy is needed
47
41
ErrNoEnoughEntropy = errors .New ("more entropy is needed" )
42
+
43
+ // ErrUnusableSeed describes an error in which the provided seed is not
44
+ // usable due to the derived key falling outside of the valid range for
45
+ // secp256k1 private keys. This error indicates the caller must choose
46
+ // another seed.
47
+ ErrUnusableSeed = errors .New ("unusable seed" )
48
48
)
0 commit comments