TimerBrand: RemotableObject & {
isMyClock: ((clock) => ERef<boolean>);
isMyTimerService: ((timer) => ERef<boolean>);
}
Type declaration
isMyClock: ((clock) => ERef<boolean>)
- (clock): ERef<boolean>
Returns ERef<boolean>
isMyTimerService: ((timer) => ERef<boolean>)
- (timer): ERef<boolean>
Returns 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 === againsttimerService.getTimerBrand()
.TODO Not all Timestamps are labeled with the TimerBrand (in much the same way that
Amounts
are asset/money values labeled byBrands
), but the SwingSet vat-timer TimerService will use branded TimestampRecord/RelativeTimeRecord in all messages it emits. Also, aTimerService
is still used everywhere aTimerBrand
is called for.See https://github.com/Agoric/agoric-sdk/issues/5798 and https://github.com/Agoric/agoric-sdk/pull/5821