@openvtc/trust-tasks 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/_shared/components.d.ts +33 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/records/get/0.1/payload.d.ts +237 -23
- package/dist/rooms/records/get/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/records/get/0.1/payload.js +126 -10
- package/dist/rooms/records/get/0.1/payload.js.map +1 -1
- package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.1/payload.js +2 -2
- package/dist/rooms/records/list/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +33 -1
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/records/get/0.1/payload.ts +155 -13
- package/src/rooms/records/list/0.1/payload.ts +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/rooms/records/get/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { AuthorityPresentation, DataCommitment, DigestMultibase, Ext, SealedRecord } from "../../../../_shared/components.js";
|
|
6
|
+
import type { AuthorityPresentation, DataCommitment, DigestMultibase, Ext, RecordTrace, SealedRecord } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
export interface RoomsRecordsGetPayload {
|
|
@@ -30,6 +30,24 @@ export interface RoomsRecordsGetPayload {
|
|
|
30
30
|
export interface RoomsRecordsGetResponsePayload {
|
|
31
31
|
key: string;
|
|
32
32
|
version: number;
|
|
33
|
+
/**
|
|
34
|
+
* Curation state. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. A host that serves a `trace` MUST serve this, because a reader cannot reach the leaf without it — and a host that could omit it could retract a record without touching a byte of it.
|
|
35
|
+
*/
|
|
36
|
+
status?: "active" | "deprecated" | "retracted";
|
|
37
|
+
/**
|
|
38
|
+
* RFC 3339. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. Required alongside a `trace` for the same reason `status` is.
|
|
39
|
+
*/
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Present **only** when the record is pinned; absent means it is not. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. `false` is not a permitted spelling: absent is how false is written in the preimage, and two spellings would give one record two roots.
|
|
43
|
+
*/
|
|
44
|
+
pinned?: true;
|
|
45
|
+
/**
|
|
46
|
+
* The member who wrote it. Present on `open` and `attributed`, absent on `private` where the author is sealed with the body. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`.
|
|
47
|
+
*
|
|
48
|
+
* This member is new to this response and is a **disclosure**: `rooms/records/list` already returns it on those tiers, so it tells a reader nothing the family withheld, but a host serving a single record now names its writer where before it did not. It is not conditional on `trace` — a reader wanting the record without the writer's identifier is asking for a different room tier, not a different response.
|
|
49
|
+
*/
|
|
50
|
+
author?: string;
|
|
33
51
|
/**
|
|
34
52
|
* Present on an `attributed` or `private` room.
|
|
35
53
|
*/
|
|
@@ -41,14 +59,22 @@ export interface RoomsRecordsGetResponsePayload {
|
|
|
41
59
|
[k: string]: unknown | undefined;
|
|
42
60
|
};
|
|
43
61
|
/**
|
|
44
|
-
* The room's data commitment at the moment this record was read. Carried on a single-record read as well as a listing so a reader can tell whether the room moved between two reads — and
|
|
62
|
+
* The room's data commitment at the moment this record was read. Carried on a single-record read as well as a listing so a reader can tell whether the room moved between two reads — and so a `trace` returned beside it has a root to reach.
|
|
45
63
|
*/
|
|
46
64
|
dataCommitment?: DataCommitment;
|
|
65
|
+
/**
|
|
66
|
+
* The path from this record's leaf to `dataCommitment`, proving the record sits under the root the host just asserted.
|
|
67
|
+
*
|
|
68
|
+
* **The leaf preimage is this response payload with `dataCommitment`, `trace` and `ext` removed** — which is exactly `CommittedRecord`, and a reader MAY validate the object it assembles against that definition before hashing it. Nothing is reconstructed and no member is carried twice; the reader deletes three members from what it already holds.
|
|
69
|
+
*
|
|
70
|
+
* OPTIONAL, on the same reasoning as `dataCommitment`: a host that maintains no tree must not invent one. A host that serves this MUST have computed it and `dataCommitment` from the same snapshot, and MUST serve every committed member it holds — an omitted `status`, `updatedAt`, `pinned` or `author` yields a leaf the reader cannot reach, so the failure is a refused trace rather than a false one.
|
|
71
|
+
*/
|
|
72
|
+
trace?: RecordTrace;
|
|
47
73
|
ext?: Ext;
|
|
48
74
|
}
|
|
49
75
|
|
|
50
76
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
51
|
-
export type { AuthorityPresentation, DataCommitment, DigestMultibase, Ext, SealedRecord };
|
|
77
|
+
export type { AuthorityPresentation, DataCommitment, DigestMultibase, Ext, RecordTrace, SealedRecord };
|
|
52
78
|
|
|
53
79
|
/** Trust Task type URI. */
|
|
54
80
|
export const TYPE_URI = "https://trusttasks.org/spec/rooms/records/get/0.1" as const;
|
|
@@ -120,6 +146,29 @@ export const PAYLOAD_SCHEMA = {
|
|
|
120
146
|
"type": "integer",
|
|
121
147
|
"minimum": 1
|
|
122
148
|
},
|
|
149
|
+
"status": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": [
|
|
152
|
+
"active",
|
|
153
|
+
"deprecated",
|
|
154
|
+
"retracted"
|
|
155
|
+
],
|
|
156
|
+
"description": "Curation state. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. A host that serves a `trace` MUST serve this, because a reader cannot reach the leaf without it — and a host that could omit it could retract a record without touching a byte of it."
|
|
157
|
+
},
|
|
158
|
+
"updatedAt": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"format": "date-time",
|
|
161
|
+
"description": "RFC 3339. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. Required alongside a `trace` for the same reason `status` is."
|
|
162
|
+
},
|
|
163
|
+
"pinned": {
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"const": true,
|
|
166
|
+
"description": "Present **only** when the record is pinned; absent means it is not. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. `false` is not a permitted spelling: absent is how false is written in the preimage, and two spellings would give one record two roots."
|
|
167
|
+
},
|
|
168
|
+
"author": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"description": "The member who wrote it. Present on `open` and `attributed`, absent on `private` where the author is sealed with the body. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`.\n\nThis member is new to this response and is a **disclosure**: `rooms/records/list` already returns it on those tiers, so it tells a reader nothing the family withheld, but a host serving a single record now names its writer where before it did not. It is not conditional on `trace` — a reader wanting the record without the writer's identifier is asking for a different room tier, not a different response."
|
|
171
|
+
},
|
|
123
172
|
"sealed": {
|
|
124
173
|
"$ref": "#/$defs/SealedRecord",
|
|
125
174
|
"description": "Present on an `attributed` or `private` room."
|
|
@@ -131,11 +180,22 @@ export const PAYLOAD_SCHEMA = {
|
|
|
131
180
|
},
|
|
132
181
|
"dataCommitment": {
|
|
133
182
|
"$ref": "#/$defs/DataCommitment",
|
|
134
|
-
"description": "The room's data commitment at the moment this record was read. Carried on a single-record read as well as a listing so a reader can tell whether the room moved between two reads — and
|
|
183
|
+
"description": "The room's data commitment at the moment this record was read. Carried on a single-record read as well as a listing so a reader can tell whether the room moved between two reads — and so a `trace` returned beside it has a root to reach."
|
|
184
|
+
},
|
|
185
|
+
"trace": {
|
|
186
|
+
"$ref": "#/$defs/RecordTrace",
|
|
187
|
+
"description": "The path from this record's leaf to `dataCommitment`, proving the record sits under the root the host just asserted.\n\n**The leaf preimage is this response payload with `dataCommitment`, `trace` and `ext` removed** — which is exactly `CommittedRecord`, and a reader MAY validate the object it assembles against that definition before hashing it. Nothing is reconstructed and no member is carried twice; the reader deletes three members from what it already holds.\n\nOPTIONAL, on the same reasoning as `dataCommitment`: a host that maintains no tree must not invent one. A host that serves this MUST have computed it and `dataCommitment` from the same snapshot, and MUST serve every committed member it holds — an omitted `status`, `updatedAt`, `pinned` or `author` yields a leaf the reader cannot reach, so the failure is a refused trace rather than a false one."
|
|
135
188
|
},
|
|
136
189
|
"ext": {
|
|
137
190
|
"$ref": "#/$defs/Ext"
|
|
138
191
|
}
|
|
192
|
+
},
|
|
193
|
+
"dependentRequired": {
|
|
194
|
+
"trace": [
|
|
195
|
+
"dataCommitment",
|
|
196
|
+
"status",
|
|
197
|
+
"updatedAt"
|
|
198
|
+
]
|
|
139
199
|
}
|
|
140
200
|
},
|
|
141
201
|
"Ext": {
|
|
@@ -148,10 +208,29 @@ export const PAYLOAD_SCHEMA = {
|
|
|
148
208
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
149
209
|
}
|
|
150
210
|
},
|
|
151
|
-
"
|
|
152
|
-
"title": "
|
|
153
|
-
"
|
|
154
|
-
"
|
|
211
|
+
"RecordTrace": {
|
|
212
|
+
"title": "RecordTrace",
|
|
213
|
+
"type": "array",
|
|
214
|
+
"maxItems": 64,
|
|
215
|
+
"items": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"additionalProperties": false,
|
|
218
|
+
"required": [
|
|
219
|
+
"sibling",
|
|
220
|
+
"siblingIsLeft"
|
|
221
|
+
],
|
|
222
|
+
"properties": {
|
|
223
|
+
"sibling": {
|
|
224
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
225
|
+
"description": "The sibling node's hash — a leaf hash or an internal node hash of this room's record tree, encoded exactly as `DataCommitment` is. A digest over **bytes**, produced by one of the two prefixed constructions in `DataCommitment`, not over a JSON document."
|
|
226
|
+
},
|
|
227
|
+
"siblingIsLeft": {
|
|
228
|
+
"type": "boolean",
|
|
229
|
+
"description": "Whether the sibling is the **left** child of the parent; the node being proved is the other one. Concatenation order is the whole of what a Merkle proof asserts, so this bit is load-bearing — inverting it on a single step yields a different root, and a reader that infers it from the record's position has assumed a tree shape the host never stated."
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"description": "The path from one record's leaf to the room's `DataCommitment` — a Merkle inclusion proof, in the vocabulary this work already uses for it.\n\n**It is not called `proof`** because in this framework that word is taken: `proof` is the document's data-integrity proof (SPEC §7.3), and a payload member of the same name in the same document invites reading one for the other. The two are not interchangeable and the confusion would be silent.\n\n**To verify**, given the `CommittedRecord` reassembled from the same response:\n 1. `h = SHA-256(0x00 || JCS(record))` — the leaf, by `DataCommitment` step 2.\n 2. For each step in order: `h = SHA-256(0x01 || sibling || h)` when `siblingIsLeft` is true, and `SHA-256(0x01 || h || sibling)` when it is false.\n 3. `h` **MUST** equal the `dataCommitment` **carried in the same response**. Not one from an earlier read, and not one from a listing: a room moves, and a trace is only ever a statement about the tree it was cut from. A host **MUST** compute the trace and the commitment from the same snapshot.\n\nAn **empty array is valid** and is not the same as an absent member. It says the room holds exactly one record, whose leaf is the root; absence of `trace` says the host offered no trace at all.\n\nA trace is **not** always `ceil(log2 n)` steps. A level that promotes an odd node unchanged (`DataCommitment` step 4) contributes no step for that node, so a reader must follow the steps it was given rather than count them against a tree size it assumed.\n\n`maxItems` bounds a tree of 2⁶⁴ records. Verification cost is the reader's and the array is the host's, so the ceiling is stated rather than left to whoever writes the loop.\n\n**What a trace does not prove.** It binds a record to a root. It says nothing about whether that root is the room's — only comparing the root against one the host did not choose does that, exactly as `DataCommitment` describes. A reader that verifies a trace against a root received in the same breath has checked the host's arithmetic and nothing else. The two mechanisms answer different questions and neither substitutes for the other."
|
|
155
234
|
},
|
|
156
235
|
"DigestMultibase": {
|
|
157
236
|
"title": "DigestMultibase",
|
|
@@ -163,6 +242,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
163
242
|
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
164
243
|
]
|
|
165
244
|
},
|
|
245
|
+
"DataCommitment": {
|
|
246
|
+
"title": "DataCommitment",
|
|
247
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
248
|
+
"description": "The root of the room's record tree — a host's commitment to *which records the room holds*, as distinct from what any one of them says.\n\nA room's records are already signed and room-bound, so a host cannot forge, alter or relocate one. What it can do for free is stay silent: a listing that omits a record is indistinguishable from a room that never held it. This value is what makes that omission detectable, so it is only worth anything when the reader can compare it against a copy the host did not choose for them — one it gave another member, one it gave the same member earlier, or the witnessed anchor. A commitment read once, in isolation, proves nothing; a host that shows two members two different roots has been caught.\n\n**The construction is normative**, because two hosts that compute different roots over the same room make every comparison meaningless:\n 1. Take every record the room holds — including tombstones, which are records — and order them by `key` using unsigned byte order.\n 2. Leaf: `SHA-256(0x00 || JCS(record))`, where the record is a `CommittedRecord` — that definition fixes the members exactly, and this step used to name a *projection* instead, which two implementations could read two ways — JCS is its RFC 8785 canonicalization, and `0x00` is RFC 6962's leaf-domain prefix.\n 3. Internal node: `SHA-256(0x01 || left || right)`.\n 4. A level with an odd number of nodes promotes the last one unchanged. It MUST NOT be duplicated: duplicating makes a tree of n leaves collide with one of n+1 whose last is repeated, so two different rooms commit to the same root.\n 5. A room holding no records commits to `SHA-256(\"\")`, a distinguished value rather than zeroes — a root of zeroes is what an uninitialised buffer looks like, and an empty room is a real state a host must be able to commit to honestly.\n\nThe leaf covers the whole record rather than its body, and that is deliberate: a host that could flip `status` from active to retracted, move `pinned`, or rewrite `author` on an `attributed` room would rewrite what the room means without touching a byte of ciphertext. The **plaintext is never involved** — on the sealed tiers the host holds ciphertext and commits to exactly what it stores.\n\nThe commitment is over the **whole room**, never over the page being returned. A page-scoped root is one a host satisfies by construction and could never fail.\n\nProving that a *particular* record sits under this root is a separate question, answered by `RecordTrace` on a single-record read. A commitment catches a host that equivocates; a trace binds one record to what the host committed to. Neither is the other, and a reader wanting completeness needs both plus a root it did not get from the host it is checking."
|
|
249
|
+
},
|
|
166
250
|
"SealedRecord": {
|
|
167
251
|
"title": "SealedRecord",
|
|
168
252
|
"type": "object",
|
|
@@ -244,6 +328,29 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
244
328
|
"type": "integer",
|
|
245
329
|
"minimum": 1
|
|
246
330
|
},
|
|
331
|
+
"status": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"enum": [
|
|
334
|
+
"active",
|
|
335
|
+
"deprecated",
|
|
336
|
+
"retracted"
|
|
337
|
+
],
|
|
338
|
+
"description": "Curation state. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. A host that serves a `trace` MUST serve this, because a reader cannot reach the leaf without it — and a host that could omit it could retract a record without touching a byte of it."
|
|
339
|
+
},
|
|
340
|
+
"updatedAt": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"format": "date-time",
|
|
343
|
+
"description": "RFC 3339. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. Required alongside a `trace` for the same reason `status` is."
|
|
344
|
+
},
|
|
345
|
+
"pinned": {
|
|
346
|
+
"type": "boolean",
|
|
347
|
+
"const": true,
|
|
348
|
+
"description": "Present **only** when the record is pinned; absent means it is not. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`. `false` is not a permitted spelling: absent is how false is written in the preimage, and two spellings would give one record two roots."
|
|
349
|
+
},
|
|
350
|
+
"author": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"description": "The member who wrote it. Present on `open` and `attributed`, absent on `private` where the author is sealed with the body. Committed. Mirrors `CommittedRecord`, which fixes the leaf preimage; see the note on `trace`.\n\nThis member is new to this response and is a **disclosure**: `rooms/records/list` already returns it on those tiers, so it tells a reader nothing the family withheld, but a host serving a single record now names its writer where before it did not. It is not conditional on `trace` — a reader wanting the record without the writer's identifier is asking for a different room tier, not a different response."
|
|
353
|
+
},
|
|
247
354
|
"sealed": {
|
|
248
355
|
"$ref": "#/$defs/SealedRecord",
|
|
249
356
|
"description": "Present on an `attributed` or `private` room."
|
|
@@ -255,11 +362,22 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
255
362
|
},
|
|
256
363
|
"dataCommitment": {
|
|
257
364
|
"$ref": "#/$defs/DataCommitment",
|
|
258
|
-
"description": "The room's data commitment at the moment this record was read. Carried on a single-record read as well as a listing so a reader can tell whether the room moved between two reads — and
|
|
365
|
+
"description": "The room's data commitment at the moment this record was read. Carried on a single-record read as well as a listing so a reader can tell whether the room moved between two reads — and so a `trace` returned beside it has a root to reach."
|
|
366
|
+
},
|
|
367
|
+
"trace": {
|
|
368
|
+
"$ref": "#/$defs/RecordTrace",
|
|
369
|
+
"description": "The path from this record's leaf to `dataCommitment`, proving the record sits under the root the host just asserted.\n\n**The leaf preimage is this response payload with `dataCommitment`, `trace` and `ext` removed** — which is exactly `CommittedRecord`, and a reader MAY validate the object it assembles against that definition before hashing it. Nothing is reconstructed and no member is carried twice; the reader deletes three members from what it already holds.\n\nOPTIONAL, on the same reasoning as `dataCommitment`: a host that maintains no tree must not invent one. A host that serves this MUST have computed it and `dataCommitment` from the same snapshot, and MUST serve every committed member it holds — an omitted `status`, `updatedAt`, `pinned` or `author` yields a leaf the reader cannot reach, so the failure is a refused trace rather than a false one."
|
|
259
370
|
},
|
|
260
371
|
"ext": {
|
|
261
372
|
"$ref": "#/$defs/Ext"
|
|
262
373
|
}
|
|
374
|
+
},
|
|
375
|
+
"dependentRequired": {
|
|
376
|
+
"trace": [
|
|
377
|
+
"dataCommitment",
|
|
378
|
+
"status",
|
|
379
|
+
"updatedAt"
|
|
380
|
+
]
|
|
263
381
|
}
|
|
264
382
|
},
|
|
265
383
|
"Ext": {
|
|
@@ -272,10 +390,29 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
272
390
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
273
391
|
}
|
|
274
392
|
},
|
|
275
|
-
"
|
|
276
|
-
"title": "
|
|
277
|
-
"
|
|
278
|
-
"
|
|
393
|
+
"RecordTrace": {
|
|
394
|
+
"title": "RecordTrace",
|
|
395
|
+
"type": "array",
|
|
396
|
+
"maxItems": 64,
|
|
397
|
+
"items": {
|
|
398
|
+
"type": "object",
|
|
399
|
+
"additionalProperties": false,
|
|
400
|
+
"required": [
|
|
401
|
+
"sibling",
|
|
402
|
+
"siblingIsLeft"
|
|
403
|
+
],
|
|
404
|
+
"properties": {
|
|
405
|
+
"sibling": {
|
|
406
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
407
|
+
"description": "The sibling node's hash — a leaf hash or an internal node hash of this room's record tree, encoded exactly as `DataCommitment` is. A digest over **bytes**, produced by one of the two prefixed constructions in `DataCommitment`, not over a JSON document."
|
|
408
|
+
},
|
|
409
|
+
"siblingIsLeft": {
|
|
410
|
+
"type": "boolean",
|
|
411
|
+
"description": "Whether the sibling is the **left** child of the parent; the node being proved is the other one. Concatenation order is the whole of what a Merkle proof asserts, so this bit is load-bearing — inverting it on a single step yields a different root, and a reader that infers it from the record's position has assumed a tree shape the host never stated."
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"description": "The path from one record's leaf to the room's `DataCommitment` — a Merkle inclusion proof, in the vocabulary this work already uses for it.\n\n**It is not called `proof`** because in this framework that word is taken: `proof` is the document's data-integrity proof (SPEC §7.3), and a payload member of the same name in the same document invites reading one for the other. The two are not interchangeable and the confusion would be silent.\n\n**To verify**, given the `CommittedRecord` reassembled from the same response:\n 1. `h = SHA-256(0x00 || JCS(record))` — the leaf, by `DataCommitment` step 2.\n 2. For each step in order: `h = SHA-256(0x01 || sibling || h)` when `siblingIsLeft` is true, and `SHA-256(0x01 || h || sibling)` when it is false.\n 3. `h` **MUST** equal the `dataCommitment` **carried in the same response**. Not one from an earlier read, and not one from a listing: a room moves, and a trace is only ever a statement about the tree it was cut from. A host **MUST** compute the trace and the commitment from the same snapshot.\n\nAn **empty array is valid** and is not the same as an absent member. It says the room holds exactly one record, whose leaf is the root; absence of `trace` says the host offered no trace at all.\n\nA trace is **not** always `ceil(log2 n)` steps. A level that promotes an odd node unchanged (`DataCommitment` step 4) contributes no step for that node, so a reader must follow the steps it was given rather than count them against a tree size it assumed.\n\n`maxItems` bounds a tree of 2⁶⁴ records. Verification cost is the reader's and the array is the host's, so the ceiling is stated rather than left to whoever writes the loop.\n\n**What a trace does not prove.** It binds a record to a root. It says nothing about whether that root is the room's — only comparing the root against one the host did not choose does that, exactly as `DataCommitment` describes. A reader that verifies a trace against a root received in the same breath has checked the host's arithmetic and nothing else. The two mechanisms answer different questions and neither substitutes for the other."
|
|
279
416
|
},
|
|
280
417
|
"DigestMultibase": {
|
|
281
418
|
"title": "DigestMultibase",
|
|
@@ -287,6 +424,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
287
424
|
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
288
425
|
]
|
|
289
426
|
},
|
|
427
|
+
"DataCommitment": {
|
|
428
|
+
"title": "DataCommitment",
|
|
429
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
430
|
+
"description": "The root of the room's record tree — a host's commitment to *which records the room holds*, as distinct from what any one of them says.\n\nA room's records are already signed and room-bound, so a host cannot forge, alter or relocate one. What it can do for free is stay silent: a listing that omits a record is indistinguishable from a room that never held it. This value is what makes that omission detectable, so it is only worth anything when the reader can compare it against a copy the host did not choose for them — one it gave another member, one it gave the same member earlier, or the witnessed anchor. A commitment read once, in isolation, proves nothing; a host that shows two members two different roots has been caught.\n\n**The construction is normative**, because two hosts that compute different roots over the same room make every comparison meaningless:\n 1. Take every record the room holds — including tombstones, which are records — and order them by `key` using unsigned byte order.\n 2. Leaf: `SHA-256(0x00 || JCS(record))`, where the record is a `CommittedRecord` — that definition fixes the members exactly, and this step used to name a *projection* instead, which two implementations could read two ways — JCS is its RFC 8785 canonicalization, and `0x00` is RFC 6962's leaf-domain prefix.\n 3. Internal node: `SHA-256(0x01 || left || right)`.\n 4. A level with an odd number of nodes promotes the last one unchanged. It MUST NOT be duplicated: duplicating makes a tree of n leaves collide with one of n+1 whose last is repeated, so two different rooms commit to the same root.\n 5. A room holding no records commits to `SHA-256(\"\")`, a distinguished value rather than zeroes — a root of zeroes is what an uninitialised buffer looks like, and an empty room is a real state a host must be able to commit to honestly.\n\nThe leaf covers the whole record rather than its body, and that is deliberate: a host that could flip `status` from active to retracted, move `pinned`, or rewrite `author` on an `attributed` room would rewrite what the room means without touching a byte of ciphertext. The **plaintext is never involved** — on the sealed tiers the host holds ciphertext and commits to exactly what it stores.\n\nThe commitment is over the **whole room**, never over the page being returned. A page-scoped root is one a host satisfies by construction and could never fail.\n\nProving that a *particular* record sits under this root is a separate question, answered by `RecordTrace` on a single-record read. A commitment catches a host that equivocates; a trace binds one record to what the host committed to. Neither is the other, and a reader wanting completeness needs both plus a root it did not get from the host it is checking."
|
|
431
|
+
},
|
|
290
432
|
"SealedRecord": {
|
|
291
433
|
"title": "SealedRecord",
|
|
292
434
|
"type": "object",
|
|
@@ -165,7 +165,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
165
165
|
"DataCommitment": {
|
|
166
166
|
"title": "DataCommitment",
|
|
167
167
|
"$ref": "#/$defs/DigestMultibase",
|
|
168
|
-
"description": "The root of the room's record tree — a host's commitment to *which records the room holds*, as distinct from what any one of them says.\n\nA room's records are already signed and room-bound, so a host cannot forge, alter or relocate one. What it can do for free is stay silent: a listing that omits a record is indistinguishable from a room that never held it. This value is what makes that omission detectable, so it is only worth anything when the reader can compare it against a copy the host did not choose for them — one it gave another member, one it gave the same member earlier, or the witnessed anchor. A commitment read once, in isolation, proves nothing; a host that shows two members two different roots has been caught.\n\n**The construction is normative**, because two hosts that compute different roots over the same room make every comparison meaningless:\n 1. Take every record the room holds — including tombstones, which are records — and order them by `key` using unsigned byte order.\n 2. Leaf: `SHA-256(0x00 || JCS(record))`, where
|
|
168
|
+
"description": "The root of the room's record tree — a host's commitment to *which records the room holds*, as distinct from what any one of them says.\n\nA room's records are already signed and room-bound, so a host cannot forge, alter or relocate one. What it can do for free is stay silent: a listing that omits a record is indistinguishable from a room that never held it. This value is what makes that omission detectable, so it is only worth anything when the reader can compare it against a copy the host did not choose for them — one it gave another member, one it gave the same member earlier, or the witnessed anchor. A commitment read once, in isolation, proves nothing; a host that shows two members two different roots has been caught.\n\n**The construction is normative**, because two hosts that compute different roots over the same room make every comparison meaningless:\n 1. Take every record the room holds — including tombstones, which are records — and order them by `key` using unsigned byte order.\n 2. Leaf: `SHA-256(0x00 || JCS(record))`, where the record is a `CommittedRecord` — that definition fixes the members exactly, and this step used to name a *projection* instead, which two implementations could read two ways — JCS is its RFC 8785 canonicalization, and `0x00` is RFC 6962's leaf-domain prefix.\n 3. Internal node: `SHA-256(0x01 || left || right)`.\n 4. A level with an odd number of nodes promotes the last one unchanged. It MUST NOT be duplicated: duplicating makes a tree of n leaves collide with one of n+1 whose last is repeated, so two different rooms commit to the same root.\n 5. A room holding no records commits to `SHA-256(\"\")`, a distinguished value rather than zeroes — a root of zeroes is what an uninitialised buffer looks like, and an empty room is a real state a host must be able to commit to honestly.\n\nThe leaf covers the whole record rather than its body, and that is deliberate: a host that could flip `status` from active to retracted, move `pinned`, or rewrite `author` on an `attributed` room would rewrite what the room means without touching a byte of ciphertext. The **plaintext is never involved** — on the sealed tiers the host holds ciphertext and commits to exactly what it stores.\n\nThe commitment is over the **whole room**, never over the page being returned. A page-scoped root is one a host satisfies by construction and could never fail.\n\nProving that a *particular* record sits under this root is a separate question, answered by `RecordTrace` on a single-record read. A commitment catches a host that equivocates; a trace binds one record to what the host committed to. Neither is the other, and a reader wanting completeness needs both plus a root it did not get from the host it is checking."
|
|
169
169
|
},
|
|
170
170
|
"DigestMultibase": {
|
|
171
171
|
"title": "DigestMultibase",
|
|
@@ -311,7 +311,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
311
311
|
"DataCommitment": {
|
|
312
312
|
"title": "DataCommitment",
|
|
313
313
|
"$ref": "#/$defs/DigestMultibase",
|
|
314
|
-
"description": "The root of the room's record tree — a host's commitment to *which records the room holds*, as distinct from what any one of them says.\n\nA room's records are already signed and room-bound, so a host cannot forge, alter or relocate one. What it can do for free is stay silent: a listing that omits a record is indistinguishable from a room that never held it. This value is what makes that omission detectable, so it is only worth anything when the reader can compare it against a copy the host did not choose for them — one it gave another member, one it gave the same member earlier, or the witnessed anchor. A commitment read once, in isolation, proves nothing; a host that shows two members two different roots has been caught.\n\n**The construction is normative**, because two hosts that compute different roots over the same room make every comparison meaningless:\n 1. Take every record the room holds — including tombstones, which are records — and order them by `key` using unsigned byte order.\n 2. Leaf: `SHA-256(0x00 || JCS(record))`, where
|
|
314
|
+
"description": "The root of the room's record tree — a host's commitment to *which records the room holds*, as distinct from what any one of them says.\n\nA room's records are already signed and room-bound, so a host cannot forge, alter or relocate one. What it can do for free is stay silent: a listing that omits a record is indistinguishable from a room that never held it. This value is what makes that omission detectable, so it is only worth anything when the reader can compare it against a copy the host did not choose for them — one it gave another member, one it gave the same member earlier, or the witnessed anchor. A commitment read once, in isolation, proves nothing; a host that shows two members two different roots has been caught.\n\n**The construction is normative**, because two hosts that compute different roots over the same room make every comparison meaningless:\n 1. Take every record the room holds — including tombstones, which are records — and order them by `key` using unsigned byte order.\n 2. Leaf: `SHA-256(0x00 || JCS(record))`, where the record is a `CommittedRecord` — that definition fixes the members exactly, and this step used to name a *projection* instead, which two implementations could read two ways — JCS is its RFC 8785 canonicalization, and `0x00` is RFC 6962's leaf-domain prefix.\n 3. Internal node: `SHA-256(0x01 || left || right)`.\n 4. A level with an odd number of nodes promotes the last one unchanged. It MUST NOT be duplicated: duplicating makes a tree of n leaves collide with one of n+1 whose last is repeated, so two different rooms commit to the same root.\n 5. A room holding no records commits to `SHA-256(\"\")`, a distinguished value rather than zeroes — a root of zeroes is what an uninitialised buffer looks like, and an empty room is a real state a host must be able to commit to honestly.\n\nThe leaf covers the whole record rather than its body, and that is deliberate: a host that could flip `status` from active to retracted, move `pinned`, or rewrite `author` on an `attributed` room would rewrite what the room means without touching a byte of ciphertext. The **plaintext is never involved** — on the sealed tiers the host holds ciphertext and commits to exactly what it stores.\n\nThe commitment is over the **whole room**, never over the page being returned. A page-scoped root is one a host satisfies by construction and could never fail.\n\nProving that a *particular* record sits under this root is a separate question, answered by `RecordTrace` on a single-record read. A commitment catches a host that equivocates; a trace binds one record to what the host committed to. Neither is the other, and a reader wanting completeness needs both plus a root it did not get from the host it is checking."
|
|
315
315
|
},
|
|
316
316
|
"DigestMultibase": {
|
|
317
317
|
"title": "DigestMultibase",
|