IGroupMessageBroadcaster
Inherits: IPayloadBroadcaster
The GroupMessageBroadcaster is a group message payload broadcaster on an app chain.
Functions
addMessage
Adds a message to the group.
Ensures the payload length is within the allowed range and increments the sequence ID.
function addMessage(bytes16 groupId_, bytes calldata message_) external;
Parameters
| Name | Type | Description |
|---|---|---|
groupId_ | bytes16 | The group ID. |
message_ | bytes | The message in bytes. |
bootstrapMessages
Bootstraps messages to satisfy a migration.
function bootstrapMessages(bytes16[] calldata groupIds_, bytes[] calldata messages_, uint64[] calldata sequenceIds_)
external;
Parameters
| Name | Type | Description |
|---|---|---|
groupIds_ | bytes16[] | The group IDs. |
messages_ | bytes[] | The messages in bytes. |
sequenceIds_ | uint64[] | The sequence IDs. |
Events
MessageSent
Emitted when a message is sent.
event MessageSent(bytes16 indexed groupId, bytes message, uint64 indexed sequenceId);
Parameters
| Name | Type | Description |
|---|---|---|
groupId | bytes16 | The group ID. |
message | bytes | The message in bytes. Contains the full MLS group message payload. |
sequenceId | uint64 | The unique sequence ID of the message. |
Errors
ArrayLengthMismatch
Thrown when the lengths of input arrays don't match.
error ArrayLengthMismatch();
EmptyArray
Thrown when a supplied array is empty.
error EmptyArray();