Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNilOwnerKeyContainer = errors.New("owner-key container is nil")
ErrNilOwnerKeyContainer is returned by functions that expect a non-nil OwnerKeyContainer, but received nil.
Functions ¶
func VerifyKey ¶
func VerifyKey(src OwnerKeyContainer) error
VerifyKey checks if the public key converts to owner ID.
If passed OwnerKeyContainer is nil, ErrNilOwnerKeyContainer returns. If public key cannot be unmarshaled, service.ErrInvalidPublicKeyBytes returns. If public key is not converted to owner ID, service.ErrWrongOwner returns. With neo:morph adoption public key can be unrelated to owner ID. In this case VerifyKey should call NeoFS.ID smart-contract to check whether public key is bounded with owner ID. If there is no bound, then return service.ErrWrongOwner.
Types ¶
type OwnerKeyContainer ¶
OwnerKeyContainer is an interface of the container of owner's ID and key pair with read access.