go-peer/pkg/crypto/scheme/layer1/errors.go
2026-05-17 23:16:49 +07:00

25 lines
723 B
Go

package layer1
const (
errPrefix = "pkg/crypto/hybrid/layer1 = "
)
type SMessageError struct {
str string
}
func (err *SMessageError) Error() string {
return errPrefix + err.str
}
var (
ErrUnknownType = &SMessageError{"unknown type"}
ErrInvalidHeaderSize = &SMessageError{"length of message bytes < size of header"}
ErrInvalidProofOfWork = &SMessageError{"got invalid proof of work"}
ErrDecodeBytesJoiner = &SMessageError{"decode bytes joiner"}
ErrInvalidPayloadSize = &SMessageError{"got invalid payload size"}
ErrInvalidAuthHash = &SMessageError{"got invalid auth hash"}
ErrInvalidTimestamp = &SMessageError{"got invalid timestamp"}
ErrDecodePayload = &SMessageError{"decode payload"}
)