@@ -2,14 +2,29 @@ package envelope
22
33import "github.com/pkg/errors"
44
5- var (
6- ErrNoGrants = errors .New ("envelope has no grants" )
7- ErrNoKeypairs = errors .New ("envelope has no keypairs" )
8- ErrInvalidThreshold = errors .New ("invalid threshold configuration" )
9- ErrContextMismatch = errors .New ("envelope context does not match expected context" )
10- ErrInsufficientShares = errors .New ("insufficient shares to unlock envelope" )
11- ErrInvalidShareData = errors .New ("invalid share data" )
12- ErrInvalidKeypairIndex = errors .New ("keypair index out of range" )
13- ErrEmptyPayload = errors .New ("payload is empty" )
14- ErrDecryptionFailed = errors .New ("envelope decryption failed" )
15- )
5+ // ErrNoGrants is returned when the envelope has no grants.
6+ var ErrNoGrants = errors .New ("envelope has no grants" )
7+
8+ // ErrNoKeypairs is returned when the envelope has no keypairs.
9+ var ErrNoKeypairs = errors .New ("envelope has no keypairs" )
10+
11+ // ErrInvalidThreshold is returned when the threshold configuration is invalid.
12+ var ErrInvalidThreshold = errors .New ("invalid threshold configuration" )
13+
14+ // ErrContextMismatch is returned when the envelope context does not match the expected context.
15+ var ErrContextMismatch = errors .New ("envelope context does not match expected context" )
16+
17+ // ErrInsufficientShares is returned when there are not enough shares to unlock the envelope.
18+ var ErrInsufficientShares = errors .New ("insufficient shares to unlock envelope" )
19+
20+ // ErrInvalidShareData is returned when share data is malformed or invalid.
21+ var ErrInvalidShareData = errors .New ("invalid share data" )
22+
23+ // ErrInvalidKeypairIndex is returned when a keypair index is out of range.
24+ var ErrInvalidKeypairIndex = errors .New ("keypair index out of range" )
25+
26+ // ErrEmptyPayload is returned when the payload is empty.
27+ var ErrEmptyPayload = errors .New ("payload is empty" )
28+
29+ // ErrDecryptionFailed is returned when envelope decryption fails.
30+ var ErrDecryptionFailed = errors .New ("envelope decryption failed" )
0 commit comments