mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-26 14:33:27 +00:00
Extract the messaging (send/subscription) and reliable-channel (lifecycle/send) operations into their own api/ folders with events moved to the owning layer, thin messaging_client and reliable_channel_manager, and add the LogosDelivery concentrator that aggregates the per-layer APIs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
886 B
Nim
31 lines
886 B
Nim
## Messaging layer API — event surface (messaging-level message events).
|
|
import brokers/event_broker
|
|
import logos_delivery/api/types
|
|
import logos_delivery/waku/waku_core/message
|
|
export event_broker, types
|
|
|
|
EventBroker:
|
|
# Event emitted when a message is sent to the network
|
|
type MessageSentEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
|
|
EventBroker:
|
|
# Event emitted when a message send operation fails
|
|
type MessageErrorEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
error*: string
|
|
|
|
EventBroker:
|
|
# Confirmation that a message has been correctly delivered to some neighbouring nodes.
|
|
type MessagePropagatedEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
|
|
EventBroker:
|
|
# Event emitted when a message is received via Waku
|
|
type MessageReceivedEvent* = object
|
|
messageHash*: string
|
|
message*: WakuMessage
|