Versions in this module Expand all Collapse all v0 v0.2.0 Aug 31, 2020 Changes in this version + const LengthSize + const MaxPayloadSize + const NonceSize + const TopicSize + var ErrEmptyTargets = errors.New("target list cannot be empty") + var ErrMinerTimeout = errors.New("miner timeout error") + var ErrPayloadTooBig = fmt.Errorf("message payload size cannot be greater than %d bytes", MaxPayloadSize) + var ErrUnmarshal = errors.New("trojan message unmarshall error") + var ErrVarLenTargets = errors.New("target list cannot have targets of different length") + func IsPotential(c swarm.Chunk) bool + type Message struct + Payload []byte + Topic Topic + func NewMessage(topic Topic, payload []byte) (Message, error) + func Unwrap(c swarm.Chunk) (*Message, error) + func (m *Message) MarshalBinary() (data []byte, err error) + func (m *Message) UnmarshalBinary(data []byte) (err error) + func (m *Message) Wrap(targets Targets) (swarm.Chunk, error) + type Target []byte + type Targets []Target + type Topic [32]byte + func NewTopic(topic string) Topic