Versions in this module Expand all Collapse all v0 v0.29.0 Jul 29, 2023 Changes in this version + var ErrEmptyDomain = errors.New("envelope domain must not be empty") + var ErrEmptyPayloadType = errors.New("payloadType must not be empty") + var ErrInvalidSignature = errors.New("invalid signature or incorrect domain") + var ErrPayloadTypeNotRegistered = errors.New("payload type is not registered") + func ConsumeEnvelope(data []byte, domain string) (envelope *Envelope, rec Record, err error) + func RegisterType(prototype Record) + type Envelope struct + PayloadType []byte + PublicKey crypto.PubKey + RawPayload []byte + func ConsumeTypedEnvelope(data []byte, destRecord Record) (envelope *Envelope, err error) + func Seal(rec Record, privateKey crypto.PrivKey) (*Envelope, error) + func UnmarshalEnvelope(data []byte) (*Envelope, error) + func (e *Envelope) Equal(other *Envelope) bool + func (e *Envelope) Marshal() (res []byte, err error) + func (e *Envelope) Record() (Record, error) + func (e *Envelope) TypedRecord(dest Record) error + type Record interface + Codec func() []byte + Domain func() string + MarshalRecord func() ([]byte, error) + UnmarshalRecord func([]byte) error