ClockRules class

Clock validation rules and tolerance constants per protocol/wire-format.md §4.4 & §8.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

isExpired(int expiresAt, [int? currentTimeMillis]) → bool
Returns true if expiresAt has already passed.
isTooFarInFuture(int createdAt, [int? currentTimeMillis]) → bool
Returns true if createdAt is more than maxFutureClockDriftMs into the future.
isValidMessageTime({required int createdAt, required int expiresAt, int? currentTimeMillis}) → bool
Validates both creation and expiration timestamps against currentTimeMillis (wire-format §4.4).

Constants

beaconRotationIntervalSeconds → const int
Default beacon rotation interval: 15 minutes (seconds).
defaultMessageTtlMs → const int
Default message retention TTL: 24 hours (ms).
maxFutureClockDriftMs → const int
10 minutes maximum tolerance for messages timestamped in the future (ms).