-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.go
37 lines (35 loc) · 2.58 KB
/
error.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
37
package bundlr
import "errors"
var (
ErrSignerNotSpecified = errors.New("signer not specified")
ErrUnmarshalEthereumPubKey = errors.New("cannot unmarshal ethereum pubkey")
ErrEthereumSignatureMismatch = errors.New("ethereum signature mismatch")
ErrFailedToParse = errors.New("failed to parse response")
ErrIdEmpty = errors.New("bundle id is empty")
ErrNotEnoughBytesForSignatureType = errors.New("not enough bytes for the signature type")
ErrNotEnoughBytesForSignature = errors.New("not enough bytes for the signature")
ErrNotEnoughBytesForOwner = errors.New("not enough bytes for the owner")
ErrNotEnoughBytesForTargetFlag = errors.New("not enough bytes for the target flag")
ErrNotEnoughBytesForTarget = errors.New("not enough bytes for the target")
ErrNotEnoughBytesForAnchorFlag = errors.New("not enough bytes for the anchor flag")
ErrNotEnoughBytesForAnchor = errors.New("not enough bytes for the anchor")
ErrNotEnoughBytesForNumberOfTags = errors.New("not enough bytes for the number of tags")
ErrNotEnoughBytesForNumberOfTagBytes = errors.New("not enough bytes for the number of tag bytes")
ErrNotEnoughBytesForTags = errors.New("not enough bytes for tags")
ErrVerifyIdSignatureMismatch = errors.New("id doesn't match signature")
ErrVerifyBadAnchorLength = errors.New("anchor must be 32 bytes long")
ErrVerifyTooManyTags = errors.New("too many tags, max is 128")
ErrVerifyEmptyTagName = errors.New("tag name is empty")
ErrVerifyTooLongTagName = errors.New("tag name is too long, max is 1024 bytes")
ErrVerifyEmptyTagValue = errors.New("tag value is empty")
ErrVerifyTooLongTagValue = errors.New("tag value is too long, max is 3072 bytes")
ErrVerifyTooManyTagsBytes = errors.New("serialized tags are too long, max is 4KB")
ErrBufferTooSmall = errors.New("buffer too small")
ErrUnsupportedSignatureType = errors.New("unsupported signature type")
ErrFailedToParseEthereumPublicKey = errors.New("failed to parse ethereum public key")
ErrNotSigned = errors.New("bundle item not signed")
ErrInvalidId = errors.New("invalid id")
ErrNestedBundleInvalidLength = errors.New("nested bundle invalid length in one of the fields")
ErrAlreadyReceived = errors.New("data item already received")
ErrPaymentRequired = errors.New("payment required")
)