generateSerialNumber abstract method

int generateSerialNumber(
  1. String? msgType,
  2. DateTime? now
)

Generates a unique serial number (SN) for message identification.

Creates a cryptographically unique or time-based serial number to uniquely identify a message (used for tracking, deduplication, and receipts).

msgType is the message type identifier (for type-specific SN generation). now is the timestamp (defaults to current time if null).

Returns a unique serial number (uint64) for the message.

Implementation

int generateSerialNumber(String? msgType, DateTime? now);