Versions in this module Expand all Collapse all v0 v0.1.0 Aug 3, 2021 Changes in this version + const MaxPayloadSize + var ErrEmptyTargets = errors.New("target list cannot be empty") + var ErrNoHandler = errors.New("no handler found") + var ErrPayloadTooBig = fmt.Errorf("message payload size cannot be greater than %d bytes", MaxPayloadSize) + var ErrVarLenTargets = errors.New("target list cannot have targets of different length") + func ParseRecipient(recipientHexString string) (*ecdsa.PublicKey, error) + func Wrap(ctx context.Context, topic Topic, msg []byte, recipient *ecdsa.PublicKey, ...) (swarm.Chunk, error) + type Handler func(context.Context, []byte) + type Interface interface + Register func(Topic, Handler) func() + SetPushSyncer func(pushSyncer pushsync.PushSyncer) + TryUnwrap func(swarm.Chunk) + func New(key *ecdsa.PrivateKey, logger logging.Logger) Interface + type Sender interface + Send func(context.Context, Topic, []byte, postage.Stamper, *ecdsa.PublicKey, Targets) error + type Target []byte + type Targets []Target + type Topic [32]byte + func NewTopic(text string) Topic + func Unwrap(ctx context.Context, key *ecdsa.PrivateKey, chunk swarm.Chunk, topics []Topic) (topic Topic, msg []byte, err error)