Skip to content

EntryView

One entry of the signed list of a device, as ctx.audit.entries returns it. It has the fields of the entry and an id.

verified is true, and deltas holds the change itself, when the device showed the content of the change and that content matched the fingerprint that the entry holds. A change that is too large, or that the device never showed, is signed but has neither. The signature itself is checked by the app and is not included.

readonly at: number;

The time at which the entry was written, according to the clock of the device. It is a claim and does not prove the order of events.


readonly author: string;

The person to whom the device belongs, according to the list of devices. The app verifies it and never trusts the entry.


readonly change?: string;

For a change entry, the salted fingerprint of the change.


readonly deltas?: readonly unknown[];

The change itself, when verified is true.


readonly device: string;

The id of the device that wrote the entry.


readonly epoch: number;

The epoch of the list of devices under which the entry was written. It can only increase.


readonly grant?: object;

For a grant entry, the epoch of the key, the devices for which it was locked, and the fingerprint of the locked keys.

epoch: number;

The epoch of the key that was given.

keys: string;

The fingerprint of the locked keys. The keys themselves are never recorded.

to: string[];

The ids of the devices for which the key was locked.


readonly id: string;

The id of the entry.


readonly kind: "change" | "note" | "grant";

change for an entry that records a change, grant for an entry that records that a key was given to some devices, and note for what a plugin wrote.


readonly note?: object;

For a note entry, the plugin that wrote it, the text, and the outline that it is about.

outline: string;

The id of the outline that the note is about.

plugin: string;

The plugin that wrote the note, as the app names it: its publisher and its id, bundled/<id> for a plugin that ships with the app, core/<id> for a feature of the app, or its id alone when it has no publisher. The app fills it in; a plugin cannot choose it.

text: string;

What the plugin wrote.


readonly origin: string;

The origin of the change that the entry records: User, Plugin, Automation, Undo, Redo or Import.


readonly prev: string | null;

The id of the entry before this one, or null for the first entry.


readonly scope: string;

The trail to which the entry belongs: the id of a share, or personal for the devices of the person.


readonly seen: Record<string, {
id: string;
seq: number;
}>;

The last entries of the lists of the other devices at the moment the entry was written. Only the lists that had advanced are included.


readonly seq: number;

The number of the entry in the list of its device. The first entry is number 0.


readonly v: 1 | 2;

The version of the format of the entry: 1 for a change or a grant, 2 for a note.


readonly verified: boolean;

Whether the content of the change was shown and matched the fingerprint of the entry.