@openvtc/trust-tasks 0.17.6 → 0.17.7
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 +114 -0
- package/dist/_shared/components.d.ts +4 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.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/create/0.1/payload.d.ts +42 -2
- package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.js +24 -0
- package/dist/rooms/create/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/chain/0.1/payload.d.ts +382 -0
- package/dist/rooms/keys/chain/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/chain/0.1/payload.js +213 -0
- package/dist/rooms/keys/chain/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts +314 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.js +175 -0
- package/dist/rooms/keys/list/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts +352 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.js +199 -0
- package/dist/rooms/keys/seal/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.js +158 -0
- package/dist/rooms/owner/invite/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts +315 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js +173 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js +158 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -0
- package/src/index.ts +6 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.1/payload.ts +30 -2
- package/src/rooms/keys/chain/0.1/payload.ts +262 -0
- package/src/rooms/keys/list/0.1/payload.ts +222 -0
- package/src/rooms/keys/seal/0.1/payload.ts +246 -0
- package/src/rooms/owner/invite/0.1/payload.ts +212 -0
- package/src/rooms/owner/issue-authority/0.1/payload.ts +233 -0
- package/src/rooms/owner/issue-membership/0.1/payload.ts +212 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
3
|
* Source: specs/rooms/create/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
|
-
import type { Ext, Visibility } from "../../../_shared/components.js";
|
|
5
|
+
import type { Ext, RetentionPolicy, Visibility } from "../../../_shared/components.js";
|
|
6
6
|
export interface RoomsCreatePayload {
|
|
7
7
|
/**
|
|
8
8
|
* The room's identifier, minted by its owner before this call. A host is told the identifier; it does not assign one, because a room whose identity the host chose could not move to another host.
|
|
@@ -13,6 +13,10 @@ export interface RoomsCreatePayload {
|
|
|
13
13
|
* The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.
|
|
14
14
|
*/
|
|
15
15
|
ownerDid: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have.
|
|
18
|
+
*/
|
|
19
|
+
retentionPolicy?: RetentionPolicy;
|
|
16
20
|
/**
|
|
17
21
|
* How long the host will hold the room after its epoch lapses without renewal, before storage may be reclaimed. Stated at creation rather than discovered: reclamation that surprises a member is a failure of the design, not of the member.
|
|
18
22
|
*/
|
|
@@ -34,7 +38,7 @@ export interface RoomsCreateResponsePayload {
|
|
|
34
38
|
ext?: Ext;
|
|
35
39
|
}
|
|
36
40
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
37
|
-
export type { Ext, Visibility };
|
|
41
|
+
export type { Ext, RetentionPolicy, Visibility };
|
|
38
42
|
/** Trust Task type URI. */
|
|
39
43
|
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/create/0.1";
|
|
40
44
|
/** Stable alias for this specification's request payload shape. */
|
|
@@ -71,6 +75,10 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
71
75
|
readonly type: "string";
|
|
72
76
|
readonly description: "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.";
|
|
73
77
|
};
|
|
78
|
+
readonly retentionPolicy: {
|
|
79
|
+
readonly $ref: "#/$defs/RetentionPolicy";
|
|
80
|
+
readonly description: "Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have.";
|
|
81
|
+
};
|
|
74
82
|
readonly retentionDays: {
|
|
75
83
|
readonly type: "integer";
|
|
76
84
|
readonly minimum: 1;
|
|
@@ -113,6 +121,13 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
113
121
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
114
122
|
};
|
|
115
123
|
};
|
|
124
|
+
readonly RetentionPolicy: {
|
|
125
|
+
readonly title: "RetentionPolicy";
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
128
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
129
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
130
|
+
};
|
|
116
131
|
readonly Visibility: {
|
|
117
132
|
readonly title: "Visibility";
|
|
118
133
|
readonly type: "string";
|
|
@@ -157,6 +172,13 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
157
172
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
158
173
|
};
|
|
159
174
|
};
|
|
175
|
+
readonly RetentionPolicy: {
|
|
176
|
+
readonly title: "RetentionPolicy";
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
179
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
180
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
181
|
+
};
|
|
160
182
|
readonly Visibility: {
|
|
161
183
|
readonly title: "Visibility";
|
|
162
184
|
readonly type: "string";
|
|
@@ -196,6 +218,10 @@ export declare const SPEC: {
|
|
|
196
218
|
readonly type: "string";
|
|
197
219
|
readonly description: "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.";
|
|
198
220
|
};
|
|
221
|
+
readonly retentionPolicy: {
|
|
222
|
+
readonly $ref: "#/$defs/RetentionPolicy";
|
|
223
|
+
readonly description: "Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have.";
|
|
224
|
+
};
|
|
199
225
|
readonly retentionDays: {
|
|
200
226
|
readonly type: "integer";
|
|
201
227
|
readonly minimum: 1;
|
|
@@ -238,6 +264,13 @@ export declare const SPEC: {
|
|
|
238
264
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
239
265
|
};
|
|
240
266
|
};
|
|
267
|
+
readonly RetentionPolicy: {
|
|
268
|
+
readonly title: "RetentionPolicy";
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
271
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
272
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
273
|
+
};
|
|
241
274
|
readonly Visibility: {
|
|
242
275
|
readonly title: "Visibility";
|
|
243
276
|
readonly type: "string";
|
|
@@ -293,6 +326,13 @@ export declare const RESPONSE_SPEC: {
|
|
|
293
326
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
294
327
|
};
|
|
295
328
|
};
|
|
329
|
+
readonly RetentionPolicy: {
|
|
330
|
+
readonly title: "RetentionPolicy";
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly enum: readonly ["chained", "fromJoin"];
|
|
333
|
+
readonly description: "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.";
|
|
334
|
+
readonly $comment: "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it.";
|
|
335
|
+
};
|
|
296
336
|
readonly Visibility: {
|
|
297
337
|
readonly title: "Visibility";
|
|
298
338
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAGvF,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC;AAEjD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,8CAAuD,CAAC;AAEhF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAEzC,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,uDAAgE,CAAC;AAElG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2D1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -38,6 +38,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
38
38
|
"type": "string",
|
|
39
39
|
"description": "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it."
|
|
40
40
|
},
|
|
41
|
+
"retentionPolicy": {
|
|
42
|
+
"$ref": "#/$defs/RetentionPolicy",
|
|
43
|
+
"description": "Whether this room keeps its history readable across a membership change. Absent means `chained`, which is the choice a room wants unless it has a reason not to: joining a room should mean being able to read it. A host MUST reject an epoch link for a room whose policy is `fromJoin` rather than storing one it declared it would not have."
|
|
44
|
+
},
|
|
41
45
|
"retentionDays": {
|
|
42
46
|
"type": "integer",
|
|
43
47
|
"minimum": 1,
|
|
@@ -83,6 +87,16 @@ export const PAYLOAD_SCHEMA = {
|
|
|
83
87
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
84
88
|
}
|
|
85
89
|
},
|
|
90
|
+
"RetentionPolicy": {
|
|
91
|
+
"title": "RetentionPolicy",
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"chained",
|
|
95
|
+
"fromJoin"
|
|
96
|
+
],
|
|
97
|
+
"description": "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.",
|
|
98
|
+
"$comment": "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it."
|
|
99
|
+
},
|
|
86
100
|
"Visibility": {
|
|
87
101
|
"title": "Visibility",
|
|
88
102
|
"type": "string",
|
|
@@ -134,6 +148,16 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
134
148
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
135
149
|
}
|
|
136
150
|
},
|
|
151
|
+
"RetentionPolicy": {
|
|
152
|
+
"title": "RetentionPolicy",
|
|
153
|
+
"type": "string",
|
|
154
|
+
"enum": [
|
|
155
|
+
"chained",
|
|
156
|
+
"fromJoin"
|
|
157
|
+
],
|
|
158
|
+
"description": "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.",
|
|
159
|
+
"$comment": "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it."
|
|
160
|
+
},
|
|
137
161
|
"Visibility": {
|
|
138
162
|
"title": "Visibility",
|
|
139
163
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,8CAAuD,CAAC;AAKhF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,uDAAgE,CAAC;AAKlG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,wBAAwB;IACjC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,YAAY;QACZ,UAAU;KACX;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MA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;gBACN,YAAY;gBACZ,SAAS;aACV;YACD,aAAa,EAAE,8gBAA8gB;SAC9hB;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/chain/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { EpochLink, Ext } from "../../../../_shared/components.js";
|
|
6
|
+
export interface RoomsKeysChainPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The room whose chain these rungs belong to. The recipient MUST hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so accepting them for a room one is not in would retain key material for nothing.
|
|
9
|
+
*/
|
|
10
|
+
roomId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The rungs, in any order. A recipient stores them and reports how far back it can now reach — see the response's `earliestReadableEpoch`.
|
|
13
|
+
*
|
|
14
|
+
* @minItems 1
|
|
15
|
+
*/
|
|
16
|
+
links: [EpochLink, ...EpochLink[]];
|
|
17
|
+
/**
|
|
18
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
19
|
+
*/
|
|
20
|
+
ext?: Ext;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.
|
|
24
|
+
*/
|
|
25
|
+
export interface RoomsKeysChainResponsePayload {
|
|
26
|
+
roomId: string;
|
|
27
|
+
/**
|
|
28
|
+
* The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable.
|
|
29
|
+
*/
|
|
30
|
+
earliestReadableEpoch: number;
|
|
31
|
+
/**
|
|
32
|
+
* How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.
|
|
33
|
+
*/
|
|
34
|
+
stored?: number;
|
|
35
|
+
ext?: Ext;
|
|
36
|
+
}
|
|
37
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
38
|
+
export type { EpochLink, Ext };
|
|
39
|
+
/** Trust Task type URI. */
|
|
40
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/chain/0.1";
|
|
41
|
+
/** Stable alias for this specification's request payload shape. */
|
|
42
|
+
export type Payload = RoomsKeysChainPayload;
|
|
43
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
44
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/chain/0.1#response";
|
|
45
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
46
|
+
export type Response = RoomsKeysChainResponsePayload;
|
|
47
|
+
/**
|
|
48
|
+
* This specification's payload schema, as a value.
|
|
49
|
+
*
|
|
50
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
51
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
52
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
53
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
54
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
55
|
+
*/
|
|
56
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
57
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
58
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/chain/0.1";
|
|
59
|
+
readonly title: "Rooms Keys Chain — payload";
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
readonly additionalProperties: false;
|
|
62
|
+
readonly required: readonly ["roomId", "links"];
|
|
63
|
+
readonly properties: {
|
|
64
|
+
readonly roomId: {
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly description: "The room whose chain these rungs belong to. The recipient MUST hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so accepting them for a room one is not in would retain key material for nothing.";
|
|
67
|
+
};
|
|
68
|
+
readonly links: {
|
|
69
|
+
readonly type: "array";
|
|
70
|
+
readonly minItems: 1;
|
|
71
|
+
readonly description: "The rungs, in any order. A recipient stores them and reports how far back it can now reach — see the response's `earliestReadableEpoch`.";
|
|
72
|
+
readonly items: {
|
|
73
|
+
readonly $ref: "#/$defs/EpochLink";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly ext: {
|
|
77
|
+
readonly $ref: "#/$defs/Ext";
|
|
78
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly $defs: {
|
|
82
|
+
readonly Response: {
|
|
83
|
+
readonly $anchor: "response";
|
|
84
|
+
readonly title: "Rooms Keys Chain — response payload";
|
|
85
|
+
readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.";
|
|
86
|
+
readonly type: "object";
|
|
87
|
+
readonly additionalProperties: false;
|
|
88
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
89
|
+
readonly properties: {
|
|
90
|
+
readonly roomId: {
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
};
|
|
93
|
+
readonly earliestReadableEpoch: {
|
|
94
|
+
readonly type: "integer";
|
|
95
|
+
readonly minimum: 1;
|
|
96
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable.";
|
|
97
|
+
};
|
|
98
|
+
readonly stored: {
|
|
99
|
+
readonly type: "integer";
|
|
100
|
+
readonly minimum: 0;
|
|
101
|
+
readonly description: "How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
|
|
102
|
+
};
|
|
103
|
+
readonly ext: {
|
|
104
|
+
readonly $ref: "#/$defs/Ext";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly Ext: {
|
|
109
|
+
readonly title: "Ext";
|
|
110
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
111
|
+
readonly type: "object";
|
|
112
|
+
readonly minProperties: 1;
|
|
113
|
+
readonly additionalProperties: true;
|
|
114
|
+
readonly propertyNames: {
|
|
115
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
readonly EpochLink: {
|
|
119
|
+
readonly title: "EpochLink";
|
|
120
|
+
readonly type: "object";
|
|
121
|
+
readonly additionalProperties: false;
|
|
122
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
123
|
+
readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
|
|
124
|
+
readonly properties: {
|
|
125
|
+
readonly epoch: {
|
|
126
|
+
readonly type: "integer";
|
|
127
|
+
readonly minimum: 2;
|
|
128
|
+
readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
|
|
129
|
+
};
|
|
130
|
+
readonly wrapped: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
|
|
133
|
+
};
|
|
134
|
+
readonly nonce: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly description: "AEAD nonce, base64url.";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
143
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
144
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
145
|
+
readonly $ref: "#/$defs/Response";
|
|
146
|
+
readonly $defs: {
|
|
147
|
+
readonly Response: {
|
|
148
|
+
readonly $anchor: "response";
|
|
149
|
+
readonly title: "Rooms Keys Chain — response payload";
|
|
150
|
+
readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.";
|
|
151
|
+
readonly type: "object";
|
|
152
|
+
readonly additionalProperties: false;
|
|
153
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
154
|
+
readonly properties: {
|
|
155
|
+
readonly roomId: {
|
|
156
|
+
readonly type: "string";
|
|
157
|
+
};
|
|
158
|
+
readonly earliestReadableEpoch: {
|
|
159
|
+
readonly type: "integer";
|
|
160
|
+
readonly minimum: 1;
|
|
161
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable.";
|
|
162
|
+
};
|
|
163
|
+
readonly stored: {
|
|
164
|
+
readonly type: "integer";
|
|
165
|
+
readonly minimum: 0;
|
|
166
|
+
readonly description: "How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
|
|
167
|
+
};
|
|
168
|
+
readonly ext: {
|
|
169
|
+
readonly $ref: "#/$defs/Ext";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly Ext: {
|
|
174
|
+
readonly title: "Ext";
|
|
175
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
176
|
+
readonly type: "object";
|
|
177
|
+
readonly minProperties: 1;
|
|
178
|
+
readonly additionalProperties: true;
|
|
179
|
+
readonly propertyNames: {
|
|
180
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly EpochLink: {
|
|
184
|
+
readonly title: "EpochLink";
|
|
185
|
+
readonly type: "object";
|
|
186
|
+
readonly additionalProperties: false;
|
|
187
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
188
|
+
readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly epoch: {
|
|
191
|
+
readonly type: "integer";
|
|
192
|
+
readonly minimum: 2;
|
|
193
|
+
readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
|
|
194
|
+
};
|
|
195
|
+
readonly wrapped: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
|
|
198
|
+
};
|
|
199
|
+
readonly nonce: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly description: "AEAD nonce, base64url.";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
209
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
210
|
+
* per-specification and cannot be derived from the document alone, and
|
|
211
|
+
* item 2 needs the schema this carries.
|
|
212
|
+
*/
|
|
213
|
+
export declare const SPEC: {
|
|
214
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/chain/0.1";
|
|
215
|
+
readonly isBearer: false;
|
|
216
|
+
readonly isProofRequired: true;
|
|
217
|
+
readonly isRecipientRequired: true;
|
|
218
|
+
readonly isIssuedAtRequired: true;
|
|
219
|
+
readonly payloadSchema: {
|
|
220
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
221
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/chain/0.1";
|
|
222
|
+
readonly title: "Rooms Keys Chain — payload";
|
|
223
|
+
readonly type: "object";
|
|
224
|
+
readonly additionalProperties: false;
|
|
225
|
+
readonly required: readonly ["roomId", "links"];
|
|
226
|
+
readonly properties: {
|
|
227
|
+
readonly roomId: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly description: "The room whose chain these rungs belong to. The recipient MUST hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so accepting them for a room one is not in would retain key material for nothing.";
|
|
230
|
+
};
|
|
231
|
+
readonly links: {
|
|
232
|
+
readonly type: "array";
|
|
233
|
+
readonly minItems: 1;
|
|
234
|
+
readonly description: "The rungs, in any order. A recipient stores them and reports how far back it can now reach — see the response's `earliestReadableEpoch`.";
|
|
235
|
+
readonly items: {
|
|
236
|
+
readonly $ref: "#/$defs/EpochLink";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
readonly ext: {
|
|
240
|
+
readonly $ref: "#/$defs/Ext";
|
|
241
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
readonly $defs: {
|
|
245
|
+
readonly Response: {
|
|
246
|
+
readonly $anchor: "response";
|
|
247
|
+
readonly title: "Rooms Keys Chain — response payload";
|
|
248
|
+
readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.";
|
|
249
|
+
readonly type: "object";
|
|
250
|
+
readonly additionalProperties: false;
|
|
251
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
252
|
+
readonly properties: {
|
|
253
|
+
readonly roomId: {
|
|
254
|
+
readonly type: "string";
|
|
255
|
+
};
|
|
256
|
+
readonly earliestReadableEpoch: {
|
|
257
|
+
readonly type: "integer";
|
|
258
|
+
readonly minimum: 1;
|
|
259
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable.";
|
|
260
|
+
};
|
|
261
|
+
readonly stored: {
|
|
262
|
+
readonly type: "integer";
|
|
263
|
+
readonly minimum: 0;
|
|
264
|
+
readonly description: "How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
|
|
265
|
+
};
|
|
266
|
+
readonly ext: {
|
|
267
|
+
readonly $ref: "#/$defs/Ext";
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
readonly Ext: {
|
|
272
|
+
readonly title: "Ext";
|
|
273
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
274
|
+
readonly type: "object";
|
|
275
|
+
readonly minProperties: 1;
|
|
276
|
+
readonly additionalProperties: true;
|
|
277
|
+
readonly propertyNames: {
|
|
278
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
readonly EpochLink: {
|
|
282
|
+
readonly title: "EpochLink";
|
|
283
|
+
readonly type: "object";
|
|
284
|
+
readonly additionalProperties: false;
|
|
285
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
286
|
+
readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
|
|
287
|
+
readonly properties: {
|
|
288
|
+
readonly epoch: {
|
|
289
|
+
readonly type: "integer";
|
|
290
|
+
readonly minimum: 2;
|
|
291
|
+
readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
|
|
292
|
+
};
|
|
293
|
+
readonly wrapped: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
|
|
296
|
+
};
|
|
297
|
+
readonly nonce: {
|
|
298
|
+
readonly type: "string";
|
|
299
|
+
readonly description: "AEAD nonce, base64url.";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
308
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
309
|
+
* parties (§7.3 item 5).
|
|
310
|
+
*/
|
|
311
|
+
export declare const RESPONSE_SPEC: {
|
|
312
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/chain/0.1#response";
|
|
313
|
+
readonly isBearer: false;
|
|
314
|
+
readonly isProofRequired: true;
|
|
315
|
+
readonly isRecipientRequired: true;
|
|
316
|
+
readonly isIssuedAtRequired: true;
|
|
317
|
+
readonly payloadSchema: {
|
|
318
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
319
|
+
readonly $ref: "#/$defs/Response";
|
|
320
|
+
readonly $defs: {
|
|
321
|
+
readonly Response: {
|
|
322
|
+
readonly $anchor: "response";
|
|
323
|
+
readonly title: "Rooms Keys Chain — response payload";
|
|
324
|
+
readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.";
|
|
325
|
+
readonly type: "object";
|
|
326
|
+
readonly additionalProperties: false;
|
|
327
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
328
|
+
readonly properties: {
|
|
329
|
+
readonly roomId: {
|
|
330
|
+
readonly type: "string";
|
|
331
|
+
};
|
|
332
|
+
readonly earliestReadableEpoch: {
|
|
333
|
+
readonly type: "integer";
|
|
334
|
+
readonly minimum: 1;
|
|
335
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable.";
|
|
336
|
+
};
|
|
337
|
+
readonly stored: {
|
|
338
|
+
readonly type: "integer";
|
|
339
|
+
readonly minimum: 0;
|
|
340
|
+
readonly description: "How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
|
|
341
|
+
};
|
|
342
|
+
readonly ext: {
|
|
343
|
+
readonly $ref: "#/$defs/Ext";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
readonly Ext: {
|
|
348
|
+
readonly title: "Ext";
|
|
349
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
350
|
+
readonly type: "object";
|
|
351
|
+
readonly minProperties: 1;
|
|
352
|
+
readonly additionalProperties: true;
|
|
353
|
+
readonly propertyNames: {
|
|
354
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
readonly EpochLink: {
|
|
358
|
+
readonly title: "EpochLink";
|
|
359
|
+
readonly type: "object";
|
|
360
|
+
readonly additionalProperties: false;
|
|
361
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
362
|
+
readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly epoch: {
|
|
365
|
+
readonly type: "integer";
|
|
366
|
+
readonly minimum: 2;
|
|
367
|
+
readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
|
|
368
|
+
};
|
|
369
|
+
readonly wrapped: {
|
|
370
|
+
readonly type: "string";
|
|
371
|
+
readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
|
|
372
|
+
};
|
|
373
|
+
readonly nonce: {
|
|
374
|
+
readonly type: "string";
|
|
375
|
+
readonly description: "AEAD nonce, base64url.";
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/chain/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAGxE,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,CAAC,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;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