TimerBrand: RemotableObject & {
    isMyClock: ((clock) => ERef<boolean>);
    isMyTimerService: ((timer) => ERef<boolean>);
}

The TimerBrand is a unique object that represents the kind of Time used in Timestamp/RelativeTime records. Times from different sources are not comparable.

Do not call isMyTimerService(myTimerService) on an untrusted brand, because that will leak your closely-held timer authority. If the goal is to check the suitability of a client-provided Timestamp, use coerceTimestampRecord() or add/subtract it to a known-good Timestamp, or extract its brand and === against timerService.getTimerBrand().

TODO Not all Timestamps are labeled with the TimerBrand (in much the same way that Amounts are asset/money values labeled by Brands), but the SwingSet vat-timer TimerService will use branded TimestampRecord/RelativeTimeRecord in all messages it emits. Also, a TimerService is still used everywhere a TimerBrand is called for.

See https://github.com/Agoric/agoric-sdk/issues/5798 and https://github.com/Agoric/agoric-sdk/pull/5821

Type declaration

  • isMyClock: ((clock) => ERef<boolean>)
      • (clock): ERef<boolean>
      • Parameters

        Returns ERef<boolean>

  • isMyTimerService: ((timer) => ERef<boolean>)
      • (timer): ERef<boolean>
      • Parameters

        Returns ERef<boolean>