CanvasRegisterClockModel class

A signed merge clock for a single canvas object register.

The signature attests that the named actorDeviceKey authored a write of registerName at hlcTimestamp with a register value matching the digest embedded in the signed message. Verification is required on apply so that one device in a conversation cannot attribute writes to a sibling device.

Constructors

CanvasRegisterClockModel({required String canvasId, required String objectId, required CanvasRegisterName registerName, required String conversationKey, required String actorDeviceKey, required String hlcTimestamp, required String signature})
CanvasRegisterClockModel.fromJson(Json json)
factory

Properties

actorDeviceKey String
final
canvasId String
final
conversationKey String
final
hashCode int
The hash code for this object.
no setterinherited
hlcTimestamp String
final
objectId String
final
registerName CanvasRegisterName
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signature String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Json
toString() String
A string representation of this object.
inherited
verify({String? registerJson, bool? isDeleted}) Future<bool>
Verifies that signature was produced by actorDeviceKey over the canonical message for this clock and the supplied register value.

Operators

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

Static Methods

create({required String canvasId, required String objectId, required CanvasRegisterName registerName, required String conversationKey, required String hlcTimestamp, String? registerJson, bool? isDeleted}) Future<CanvasRegisterClockModel>
Signs a register clock with the current device's signing key.
digestFor({required CanvasRegisterName registerName, String? registerJson, bool? isDeleted}) Future<String>
Computes the canonical value digest for a register write.
getMessage({required String canvasId, required String objectId, required CanvasRegisterName registerName, required String conversationKey, required String actorDeviceKey, required String hlcTimestamp, required String valueDigest}) String
Builds the canonical signed message for a register clock.