ChannelEvent class abstract

Base class for all channel events.

An aggregate event of the PaymentChannel aggregate, keyed by channelId. Serialization goes through SerializableEvent, so the map carries only persistableMetadata: transient values such as a replyTo ActorRef stay on the in-memory event and never reach the journal (audit 2026-09-14 L2).

Implementers

Constructors

ChannelEvent({required String channelId, String? eventId, DateTime? timestamp, int? version, Map<String, dynamic>? metadata})

Properties

aggregateId → String
The ID of the aggregate this event belongs to
no setterinherited
aggregateType → String
The type of aggregate this event belongs to
no setterinherited
channelId → String
final
correlationId → String
The correlation ID of the message.
no setterinherited
eventId → String
Unique identifier for this event Used for deduplication and correlation
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
metadata → Map<String, dynamic>
Additional metadata for the event Can include correlation IDs, causation IDs, user context, etc.
no setterinherited
persistableMetadata → Map<String, dynamic>
metadata as it is persisted: transient ActorRef entries removed.
no setterinherited
replyTo → ActorRef?
The actor to reply to, if a live ActorRef was placed in metadata['replyTo'].
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timestamp → DateTime
Timestamp when the event occurred
no setterinherited
typeName → String
Stable identity of this event type in storage.
no setterinherited
version → int
Version/sequence number of this event within its aggregate Used for ordering and optimistic concurrency control
no setterinherited

Methods

getChannelEventData() → Map<String, dynamic>
Override to provide event-specific data for serialization
getEventData() → Map<String, dynamic>
Get event-specific data for serialization Override in subclasses to provide event data
getValidationErrors() → List<String>
Get validation errors Override in subclasses to provide specific error messages
inherited
isValid() → bool
Validate the event Override in subclasses for custom validation
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCbor() → List<int>
Serialize event to CBOR bytes
inherited
toMap() → Map<String, dynamic>
Convert event to a map for serialization Override in subclasses to include event-specific data
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited