deserializer

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package deserializer implements the deserializer for the MLS messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldSendToBlockchain added in v1.3.0

func ShouldSendToBlockchain(
	payload *envelopesProto.ClientEnvelope_GroupMessage,
) (bool, error)

Types

type ApplicationContent

type ApplicationContent struct{}

ApplicationContent (stub)

func (*ApplicationContent) ContentType

func (*ApplicationContent) ContentType() ContentType

func (*ApplicationContent) TLSDeserialize

func (a *ApplicationContent) TLSDeserialize(r *bytes.Reader) error

type CommitIn

type CommitIn struct{}

CommitIn (stub)

func (*CommitIn) ContentType

func (*CommitIn) ContentType() ContentType

func (*CommitIn) TLSDeserialize

func (c *CommitIn) TLSDeserialize(r *bytes.Reader) error

type ContentType

type ContentType uint8
const (
	ContentTypeApplication ContentType = 1
	ContentTypeProposal    ContentType = 2
	ContentTypeCommit      ContentType = 3
)

type FramedContentBodyIn

type FramedContentBodyIn interface {
	TLSDeserialize(r *bytes.Reader) error
	ContentType() ContentType
}

type FramedContentIn

type FramedContentIn struct {
	GroupID           GroupID
	Epoch             uint64
	Sender            Sender
	AuthenticatedData []byte
	Body              FramedContentBodyIn
}

func (*FramedContentIn) TLSDeserialize

func (f *FramedContentIn) TLSDeserialize(r *bytes.Reader) error

type GroupID

type GroupID []byte

type MlsMessageBodyIn

type MlsMessageBodyIn interface {
	TLSDeserializable
}

func DeserializeMlsMessageBodyIn

func DeserializeMlsMessageBodyIn(r *bytes.Reader) (MlsMessageBodyIn, error)

type MlsMessageIn

type MlsMessageIn struct {
	Version ProtocolVersion
	Body    MlsMessageBodyIn
}

func DeserializeGroupMessage

func DeserializeGroupMessage(
	payload *envelopesProto.ClientEnvelope_GroupMessage,
) (*MlsMessageIn, error)

func (*MlsMessageIn) TLSDeserialize

func (m *MlsMessageIn) TLSDeserialize(r *bytes.Reader) error

type PrivateMessageIn

type PrivateMessageIn struct {
	GroupID     []byte
	Epoch       uint64
	ContentType ContentType
}

func (*PrivateMessageIn) TLSDeserialize

func (p *PrivateMessageIn) TLSDeserialize(r *bytes.Reader) error

type ProposalIn

type ProposalIn struct{}

ProposalIn (stub)

func (*ProposalIn) ContentType

func (*ProposalIn) ContentType() ContentType

func (*ProposalIn) TLSDeserialize

func (p *ProposalIn) TLSDeserialize(r *bytes.Reader) error

type ProtocolVersion

type ProtocolVersion uint16

type PublicMessageIn

type PublicMessageIn struct {
	Content FramedContentIn
}

func (*PublicMessageIn) TLSDeserialize

func (p *PublicMessageIn) TLSDeserialize(r *bytes.Reader) error

type Sender

type Sender struct {
	Type        SenderType
	LeafIndex   *uint32 // Only set if Member
	SenderIndex *uint32 // Only set if External
}

func (*Sender) TLSDeserialize

func (s *Sender) TLSDeserialize(r *bytes.Reader) error

type SenderType

type SenderType uint8
const (
	SenderTypeReserved          SenderType = 0
	SenderTypeMember            SenderType = 1
	SenderTypeExternal          SenderType = 2
	SenderTypeNewMemberProposal SenderType = 3
	SenderTypeNewMemberCommit   SenderType = 4
)

type TLSDeserializable

type TLSDeserializable interface {
	TLSDeserialize(r *bytes.Reader) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL