diff --git a/CHANGELOG.md b/CHANGELOG.md index 230c69492..f160fb3d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,8 @@ The following emojis are used to highlight certain changes: * 🛠 The `ipns` package has been refactored. You should no longer use the direct Protobuf version of the IPNS Record. Instead, we have a shiny new `ipns.Record` type that wraps all the required functionality to work the best as possible with IPNS v2 Records. Please - check the [documentation](https://pkg.go.dev/github.com/ipfs/boxo/ipns) for more information. + check the [documentation](https://pkg.go.dev/github.com/ipfs/boxo/ipns) for more information, + and follow [ipfs/specs#376](https://github.com/ipfs/specs/issues/376) for related IPIP. ### Removed diff --git a/ipns/errors.go b/ipns/errors.go index 7c476484c..9179ae4cf 100644 --- a/ipns/errors.go +++ b/ipns/errors.go @@ -10,39 +10,39 @@ import ( const MaxRecordSize int = 10 << (10 * 1) // ErrExpiredRecord is returned when an IPNS [Record] is invalid due to being expired. -var ErrExpiredRecord = errors.New("the IPNS record is expired") +var ErrExpiredRecord = errors.New("record is expired") // ErrUnrecognizedValidity is returned when an IPNS [Record] has an unknown validity type. -var ErrUnrecognizedValidity = errors.New("the IPNS record contains an unrecognized validity type") +var ErrUnrecognizedValidity = errors.New("record contains an unrecognized validity type") // ErrInvalidValidity is returned when an IPNS [Record] has a known validity type, // but the validity value is invalid. -var ErrInvalidValidity = errors.New("the IPNS record contains an invalid validity") +var ErrInvalidValidity = errors.New("record contains an invalid validity") // ErrRecordSize is returned when an IPNS [Record] exceeds the maximum size. -var ErrRecordSize = errors.New("the IPNS record exceeds allowed size limit") +var ErrRecordSize = errors.New("record exceeds allowed size limit") // ErrDataMissing is returned when an IPNS [Record] is missing the data field. -var ErrDataMissing = errors.New("the IPNS record is missing the data field") +var ErrDataMissing = errors.New("record is missing the dag-cbor data field") // ErrInvalidRecord is returned when an IPNS [Record] is malformed. -var ErrInvalidRecord = errors.New("the IPNS record is malformed") +var ErrInvalidRecord = errors.New("record is malformed") // ErrPublicKeyMismatch is return when the public key embedded in an IPNS [Record] // does not match the expected public key. -var ErrPublicKeyMismatch = errors.New("the IPNS record public key does not match the expected public key") +var ErrPublicKeyMismatch = errors.New("record public key does not match the expected public key") // ErrPublicKeyNotFound is returned when the public key is not found. var ErrPublicKeyNotFound = errors.New("public key not found") // ErrInvalidPublicKey is returned when an IPNS [Record] has an invalid public key, -var ErrInvalidPublicKey = errors.New("the IPNS record public key invalid") +var ErrInvalidPublicKey = errors.New("public key invalid") // ErrSignature is returned when an IPNS [Record] fails signature verification. -var ErrSignature = errors.New("the IPNS record signature verification failed") +var ErrSignature = errors.New("signature verification failed") // ErrInvalidName is returned when an IPNS [Name] is invalid. -var ErrInvalidName = errors.New("the IPNS name is invalid") +var ErrInvalidName = errors.New("name is invalid") -// ErrInvalidPath is returned when an IPNS Record has an invalid path. -var ErrInvalidPath = errors.New("the IPNS record path invalid") +// ErrInvalidPath is returned when an IPNS [Record] has an invalid path. +var ErrInvalidPath = errors.New("value is not a valid content path")