@openvtc/trust-tasks 0.17.3 → 0.17.5
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 +144 -0
- package/dist/_shared/components.d.ts +17 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/provision/integration/0.3/payload.d.ts +64 -0
- package/dist/provision/integration/0.3/payload.d.ts.map +1 -1
- package/dist/provision/integration/0.3/payload.js +35 -0
- package/dist/provision/integration/0.3/payload.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/epoch/chain/0.1/payload.d.ts +490 -0
- package/dist/rooms/epoch/chain/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/chain/0.1/payload.js +272 -0
- package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -0
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +104 -2
- package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.js +57 -0
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +17 -0
- package/src/index.ts +1 -0
- package/src/provision/integration/0.3/payload.ts +47 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/epoch/chain/0.1/payload.ts +323 -0
- package/src/rooms/epoch/mint/0.1/payload.ts +63 -2
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/epoch/chain/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/epoch/chain/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/epoch/chain/0.1#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/rooms/epoch/chain/0.1",
|
|
21
|
+
"title": "Rooms Epoch Chain — payload",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": [
|
|
25
|
+
"roomId",
|
|
26
|
+
"presentation"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"roomId": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "The room whose epoch key chain is being fetched."
|
|
32
|
+
},
|
|
33
|
+
"presentation": {
|
|
34
|
+
"$ref": "#/$defs/AuthorityPresentation",
|
|
35
|
+
"description": "Must confer the `read` action at this room's scope. Reading the room and reading the parts of it written earlier are the same act, so they take the same grant; a separate one would be a grant nobody could explain."
|
|
36
|
+
},
|
|
37
|
+
"fromEpoch": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 2,
|
|
40
|
+
"description": "Return only links whose `epoch` is at or below this. The chain is walked downwards, so this is how a member who already holds the top of it asks for the rest. Absent means from the room's current epoch down."
|
|
41
|
+
},
|
|
42
|
+
"limit": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 1,
|
|
45
|
+
"maximum": 500,
|
|
46
|
+
"description": "Maximum links to return, highest `epoch` first. A host MAY return fewer."
|
|
47
|
+
},
|
|
48
|
+
"ext": {
|
|
49
|
+
"$ref": "#/$defs/Ext",
|
|
50
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"$defs": {
|
|
54
|
+
"Response": {
|
|
55
|
+
"$anchor": "response",
|
|
56
|
+
"title": "Rooms Epoch Chain — response payload",
|
|
57
|
+
"description": "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.",
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": [
|
|
61
|
+
"roomId",
|
|
62
|
+
"links"
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"roomId": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"links": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"description": "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.",
|
|
71
|
+
"items": {
|
|
72
|
+
"$ref": "#/$defs/EpochLink"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"ext": {
|
|
76
|
+
"$ref": "#/$defs/Ext"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"Ext": {
|
|
81
|
+
"title": "Ext",
|
|
82
|
+
"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.",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"minProperties": 1,
|
|
85
|
+
"additionalProperties": true,
|
|
86
|
+
"propertyNames": {
|
|
87
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"EpochLink": {
|
|
91
|
+
"title": "EpochLink",
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": [
|
|
95
|
+
"epoch",
|
|
96
|
+
"wrapped",
|
|
97
|
+
"nonce"
|
|
98
|
+
],
|
|
99
|
+
"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.",
|
|
100
|
+
"properties": {
|
|
101
|
+
"epoch": {
|
|
102
|
+
"type": "integer",
|
|
103
|
+
"minimum": 2,
|
|
104
|
+
"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."
|
|
105
|
+
},
|
|
106
|
+
"wrapped": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"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."
|
|
109
|
+
},
|
|
110
|
+
"nonce": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "AEAD nonce, base64url."
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"AuthorityPresentation": {
|
|
117
|
+
"title": "AuthorityPresentation",
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": [
|
|
121
|
+
"membership",
|
|
122
|
+
"authority"
|
|
123
|
+
],
|
|
124
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
125
|
+
"properties": {
|
|
126
|
+
"membership": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
129
|
+
},
|
|
130
|
+
"authority": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"minItems": 1,
|
|
133
|
+
"maxItems": 8,
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
138
|
+
},
|
|
139
|
+
"subjectBinding": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
148
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
149
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
150
|
+
"$ref": "#/$defs/Response",
|
|
151
|
+
"$defs": {
|
|
152
|
+
"Response": {
|
|
153
|
+
"$anchor": "response",
|
|
154
|
+
"title": "Rooms Epoch Chain — response payload",
|
|
155
|
+
"description": "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.",
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"roomId",
|
|
160
|
+
"links"
|
|
161
|
+
],
|
|
162
|
+
"properties": {
|
|
163
|
+
"roomId": {
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"links": {
|
|
167
|
+
"type": "array",
|
|
168
|
+
"description": "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.",
|
|
169
|
+
"items": {
|
|
170
|
+
"$ref": "#/$defs/EpochLink"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"ext": {
|
|
174
|
+
"$ref": "#/$defs/Ext"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"Ext": {
|
|
179
|
+
"title": "Ext",
|
|
180
|
+
"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.",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"minProperties": 1,
|
|
183
|
+
"additionalProperties": true,
|
|
184
|
+
"propertyNames": {
|
|
185
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"EpochLink": {
|
|
189
|
+
"title": "EpochLink",
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": [
|
|
193
|
+
"epoch",
|
|
194
|
+
"wrapped",
|
|
195
|
+
"nonce"
|
|
196
|
+
],
|
|
197
|
+
"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.",
|
|
198
|
+
"properties": {
|
|
199
|
+
"epoch": {
|
|
200
|
+
"type": "integer",
|
|
201
|
+
"minimum": 2,
|
|
202
|
+
"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."
|
|
203
|
+
},
|
|
204
|
+
"wrapped": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"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."
|
|
207
|
+
},
|
|
208
|
+
"nonce": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "AEAD nonce, base64url."
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"AuthorityPresentation": {
|
|
215
|
+
"title": "AuthorityPresentation",
|
|
216
|
+
"type": "object",
|
|
217
|
+
"additionalProperties": false,
|
|
218
|
+
"required": [
|
|
219
|
+
"membership",
|
|
220
|
+
"authority"
|
|
221
|
+
],
|
|
222
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
223
|
+
"properties": {
|
|
224
|
+
"membership": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
227
|
+
},
|
|
228
|
+
"authority": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"minItems": 1,
|
|
231
|
+
"maxItems": 8,
|
|
232
|
+
"items": {
|
|
233
|
+
"type": "string"
|
|
234
|
+
},
|
|
235
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
236
|
+
},
|
|
237
|
+
"subjectBinding": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
247
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
248
|
+
* per-specification and cannot be derived from the document alone, and
|
|
249
|
+
* item 2 needs the schema this carries.
|
|
250
|
+
*/
|
|
251
|
+
export const SPEC = {
|
|
252
|
+
typeUri: TYPE_URI,
|
|
253
|
+
isBearer: false,
|
|
254
|
+
isProofRequired: true,
|
|
255
|
+
isRecipientRequired: true,
|
|
256
|
+
isIssuedAtRequired: true,
|
|
257
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
261
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
262
|
+
* parties (§7.3 item 5).
|
|
263
|
+
*/
|
|
264
|
+
export const RESPONSE_SPEC = {
|
|
265
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
266
|
+
isBearer: false,
|
|
267
|
+
isProofRequired: true,
|
|
268
|
+
isRecipientRequired: true,
|
|
269
|
+
isIssuedAtRequired: true,
|
|
270
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
271
|
+
};
|
|
272
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/epoch/chain/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,mDAA4D,CAAC;AAKrF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,4DAAqE,CAAC;AAKvG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,cAAc;KACf;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,kDAAkD;SAClE;QACD,cAAc,EAAE;YACd,MAAM,EAAE,+BAA+B;YACvC,aAAa,EAAE,uNAAuN;SACvO;QACD,WAAW,EAAE;YACX,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,aAAa,EAAE,iNAAiN;SACjO;QACD,OAAO,EAAE;YACP,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,GAAG;YACd,aAAa,EAAE,0EAA0E;SAC1F;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,yDAAyD;SACzE;KACF;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AAc;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"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
3
|
* Source: specs/rooms/epoch/mint/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
|
-
import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
|
|
5
|
+
import type { AuthorityPresentation, EpochLink, Ext } from "../../../../_shared/components.js";
|
|
6
6
|
export interface RoomsEpochMintPayload {
|
|
7
7
|
/**
|
|
8
8
|
* The room whose epoch advances.
|
|
@@ -16,6 +16,10 @@ export interface RoomsEpochMintPayload {
|
|
|
16
16
|
* Must confer the `admin` action at this room's scope. Restricting epoch minting matters: if any key-holder could mint one, any member could evict any other by declining to seal the new key to them — silently, and with no server-side check possible on a room whose membership the host cannot see.
|
|
17
17
|
*/
|
|
18
18
|
presentation: AuthorityPresentation;
|
|
19
|
+
/**
|
|
20
|
+
* The rung of the epoch key chain that this advance produces: the outgoing epoch's storage key sealed under the incoming one. Carried here because minting is the only moment at which one party holds both keys, and a room that advances without producing it silently loses the ability to read everything written before — for every member, including whoever wrote it. Its `epoch` MUST equal `epoch`, and a host MUST reject the request otherwise; a host MUST NOT replace a link it already holds for an epoch, because a second one is either a replay or a re-pointing of the room's history at key material of somebody else's choosing, and the members who already walked the original would never see the difference. Absent where the room does not keep its history readable, and necessarily absent for a room's first epoch, which has no predecessor.
|
|
21
|
+
*/
|
|
22
|
+
link?: EpochLink;
|
|
19
23
|
/**
|
|
20
24
|
* Optional operator-facing rationale, recorded in the room's audit.
|
|
21
25
|
*/
|
|
@@ -34,7 +38,7 @@ export interface RoomsEpochMintResponsePayload {
|
|
|
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 { AuthorityPresentation, Ext };
|
|
41
|
+
export type { AuthorityPresentation, EpochLink, Ext };
|
|
38
42
|
/** Trust Task type URI. */
|
|
39
43
|
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/mint/0.1";
|
|
40
44
|
/** Stable alias for this specification's request payload shape. */
|
|
@@ -73,6 +77,11 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
73
77
|
readonly $ref: "#/$defs/AuthorityPresentation";
|
|
74
78
|
readonly description: "Must confer the `admin` action at this room's scope. Restricting epoch minting matters: if any key-holder could mint one, any member could evict any other by declining to seal the new key to them — silently, and with no server-side check possible on a room whose membership the host cannot see.";
|
|
75
79
|
};
|
|
80
|
+
readonly link: {
|
|
81
|
+
readonly $ref: "#/$defs/EpochLink";
|
|
82
|
+
readonly description: "The rung of the epoch key chain that this advance produces: the outgoing epoch's storage key sealed under the incoming one. Carried here because minting is the only moment at which one party holds both keys, and a room that advances without producing it silently loses the ability to read everything written before — for every member, including whoever wrote it. Its `epoch` MUST equal `epoch`, and a host MUST reject the request otherwise; a host MUST NOT replace a link it already holds for an epoch, because a second one is either a replay or a re-pointing of the room's history at key material of somebody else's choosing, and the members who already walked the original would never see the difference. Absent where the room does not keep its history readable, and necessarily absent for a room's first epoch, which has no predecessor.";
|
|
83
|
+
readonly $comment: "Optional rather than required: this member was added to an already-published version, and requiring it would break every conforming producer. A room that omits it is making the choice the description names, not failing to make one.";
|
|
84
|
+
};
|
|
76
85
|
readonly reason: {
|
|
77
86
|
readonly type: "string";
|
|
78
87
|
readonly maxLength: 1024;
|
|
@@ -114,6 +123,28 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
114
123
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
115
124
|
};
|
|
116
125
|
};
|
|
126
|
+
readonly EpochLink: {
|
|
127
|
+
readonly title: "EpochLink";
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly additionalProperties: false;
|
|
130
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
131
|
+
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.";
|
|
132
|
+
readonly properties: {
|
|
133
|
+
readonly epoch: {
|
|
134
|
+
readonly type: "integer";
|
|
135
|
+
readonly minimum: 2;
|
|
136
|
+
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.";
|
|
137
|
+
};
|
|
138
|
+
readonly wrapped: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
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.";
|
|
141
|
+
};
|
|
142
|
+
readonly nonce: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly description: "AEAD nonce, base64url.";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
117
148
|
readonly AuthorityPresentation: {
|
|
118
149
|
readonly title: "AuthorityPresentation";
|
|
119
150
|
readonly type: "object";
|
|
@@ -177,6 +208,28 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
177
208
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
178
209
|
};
|
|
179
210
|
};
|
|
211
|
+
readonly EpochLink: {
|
|
212
|
+
readonly title: "EpochLink";
|
|
213
|
+
readonly type: "object";
|
|
214
|
+
readonly additionalProperties: false;
|
|
215
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
216
|
+
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.";
|
|
217
|
+
readonly properties: {
|
|
218
|
+
readonly epoch: {
|
|
219
|
+
readonly type: "integer";
|
|
220
|
+
readonly minimum: 2;
|
|
221
|
+
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.";
|
|
222
|
+
};
|
|
223
|
+
readonly wrapped: {
|
|
224
|
+
readonly type: "string";
|
|
225
|
+
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.";
|
|
226
|
+
};
|
|
227
|
+
readonly nonce: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly description: "AEAD nonce, base64url.";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
180
233
|
readonly AuthorityPresentation: {
|
|
181
234
|
readonly title: "AuthorityPresentation";
|
|
182
235
|
readonly type: "object";
|
|
@@ -238,6 +291,11 @@ export declare const SPEC: {
|
|
|
238
291
|
readonly $ref: "#/$defs/AuthorityPresentation";
|
|
239
292
|
readonly description: "Must confer the `admin` action at this room's scope. Restricting epoch minting matters: if any key-holder could mint one, any member could evict any other by declining to seal the new key to them — silently, and with no server-side check possible on a room whose membership the host cannot see.";
|
|
240
293
|
};
|
|
294
|
+
readonly link: {
|
|
295
|
+
readonly $ref: "#/$defs/EpochLink";
|
|
296
|
+
readonly description: "The rung of the epoch key chain that this advance produces: the outgoing epoch's storage key sealed under the incoming one. Carried here because minting is the only moment at which one party holds both keys, and a room that advances without producing it silently loses the ability to read everything written before — for every member, including whoever wrote it. Its `epoch` MUST equal `epoch`, and a host MUST reject the request otherwise; a host MUST NOT replace a link it already holds for an epoch, because a second one is either a replay or a re-pointing of the room's history at key material of somebody else's choosing, and the members who already walked the original would never see the difference. Absent where the room does not keep its history readable, and necessarily absent for a room's first epoch, which has no predecessor.";
|
|
297
|
+
readonly $comment: "Optional rather than required: this member was added to an already-published version, and requiring it would break every conforming producer. A room that omits it is making the choice the description names, not failing to make one.";
|
|
298
|
+
};
|
|
241
299
|
readonly reason: {
|
|
242
300
|
readonly type: "string";
|
|
243
301
|
readonly maxLength: 1024;
|
|
@@ -279,6 +337,28 @@ export declare const SPEC: {
|
|
|
279
337
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
280
338
|
};
|
|
281
339
|
};
|
|
340
|
+
readonly EpochLink: {
|
|
341
|
+
readonly title: "EpochLink";
|
|
342
|
+
readonly type: "object";
|
|
343
|
+
readonly additionalProperties: false;
|
|
344
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
345
|
+
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.";
|
|
346
|
+
readonly properties: {
|
|
347
|
+
readonly epoch: {
|
|
348
|
+
readonly type: "integer";
|
|
349
|
+
readonly minimum: 2;
|
|
350
|
+
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.";
|
|
351
|
+
};
|
|
352
|
+
readonly wrapped: {
|
|
353
|
+
readonly type: "string";
|
|
354
|
+
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.";
|
|
355
|
+
};
|
|
356
|
+
readonly nonce: {
|
|
357
|
+
readonly type: "string";
|
|
358
|
+
readonly description: "AEAD nonce, base64url.";
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
};
|
|
282
362
|
readonly AuthorityPresentation: {
|
|
283
363
|
readonly title: "AuthorityPresentation";
|
|
284
364
|
readonly type: "object";
|
|
@@ -353,6 +433,28 @@ export declare const RESPONSE_SPEC: {
|
|
|
353
433
|
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
354
434
|
};
|
|
355
435
|
};
|
|
436
|
+
readonly EpochLink: {
|
|
437
|
+
readonly title: "EpochLink";
|
|
438
|
+
readonly type: "object";
|
|
439
|
+
readonly additionalProperties: false;
|
|
440
|
+
readonly required: readonly ["epoch", "wrapped", "nonce"];
|
|
441
|
+
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.";
|
|
442
|
+
readonly properties: {
|
|
443
|
+
readonly epoch: {
|
|
444
|
+
readonly type: "integer";
|
|
445
|
+
readonly minimum: 2;
|
|
446
|
+
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.";
|
|
447
|
+
};
|
|
448
|
+
readonly wrapped: {
|
|
449
|
+
readonly type: "string";
|
|
450
|
+
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.";
|
|
451
|
+
};
|
|
452
|
+
readonly nonce: {
|
|
453
|
+
readonly type: "string";
|
|
454
|
+
readonly description: "AEAD nonce, base64url.";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
356
458
|
readonly AuthorityPresentation: {
|
|
357
459
|
readonly title: "AuthorityPresentation";
|
|
358
460
|
readonly type: "object";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/epoch/mint/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/epoch/mint/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG/F,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK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AIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -40,6 +40,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
40
40
|
"$ref": "#/$defs/AuthorityPresentation",
|
|
41
41
|
"description": "Must confer the `admin` action at this room's scope. Restricting epoch minting matters: if any key-holder could mint one, any member could evict any other by declining to seal the new key to them — silently, and with no server-side check possible on a room whose membership the host cannot see."
|
|
42
42
|
},
|
|
43
|
+
"link": {
|
|
44
|
+
"$ref": "#/$defs/EpochLink",
|
|
45
|
+
"description": "The rung of the epoch key chain that this advance produces: the outgoing epoch's storage key sealed under the incoming one. Carried here because minting is the only moment at which one party holds both keys, and a room that advances without producing it silently loses the ability to read everything written before — for every member, including whoever wrote it. Its `epoch` MUST equal `epoch`, and a host MUST reject the request otherwise; a host MUST NOT replace a link it already holds for an epoch, because a second one is either a replay or a re-pointing of the room's history at key material of somebody else's choosing, and the members who already walked the original would never see the difference. Absent where the room does not keep its history readable, and necessarily absent for a room's first epoch, which has no predecessor.",
|
|
46
|
+
"$comment": "Optional rather than required: this member was added to an already-published version, and requiring it would break every conforming producer. A room that omits it is making the choice the description names, not failing to make one."
|
|
47
|
+
},
|
|
43
48
|
"reason": {
|
|
44
49
|
"type": "string",
|
|
45
50
|
"maxLength": 1024,
|
|
@@ -84,6 +89,32 @@ export const PAYLOAD_SCHEMA = {
|
|
|
84
89
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
85
90
|
}
|
|
86
91
|
},
|
|
92
|
+
"EpochLink": {
|
|
93
|
+
"title": "EpochLink",
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": [
|
|
97
|
+
"epoch",
|
|
98
|
+
"wrapped",
|
|
99
|
+
"nonce"
|
|
100
|
+
],
|
|
101
|
+
"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.",
|
|
102
|
+
"properties": {
|
|
103
|
+
"epoch": {
|
|
104
|
+
"type": "integer",
|
|
105
|
+
"minimum": 2,
|
|
106
|
+
"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."
|
|
107
|
+
},
|
|
108
|
+
"wrapped": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"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."
|
|
111
|
+
},
|
|
112
|
+
"nonce": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "AEAD nonce, base64url."
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
87
118
|
"AuthorityPresentation": {
|
|
88
119
|
"title": "AuthorityPresentation",
|
|
89
120
|
"type": "object",
|
|
@@ -153,6 +184,32 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
153
184
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
154
185
|
}
|
|
155
186
|
},
|
|
187
|
+
"EpochLink": {
|
|
188
|
+
"title": "EpochLink",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"additionalProperties": false,
|
|
191
|
+
"required": [
|
|
192
|
+
"epoch",
|
|
193
|
+
"wrapped",
|
|
194
|
+
"nonce"
|
|
195
|
+
],
|
|
196
|
+
"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.",
|
|
197
|
+
"properties": {
|
|
198
|
+
"epoch": {
|
|
199
|
+
"type": "integer",
|
|
200
|
+
"minimum": 2,
|
|
201
|
+
"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."
|
|
202
|
+
},
|
|
203
|
+
"wrapped": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"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."
|
|
206
|
+
},
|
|
207
|
+
"nonce": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "AEAD nonce, base64url."
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
156
213
|
"AuthorityPresentation": {
|
|
157
214
|
"title": "AuthorityPresentation",
|
|
158
215
|
"type": "object",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/epoch/mint/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/epoch/mint/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,2BAA2B;AAC3B,MAAM,CAAC,MAA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BAAwB;iBACxC;aACF;SACF;QACD,uBAAuB,EAAE;YACvB,OAAO,EAAE,uBAAuB;YAChC,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,YAAY;gBACZ,WAAW;aACZ;YACD,aAAa,EAAE,+ZAA+Z;YAC9a,YAAY,EAAE;gBACZ,YAAY,EAAE;oBACZ,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,4JAA4J;iBAC5K;gBACD,WAAW,EAAE;oBACX,MAAM,EAAE,OAAO;oBACf,UAAU,EAAE,CAAC;oBACb,UAAU,EAAE,CAAC;oBACb,OAAO,EAAE;wBACP,MAAM,EAAE,QAAQ;qBACjB;oBACD,aAAa,EAAE,odAAod;iBACpe;gBACD,gBAAgB,EAAE;oBAChB,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,mYAAmY;iBACnZ;aACF;SACF;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"}
|
package/package.json
CHANGED
|
@@ -1777,6 +1777,23 @@ export interface EndorsementType {
|
|
|
1777
1777
|
*/
|
|
1778
1778
|
createdByDid?: string;
|
|
1779
1779
|
}
|
|
1780
|
+
/**
|
|
1781
|
+
* 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.
|
|
1782
|
+
*/
|
|
1783
|
+
export interface EpochLink {
|
|
1784
|
+
/**
|
|
1785
|
+
* 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.
|
|
1786
|
+
*/
|
|
1787
|
+
epoch: number;
|
|
1788
|
+
/**
|
|
1789
|
+
* 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.
|
|
1790
|
+
*/
|
|
1791
|
+
wrapped: string;
|
|
1792
|
+
/**
|
|
1793
|
+
* AEAD nonce, base64url.
|
|
1794
|
+
*/
|
|
1795
|
+
nonce: string;
|
|
1796
|
+
}
|
|
1780
1797
|
/**
|
|
1781
1798
|
* The authoritative SPEC §7.3 item 14 exposure class of the pending task, derived by the executor from the compiled handler it is about to invoke — never from the registry's declared value.
|
|
1782
1799
|
*/
|
package/src/index.ts
CHANGED
|
@@ -229,6 +229,7 @@ export * as RegistryRecordRead_v0_1 from "./registry/record/read/0.1/payload.js"
|
|
|
229
229
|
export * as RegistryRecordUpdate_v0_1 from "./registry/record/update/0.1/payload.js";
|
|
230
230
|
export * as RoomShared_v0_1 from "./rooms/_shared/0.1/room.js";
|
|
231
231
|
export * as RoomsCreate_v0_1 from "./rooms/create/0.1/payload.js";
|
|
232
|
+
export * as RoomsEpochChain_v0_1 from "./rooms/epoch/chain/0.1/payload.js";
|
|
232
233
|
export * as RoomsEpochMint_v0_1 from "./rooms/epoch/mint/0.1/payload.js";
|
|
233
234
|
export * as RoomsKeysCommit_v0_1 from "./rooms/keys/commit/0.1/payload.js";
|
|
234
235
|
export * as RoomsKeysKeyPackage_v0_1 from "./rooms/keys/key-package/0.1/payload.js";
|