@openvtc/trust-tasks 0.27.0 → 0.27.2

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.
Files changed (261) hide show
  1. package/CHANGELOG.md +267 -0
  2. package/dist/_runtime/freshness.d.ts +3 -1
  3. package/dist/_runtime/freshness.d.ts.map +1 -1
  4. package/dist/_runtime/freshness.js +4 -2
  5. package/dist/_runtime/freshness.js.map +1 -1
  6. package/dist/_shared/components.d.ts +361 -24
  7. package/dist/_shared/components.d.ts.map +1 -1
  8. package/dist/device/list/0.1/payload.d.ts +4 -4
  9. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.1/payload.js +4 -2
  11. package/dist/device/list/0.1/payload.js.map +1 -1
  12. package/dist/device/list/0.2/payload.d.ts +4 -4
  13. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  14. package/dist/device/list/0.2/payload.js +4 -2
  15. package/dist/device/list/0.2/payload.js.map +1 -1
  16. package/dist/device/register/0.1/payload.d.ts +4 -4
  17. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.1/payload.js +4 -2
  19. package/dist/device/register/0.1/payload.js.map +1 -1
  20. package/dist/device/register/0.2/payload.d.ts +4 -4
  21. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  22. package/dist/device/register/0.2/payload.js +4 -2
  23. package/dist/device/register/0.2/payload.js.map +1 -1
  24. package/dist/index.d.ts +31 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +31 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  29. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  30. package/dist/rooms/create/0.2/payload.d.ts +534 -0
  31. package/dist/rooms/create/0.2/payload.d.ts.map +1 -0
  32. package/dist/rooms/create/0.2/payload.js +293 -0
  33. package/dist/rooms/create/0.2/payload.js.map +1 -0
  34. package/dist/rooms/epoch/chain/0.2/payload.d.ts +534 -0
  35. package/dist/rooms/epoch/chain/0.2/payload.d.ts.map +1 -0
  36. package/dist/rooms/epoch/chain/0.2/payload.js +292 -0
  37. package/dist/rooms/epoch/chain/0.2/payload.js.map +1 -0
  38. package/dist/rooms/epoch/prune/0.2/payload.d.ts +467 -0
  39. package/dist/rooms/epoch/prune/0.2/payload.d.ts.map +1 -0
  40. package/dist/rooms/epoch/prune/0.2/payload.js +251 -0
  41. package/dist/rooms/epoch/prune/0.2/payload.js.map +1 -0
  42. package/dist/rooms/info/0.2/payload.d.ts +1129 -0
  43. package/dist/rooms/info/0.2/payload.d.ts.map +1 -0
  44. package/dist/rooms/info/0.2/payload.js +618 -0
  45. package/dist/rooms/info/0.2/payload.js.map +1 -0
  46. package/dist/rooms/keys/backfill/0.2/payload.d.ts +380 -0
  47. package/dist/rooms/keys/backfill/0.2/payload.d.ts.map +1 -0
  48. package/dist/rooms/keys/backfill/0.2/payload.js +197 -0
  49. package/dist/rooms/keys/backfill/0.2/payload.js.map +1 -0
  50. package/dist/rooms/keys/browse/0.1/payload.d.ts +4 -4
  51. package/dist/rooms/keys/browse/0.1/payload.js +2 -2
  52. package/dist/rooms/keys/browse/0.1/payload.js.map +1 -1
  53. package/dist/rooms/keys/browse/0.2/payload.d.ts +941 -0
  54. package/dist/rooms/keys/browse/0.2/payload.d.ts.map +1 -0
  55. package/dist/rooms/keys/browse/0.2/payload.js +558 -0
  56. package/dist/rooms/keys/browse/0.2/payload.js.map +1 -0
  57. package/dist/rooms/keys/chain/0.2/payload.d.ts +450 -0
  58. package/dist/rooms/keys/chain/0.2/payload.d.ts.map +1 -0
  59. package/dist/rooms/keys/chain/0.2/payload.js +248 -0
  60. package/dist/rooms/keys/chain/0.2/payload.js.map +1 -0
  61. package/dist/rooms/keys/profile/read/0.1/payload.d.ts +4 -4
  62. package/dist/rooms/keys/profile/read/0.1/payload.js +2 -2
  63. package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -1
  64. package/dist/rooms/keys/read/0.1/payload.d.ts +4 -4
  65. package/dist/rooms/keys/read/0.1/payload.js +2 -2
  66. package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
  67. package/dist/rooms/owner/anchor/0.1/payload.d.ts +4 -4
  68. package/dist/rooms/owner/anchor/0.1/payload.js +2 -2
  69. package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -1
  70. package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
  71. package/dist/rooms/records/get/0.1/payload.js +2 -2
  72. package/dist/rooms/records/get/0.1/payload.js.map +1 -1
  73. package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
  74. package/dist/rooms/records/get/0.2/payload.js +2 -2
  75. package/dist/rooms/records/get/0.2/payload.js.map +1 -1
  76. package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
  77. package/dist/rooms/records/list/0.1/payload.js +2 -2
  78. package/dist/rooms/records/list/0.1/payload.js.map +1 -1
  79. package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
  80. package/dist/rooms/records/list/0.2/payload.js +2 -2
  81. package/dist/rooms/records/list/0.2/payload.js.map +1 -1
  82. package/dist/rooms/records/list/0.3/payload.d.ts +970 -0
  83. package/dist/rooms/records/list/0.3/payload.d.ts.map +1 -0
  84. package/dist/rooms/records/list/0.3/payload.js +526 -0
  85. package/dist/rooms/records/list/0.3/payload.js.map +1 -0
  86. package/dist/rooms/records/prune/0.1/payload.d.ts +706 -0
  87. package/dist/rooms/records/prune/0.1/payload.d.ts.map +1 -0
  88. package/dist/rooms/records/prune/0.1/payload.js +374 -0
  89. package/dist/rooms/records/prune/0.1/payload.js.map +1 -0
  90. package/dist/rooms/records/put/0.3/payload.d.ts +1212 -0
  91. package/dist/rooms/records/put/0.3/payload.d.ts.map +1 -0
  92. package/dist/rooms/records/put/0.3/payload.js +646 -0
  93. package/dist/rooms/records/put/0.3/payload.js.map +1 -0
  94. package/dist/rooms/records/retention/set/0.1/payload.d.ts +521 -0
  95. package/dist/rooms/records/retention/set/0.1/payload.d.ts.map +1 -0
  96. package/dist/rooms/records/retention/set/0.1/payload.js +276 -0
  97. package/dist/rooms/records/retention/set/0.1/payload.js.map +1 -0
  98. package/dist/vault/credentials/present/0.1/payload.d.ts +407 -0
  99. package/dist/vault/credentials/present/0.1/payload.d.ts.map +1 -0
  100. package/dist/vault/credentials/present/0.1/payload.js +217 -0
  101. package/dist/vault/credentials/present/0.1/payload.js.map +1 -0
  102. package/dist/voting/_shared/0.1/voting.d.ts +1 -1
  103. package/dist/voting/_shared/0.1/voting.d.ts.map +1 -1
  104. package/dist/voting/board/read/0.1/payload.d.ts +58 -2
  105. package/dist/voting/board/read/0.1/payload.d.ts.map +1 -1
  106. package/dist/voting/board/read/0.1/payload.js +36 -0
  107. package/dist/voting/board/read/0.1/payload.js.map +1 -1
  108. package/dist/voting/trustees/authorize/0.1/payload.d.ts +617 -0
  109. package/dist/voting/trustees/authorize/0.1/payload.d.ts.map +1 -0
  110. package/dist/voting/trustees/authorize/0.1/payload.js +386 -0
  111. package/dist/voting/trustees/authorize/0.1/payload.js.map +1 -0
  112. package/dist/voting/trustees/status/0.1/payload.d.ts +106 -2
  113. package/dist/voting/trustees/status/0.1/payload.d.ts.map +1 -1
  114. package/dist/voting/trustees/status/0.1/payload.js +48 -0
  115. package/dist/voting/trustees/status/0.1/payload.js.map +1 -1
  116. package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts +1832 -0
  117. package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts.map +1 -0
  118. package/dist/vta/pcs/trustee/deal/0.2/payload.js +1077 -0
  119. package/dist/vta/pcs/trustee/deal/0.2/payload.js.map +1 -0
  120. package/dist/vta/pcs/trustee/decrypt/0.2/payload.d.ts +758 -0
  121. package/dist/vta/pcs/trustee/decrypt/0.2/payload.d.ts.map +1 -0
  122. package/dist/vta/pcs/trustee/decrypt/0.2/payload.js +423 -0
  123. package/dist/vta/pcs/trustee/decrypt/0.2/payload.js.map +1 -0
  124. package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts +1867 -0
  125. package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts.map +1 -0
  126. package/dist/vta/pcs/trustee/justify/0.2/payload.js +1095 -0
  127. package/dist/vta/pcs/trustee/justify/0.2/payload.js.map +1 -0
  128. package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts +1912 -0
  129. package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts.map +1 -0
  130. package/dist/vta/pcs/trustee/keys/0.2/payload.js +1115 -0
  131. package/dist/vta/pcs/trustee/keys/0.2/payload.js.map +1 -0
  132. package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts +2228 -0
  133. package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts.map +1 -0
  134. package/dist/vta/pcs/vote-encrypted/0.2/payload.js +1300 -0
  135. package/dist/vta/pcs/vote-encrypted/0.2/payload.js.map +1 -0
  136. package/dist/vta/webvh/dids/create/1.2/payload.d.ts +961 -0
  137. package/dist/vta/webvh/dids/create/1.2/payload.d.ts.map +1 -0
  138. package/dist/vta/webvh/dids/create/1.2/payload.js +480 -0
  139. package/dist/vta/webvh/dids/create/1.2/payload.js.map +1 -0
  140. package/dist/vtc/_shared/0.1/room-migration.d.ts +16 -0
  141. package/dist/vtc/_shared/0.1/room-migration.d.ts.map +1 -0
  142. package/dist/vtc/_shared/0.1/room-migration.js +6 -0
  143. package/dist/vtc/_shared/0.1/room-migration.js.map +1 -0
  144. package/dist/vtc/_shared/0.1/room-storage.d.ts +1 -1
  145. package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -1
  146. package/dist/vtc/_shared/0.2/room-storage.d.ts +16 -0
  147. package/dist/vtc/_shared/0.2/room-storage.d.ts.map +1 -0
  148. package/dist/vtc/_shared/0.2/room-storage.js +6 -0
  149. package/dist/vtc/_shared/0.2/room-storage.js.map +1 -0
  150. package/dist/vtc/admin/events/_shared/0.4/topic.d.ts +31 -0
  151. package/dist/vtc/admin/events/_shared/0.4/topic.d.ts.map +1 -0
  152. package/dist/vtc/admin/events/_shared/0.4/topic.js +6 -0
  153. package/dist/vtc/admin/events/_shared/0.4/topic.js.map +1 -0
  154. package/dist/vtc/admin/events/event/0.4/payload.d.ts +172 -0
  155. package/dist/vtc/admin/events/event/0.4/payload.d.ts.map +1 -0
  156. package/dist/vtc/admin/events/event/0.4/payload.js +103 -0
  157. package/dist/vtc/admin/events/event/0.4/payload.js.map +1 -0
  158. package/dist/vtc/admin/events/subscribe/0.4/payload.d.ts +409 -0
  159. package/dist/vtc/admin/events/subscribe/0.4/payload.d.ts.map +1 -0
  160. package/dist/vtc/admin/events/subscribe/0.4/payload.js +238 -0
  161. package/dist/vtc/admin/events/subscribe/0.4/payload.js.map +1 -0
  162. package/dist/vtc/elections/show/0.1/payload.d.ts +86 -2
  163. package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -1
  164. package/dist/vtc/elections/show/0.1/payload.js +40 -0
  165. package/dist/vtc/elections/show/0.1/payload.js.map +1 -1
  166. package/dist/vtc/rooms/get/0.2/payload.d.ts +1966 -0
  167. package/dist/vtc/rooms/get/0.2/payload.d.ts.map +1 -0
  168. package/dist/vtc/rooms/get/0.2/payload.js +976 -0
  169. package/dist/vtc/rooms/get/0.2/payload.js.map +1 -0
  170. package/dist/vtc/rooms/storage/migrate/0.2/payload.d.ts +595 -0
  171. package/dist/vtc/rooms/storage/migrate/0.2/payload.d.ts.map +1 -0
  172. package/dist/vtc/rooms/storage/migrate/0.2/payload.js +336 -0
  173. package/dist/vtc/rooms/storage/migrate/0.2/payload.js.map +1 -0
  174. package/dist/vtc/storage/configs/create/0.1/payload.d.ts +1 -1
  175. package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -1
  176. package/dist/vtc/storage/configs/create/0.2/payload.d.ts +1360 -0
  177. package/dist/vtc/storage/configs/create/0.2/payload.d.ts.map +1 -0
  178. package/dist/vtc/storage/configs/create/0.2/payload.js +783 -0
  179. package/dist/vtc/storage/configs/create/0.2/payload.js.map +1 -0
  180. package/dist/vtc/storage/configs/get/0.1/payload.d.ts +1 -1
  181. package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -1
  182. package/dist/vtc/storage/configs/get/0.2/payload.d.ts +1854 -0
  183. package/dist/vtc/storage/configs/get/0.2/payload.d.ts.map +1 -0
  184. package/dist/vtc/storage/configs/get/0.2/payload.js +1075 -0
  185. package/dist/vtc/storage/configs/get/0.2/payload.js.map +1 -0
  186. package/dist/vtc/storage/configs/list/0.1/payload.d.ts +1 -1
  187. package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -1
  188. package/dist/vtc/storage/configs/list/0.2/payload.d.ts +1955 -0
  189. package/dist/vtc/storage/configs/list/0.2/payload.d.ts.map +1 -0
  190. package/dist/vtc/storage/configs/list/0.2/payload.js +1125 -0
  191. package/dist/vtc/storage/configs/list/0.2/payload.js.map +1 -0
  192. package/dist/vtc/storage/configs/update/0.1/payload.d.ts +1 -1
  193. package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -1
  194. package/dist/vtc/storage/configs/update/0.2/payload.d.ts +1362 -0
  195. package/dist/vtc/storage/configs/update/0.2/payload.d.ts.map +1 -0
  196. package/dist/vtc/storage/configs/update/0.2/payload.js +782 -0
  197. package/dist/vtc/storage/configs/update/0.2/payload.js.map +1 -0
  198. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +1 -1
  199. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -1
  200. package/dist/vtc/storage/credentials/set/0.2/payload.d.ts +979 -0
  201. package/dist/vtc/storage/credentials/set/0.2/payload.d.ts.map +1 -0
  202. package/dist/vtc/storage/credentials/set/0.2/payload.js +573 -0
  203. package/dist/vtc/storage/credentials/set/0.2/payload.js.map +1 -0
  204. package/package.json +1 -1
  205. package/src/_runtime/freshness.ts +4 -2
  206. package/src/_shared/components.ts +388 -24
  207. package/src/device/list/0.1/payload.ts +4 -2
  208. package/src/device/list/0.2/payload.ts +4 -2
  209. package/src/device/register/0.1/payload.ts +4 -2
  210. package/src/device/register/0.2/payload.ts +4 -2
  211. package/src/index.ts +31 -0
  212. package/src/rooms/_shared/0.1/room.ts +1 -1
  213. package/src/rooms/create/0.2/payload.ts +364 -0
  214. package/src/rooms/epoch/chain/0.2/payload.ts +347 -0
  215. package/src/rooms/epoch/prune/0.2/payload.ts +315 -0
  216. package/src/rooms/info/0.2/payload.ts +700 -0
  217. package/src/rooms/keys/backfill/0.2/payload.ts +260 -0
  218. package/src/rooms/keys/browse/0.1/payload.ts +2 -2
  219. package/src/rooms/keys/browse/0.2/payload.ts +628 -0
  220. package/src/rooms/keys/chain/0.2/payload.ts +308 -0
  221. package/src/rooms/keys/profile/read/0.1/payload.ts +2 -2
  222. package/src/rooms/keys/read/0.1/payload.ts +2 -2
  223. package/src/rooms/owner/anchor/0.1/payload.ts +2 -2
  224. package/src/rooms/records/get/0.1/payload.ts +2 -2
  225. package/src/rooms/records/get/0.2/payload.ts +2 -2
  226. package/src/rooms/records/list/0.1/payload.ts +2 -2
  227. package/src/rooms/records/list/0.2/payload.ts +2 -2
  228. package/src/rooms/records/list/0.3/payload.ts +601 -0
  229. package/src/rooms/records/prune/0.1/payload.ts +451 -0
  230. package/src/rooms/records/put/0.3/payload.ts +741 -0
  231. package/src/rooms/records/retention/set/0.1/payload.ts +338 -0
  232. package/src/vault/credentials/present/0.1/payload.ts +283 -0
  233. package/src/voting/_shared/0.1/voting.ts +1 -1
  234. package/src/voting/board/read/0.1/payload.ts +38 -2
  235. package/src/voting/trustees/authorize/0.1/payload.ts +434 -0
  236. package/src/voting/trustees/status/0.1/payload.ts +58 -2
  237. package/src/vta/pcs/trustee/deal/0.2/payload.ts +1148 -0
  238. package/src/vta/pcs/trustee/decrypt/0.2/payload.ts +500 -0
  239. package/src/vta/pcs/trustee/justify/0.2/payload.ts +1167 -0
  240. package/src/vta/pcs/trustee/keys/0.2/payload.ts +1194 -0
  241. package/src/vta/pcs/vote-encrypted/0.2/payload.ts +1369 -0
  242. package/src/vta/webvh/dids/create/1.2/payload.ts +660 -0
  243. package/src/vtc/_shared/0.1/room-migration.ts +17 -0
  244. package/src/vtc/_shared/0.1/room-storage.ts +1 -1
  245. package/src/vtc/_shared/0.2/room-storage.ts +17 -0
  246. package/src/vtc/admin/events/_shared/0.4/topic.ts +32 -0
  247. package/src/vtc/admin/events/event/0.4/payload.ts +137 -0
  248. package/src/vtc/admin/events/subscribe/0.4/payload.ts +318 -0
  249. package/src/vtc/elections/show/0.1/payload.ts +46 -2
  250. package/src/vtc/rooms/get/0.2/payload.ts +1372 -0
  251. package/src/vtc/rooms/storage/migrate/0.2/payload.ts +408 -0
  252. package/src/vtc/storage/configs/create/0.1/payload.ts +1 -1
  253. package/src/vtc/storage/configs/create/0.2/payload.ts +830 -0
  254. package/src/vtc/storage/configs/get/0.1/payload.ts +1 -1
  255. package/src/vtc/storage/configs/get/0.2/payload.ts +1110 -0
  256. package/src/vtc/storage/configs/list/0.1/payload.ts +1 -1
  257. package/src/vtc/storage/configs/list/0.2/payload.ts +1177 -0
  258. package/src/vtc/storage/configs/update/0.1/payload.ts +1 -1
  259. package/src/vtc/storage/configs/update/0.2/payload.ts +829 -0
  260. package/src/vtc/storage/credentials/set/0.1/payload.ts +1 -1
  261. package/src/vtc/storage/credentials/set/0.2/payload.ts +619 -0
@@ -0,0 +1,450 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/chain/0.2/payload.schema.json
4
+ */
5
+ import type { EpochFloor, EpochLink, Ext } from "../../../../_shared/components.js";
6
+ export type RoomsKeysChainPayload = {
7
+ [k: string]: unknown | undefined;
8
+ } & {
9
+ /**
10
+ * 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.
11
+ */
12
+ roomId: string;
13
+ /**
14
+ * The rungs, in any order. A recipient stores those numbered above the room's epoch floor — the higher of the one it holds and `epochFloor` — and reports how far back it can now reach; see the response's `earliestReadableEpoch`. Absent when the request only relays a floor.
15
+ *
16
+ * @minItems 1
17
+ */
18
+ links?: [EpochLink, ...EpochLink[]];
19
+ /**
20
+ * The room's epoch floor, exactly as the host served it in the `rooms/epoch/chain` 0.2 response the rungs came from. A member relaying rungs MUST relay it when the host served one, and MAY send it alone, with no `links`, to pass on a floor it has just learnt. The recipient applies it as `EpochFloor` requires.
21
+ */
22
+ epochFloor?: EpochFloor;
23
+ /**
24
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
25
+ */
26
+ ext?: Ext;
27
+ };
28
+ /**
29
+ * Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.2#response.
30
+ */
31
+ export interface RoomsKeysChainResponsePayload {
32
+ roomId: string;
33
+ /**
34
+ * 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.
35
+ */
36
+ earliestReadableEpoch: number;
37
+ /**
38
+ * How many rungs the recipient did not already hold and kept. Rungs numbered at or below the room's epoch floor are not kept and not counted, and are not an error: a member relaying a mirror's chain may hold some. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.
39
+ */
40
+ stored?: number;
41
+ /**
42
+ * The room's epoch floor the recipient now holds — the highest it has learnt from any source. Absent when it holds none. `earliestReadableEpoch` is never below it.
43
+ */
44
+ epochFloor?: EpochFloor;
45
+ ext?: Ext;
46
+ }
47
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
48
+ export type { EpochFloor, EpochLink, Ext };
49
+ /** Trust Task type URI. */
50
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/chain/0.2";
51
+ /** Stable alias for this specification's request payload shape. */
52
+ export type Payload = RoomsKeysChainPayload;
53
+ /** Trust Task response type URI (request type URI + "#response"). */
54
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/chain/0.2#response";
55
+ /** Stable alias for this specification's success-response payload shape. */
56
+ export type Response = RoomsKeysChainResponsePayload;
57
+ /**
58
+ * This specification's payload schema, as a value.
59
+ *
60
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
61
+ * rather than only as a `.json` file because TypeScript types are erased
62
+ * at runtime: without a schema a consumer has nothing to validate, and
63
+ * every REQUIRED payload member is optional in practice. Cross-file
64
+ * `$ref`s are already inlined, so it needs no resolver.
65
+ */
66
+ export declare const PAYLOAD_SCHEMA: {
67
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
68
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/chain/0.2";
69
+ readonly title: "Rooms Keys Chain — payload";
70
+ readonly type: "object";
71
+ readonly additionalProperties: false;
72
+ readonly required: readonly ["roomId"];
73
+ readonly properties: {
74
+ readonly roomId: {
75
+ readonly type: "string";
76
+ 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.";
77
+ };
78
+ readonly links: {
79
+ readonly type: "array";
80
+ readonly minItems: 1;
81
+ readonly description: "The rungs, in any order. A recipient stores those numbered above the room's epoch floor — the higher of the one it holds and `epochFloor` — and reports how far back it can now reach; see the response's `earliestReadableEpoch`. Absent when the request only relays a floor.";
82
+ readonly items: {
83
+ readonly $ref: "#/$defs/EpochLink";
84
+ };
85
+ };
86
+ readonly epochFloor: {
87
+ readonly $ref: "#/$defs/EpochFloor";
88
+ readonly description: "The room's epoch floor, exactly as the host served it in the `rooms/epoch/chain` 0.2 response the rungs came from. A member relaying rungs MUST relay it when the host served one, and MAY send it alone, with no `links`, to pass on a floor it has just learnt. The recipient applies it as `EpochFloor` requires.";
89
+ };
90
+ readonly ext: {
91
+ readonly $ref: "#/$defs/Ext";
92
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
93
+ };
94
+ };
95
+ readonly $defs: {
96
+ readonly Response: {
97
+ readonly $anchor: "response";
98
+ readonly title: "Rooms Keys Chain — response payload";
99
+ readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.2#response.";
100
+ readonly type: "object";
101
+ readonly additionalProperties: false;
102
+ readonly required: readonly ["roomId", "earliestReadableEpoch"];
103
+ readonly properties: {
104
+ readonly roomId: {
105
+ readonly type: "string";
106
+ };
107
+ readonly earliestReadableEpoch: {
108
+ readonly type: "integer";
109
+ readonly minimum: 1;
110
+ 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.";
111
+ };
112
+ readonly stored: {
113
+ readonly type: "integer";
114
+ readonly minimum: 0;
115
+ readonly description: "How many rungs the recipient did not already hold and kept. Rungs numbered at or below the room's epoch floor are not kept and not counted, and are not an error: a member relaying a mirror's chain may hold some. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
116
+ };
117
+ readonly epochFloor: {
118
+ readonly $ref: "#/$defs/EpochFloor";
119
+ readonly description: "The room's epoch floor the recipient now holds — the highest it has learnt from any source. Absent when it holds none. `earliestReadableEpoch` is never below it.";
120
+ };
121
+ readonly ext: {
122
+ readonly $ref: "#/$defs/Ext";
123
+ };
124
+ };
125
+ };
126
+ readonly Ext: {
127
+ readonly title: "Ext";
128
+ 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.";
129
+ readonly type: "object";
130
+ readonly minProperties: 1;
131
+ readonly additionalProperties: true;
132
+ readonly propertyNames: {
133
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
134
+ };
135
+ };
136
+ readonly EpochFloor: {
137
+ readonly title: "EpochFloor";
138
+ readonly type: "integer";
139
+ readonly minimum: 1;
140
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
141
+ };
142
+ readonly EpochLink: {
143
+ readonly title: "EpochLink";
144
+ readonly type: "object";
145
+ readonly additionalProperties: false;
146
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
147
+ 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.";
148
+ readonly properties: {
149
+ readonly epoch: {
150
+ readonly type: "integer";
151
+ readonly minimum: 2;
152
+ 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.";
153
+ };
154
+ readonly wrapped: {
155
+ readonly type: "string";
156
+ 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.";
157
+ };
158
+ readonly nonce: {
159
+ readonly type: "string";
160
+ readonly description: "AEAD nonce, base64url.";
161
+ };
162
+ };
163
+ };
164
+ };
165
+ readonly anyOf: readonly [{
166
+ readonly required: readonly ["links"];
167
+ }, {
168
+ readonly required: readonly ["epochFloor"];
169
+ }];
170
+ };
171
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
172
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
173
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
174
+ readonly $ref: "#/$defs/Response";
175
+ readonly $defs: {
176
+ readonly Response: {
177
+ readonly $anchor: "response";
178
+ readonly title: "Rooms Keys Chain — response payload";
179
+ readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.2#response.";
180
+ readonly type: "object";
181
+ readonly additionalProperties: false;
182
+ readonly required: readonly ["roomId", "earliestReadableEpoch"];
183
+ readonly properties: {
184
+ readonly roomId: {
185
+ readonly type: "string";
186
+ };
187
+ readonly earliestReadableEpoch: {
188
+ readonly type: "integer";
189
+ readonly minimum: 1;
190
+ 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.";
191
+ };
192
+ readonly stored: {
193
+ readonly type: "integer";
194
+ readonly minimum: 0;
195
+ readonly description: "How many rungs the recipient did not already hold and kept. Rungs numbered at or below the room's epoch floor are not kept and not counted, and are not an error: a member relaying a mirror's chain may hold some. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
196
+ };
197
+ readonly epochFloor: {
198
+ readonly $ref: "#/$defs/EpochFloor";
199
+ readonly description: "The room's epoch floor the recipient now holds — the highest it has learnt from any source. Absent when it holds none. `earliestReadableEpoch` is never below it.";
200
+ };
201
+ readonly ext: {
202
+ readonly $ref: "#/$defs/Ext";
203
+ };
204
+ };
205
+ };
206
+ readonly Ext: {
207
+ readonly title: "Ext";
208
+ 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.";
209
+ readonly type: "object";
210
+ readonly minProperties: 1;
211
+ readonly additionalProperties: true;
212
+ readonly propertyNames: {
213
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
214
+ };
215
+ };
216
+ readonly EpochFloor: {
217
+ readonly title: "EpochFloor";
218
+ readonly type: "integer";
219
+ readonly minimum: 1;
220
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
221
+ };
222
+ readonly EpochLink: {
223
+ readonly title: "EpochLink";
224
+ readonly type: "object";
225
+ readonly additionalProperties: false;
226
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
227
+ 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.";
228
+ readonly properties: {
229
+ readonly epoch: {
230
+ readonly type: "integer";
231
+ readonly minimum: 2;
232
+ 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.";
233
+ };
234
+ readonly wrapped: {
235
+ readonly type: "string";
236
+ 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.";
237
+ };
238
+ readonly nonce: {
239
+ readonly type: "string";
240
+ readonly description: "AEAD nonce, base64url.";
241
+ };
242
+ };
243
+ };
244
+ };
245
+ };
246
+ /**
247
+ * SPEC.md §7.2 policy for the request variant, from this specification's
248
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
249
+ * per-specification and cannot be derived from the document alone, and
250
+ * item 2 needs the schema this carries.
251
+ */
252
+ export declare const SPEC: {
253
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/chain/0.2";
254
+ readonly isBearer: false;
255
+ readonly isProofRequired: true;
256
+ readonly isRecipientRequired: true;
257
+ readonly isIssuedAtRequired: true;
258
+ readonly payloadSchema: {
259
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
260
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/chain/0.2";
261
+ readonly title: "Rooms Keys Chain — payload";
262
+ readonly type: "object";
263
+ readonly additionalProperties: false;
264
+ readonly required: readonly ["roomId"];
265
+ readonly properties: {
266
+ readonly roomId: {
267
+ readonly type: "string";
268
+ 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.";
269
+ };
270
+ readonly links: {
271
+ readonly type: "array";
272
+ readonly minItems: 1;
273
+ readonly description: "The rungs, in any order. A recipient stores those numbered above the room's epoch floor — the higher of the one it holds and `epochFloor` — and reports how far back it can now reach; see the response's `earliestReadableEpoch`. Absent when the request only relays a floor.";
274
+ readonly items: {
275
+ readonly $ref: "#/$defs/EpochLink";
276
+ };
277
+ };
278
+ readonly epochFloor: {
279
+ readonly $ref: "#/$defs/EpochFloor";
280
+ readonly description: "The room's epoch floor, exactly as the host served it in the `rooms/epoch/chain` 0.2 response the rungs came from. A member relaying rungs MUST relay it when the host served one, and MAY send it alone, with no `links`, to pass on a floor it has just learnt. The recipient applies it as `EpochFloor` requires.";
281
+ };
282
+ readonly ext: {
283
+ readonly $ref: "#/$defs/Ext";
284
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
285
+ };
286
+ };
287
+ readonly $defs: {
288
+ readonly Response: {
289
+ readonly $anchor: "response";
290
+ readonly title: "Rooms Keys Chain — response payload";
291
+ readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.2#response.";
292
+ readonly type: "object";
293
+ readonly additionalProperties: false;
294
+ readonly required: readonly ["roomId", "earliestReadableEpoch"];
295
+ readonly properties: {
296
+ readonly roomId: {
297
+ readonly type: "string";
298
+ };
299
+ readonly earliestReadableEpoch: {
300
+ readonly type: "integer";
301
+ readonly minimum: 1;
302
+ 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.";
303
+ };
304
+ readonly stored: {
305
+ readonly type: "integer";
306
+ readonly minimum: 0;
307
+ readonly description: "How many rungs the recipient did not already hold and kept. Rungs numbered at or below the room's epoch floor are not kept and not counted, and are not an error: a member relaying a mirror's chain may hold some. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
308
+ };
309
+ readonly epochFloor: {
310
+ readonly $ref: "#/$defs/EpochFloor";
311
+ readonly description: "The room's epoch floor the recipient now holds — the highest it has learnt from any source. Absent when it holds none. `earliestReadableEpoch` is never below it.";
312
+ };
313
+ readonly ext: {
314
+ readonly $ref: "#/$defs/Ext";
315
+ };
316
+ };
317
+ };
318
+ readonly Ext: {
319
+ readonly title: "Ext";
320
+ 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.";
321
+ readonly type: "object";
322
+ readonly minProperties: 1;
323
+ readonly additionalProperties: true;
324
+ readonly propertyNames: {
325
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
326
+ };
327
+ };
328
+ readonly EpochFloor: {
329
+ readonly title: "EpochFloor";
330
+ readonly type: "integer";
331
+ readonly minimum: 1;
332
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
333
+ };
334
+ readonly EpochLink: {
335
+ readonly title: "EpochLink";
336
+ readonly type: "object";
337
+ readonly additionalProperties: false;
338
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
339
+ 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.";
340
+ readonly properties: {
341
+ readonly epoch: {
342
+ readonly type: "integer";
343
+ readonly minimum: 2;
344
+ 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.";
345
+ };
346
+ readonly wrapped: {
347
+ readonly type: "string";
348
+ 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.";
349
+ };
350
+ readonly nonce: {
351
+ readonly type: "string";
352
+ readonly description: "AEAD nonce, base64url.";
353
+ };
354
+ };
355
+ };
356
+ };
357
+ readonly anyOf: readonly [{
358
+ readonly required: readonly ["links"];
359
+ }, {
360
+ readonly required: readonly ["epochFloor"];
361
+ }];
362
+ };
363
+ };
364
+ /**
365
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
366
+ * tracks the *issuer* party's requirement because a response swaps the
367
+ * parties (§7.3 item 5).
368
+ */
369
+ export declare const RESPONSE_SPEC: {
370
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/chain/0.2#response";
371
+ readonly isBearer: false;
372
+ readonly isProofRequired: true;
373
+ readonly isRecipientRequired: true;
374
+ readonly isIssuedAtRequired: true;
375
+ readonly payloadSchema: {
376
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
377
+ readonly $ref: "#/$defs/Response";
378
+ readonly $defs: {
379
+ readonly Response: {
380
+ readonly $anchor: "response";
381
+ readonly title: "Rooms Keys Chain — response payload";
382
+ readonly description: "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.2#response.";
383
+ readonly type: "object";
384
+ readonly additionalProperties: false;
385
+ readonly required: readonly ["roomId", "earliestReadableEpoch"];
386
+ readonly properties: {
387
+ readonly roomId: {
388
+ readonly type: "string";
389
+ };
390
+ readonly earliestReadableEpoch: {
391
+ readonly type: "integer";
392
+ readonly minimum: 1;
393
+ 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.";
394
+ };
395
+ readonly stored: {
396
+ readonly type: "integer";
397
+ readonly minimum: 0;
398
+ readonly description: "How many rungs the recipient did not already hold and kept. Rungs numbered at or below the room's epoch floor are not kept and not counted, and are not an error: a member relaying a mirror's chain may hold some. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like.";
399
+ };
400
+ readonly epochFloor: {
401
+ readonly $ref: "#/$defs/EpochFloor";
402
+ readonly description: "The room's epoch floor the recipient now holds — the highest it has learnt from any source. Absent when it holds none. `earliestReadableEpoch` is never below it.";
403
+ };
404
+ readonly ext: {
405
+ readonly $ref: "#/$defs/Ext";
406
+ };
407
+ };
408
+ };
409
+ readonly Ext: {
410
+ readonly title: "Ext";
411
+ 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.";
412
+ readonly type: "object";
413
+ readonly minProperties: 1;
414
+ readonly additionalProperties: true;
415
+ readonly propertyNames: {
416
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
417
+ };
418
+ };
419
+ readonly EpochFloor: {
420
+ readonly title: "EpochFloor";
421
+ readonly type: "integer";
422
+ readonly minimum: 1;
423
+ readonly description: "The earliest epoch whose storage key a room still lets anybody derive: its chain was pruned below it (`rooms/epoch/prune`), and every epoch under it is meant to be unreadable — at the host, and, as far as each of them conforms, at every member's key holder. Absent means the room's chain has never been pruned.\n\n**The off-by-one, stated once.** A rung (`EpochLink`) numbered `e` opens with epoch `e`'s key and yields epoch `e − 1`'s. A prune with `beforeEpoch: N` drops the rungs numbered below `N`, so rung `N` survives and still yields epoch `N − 1`'s key; the floor after it is therefore `N − 1`, never `N`. A party applying a floor `F` discards the rungs numbered `F` and below — rung `F` would yield `F − 1` — and every key for an epoch below `F`.\n\n**Monotonic.** A floor only rises. A host raises the room's to the higher of the floor it held and `beforeEpoch − 1` at each prune it performs, and never lowers it; every other party keeps the highest it has learnt for the room, from any source, and never lowers it either. A lower floor learnt later — from a stale response, or a host that has not been pruned — changes nothing.\n\n**A host** that holds a floor for a room MUST NOT store, accept or serve a rung numbered at or below it, and MUST serve the floor wherever a response can carry it (`rooms/epoch/chain` 0.2, `rooms/epoch/prune` 0.2).\n\n**A member's key holder** — and any client of the member that keeps the room's rungs or keys itself — on learning a floor `F` above the one it held, by any means (`rooms/epoch/chain` 0.2 in its own reads, `rooms/keys/backfill` 0.2, `rooms/keys/chain` 0.2 from its principal):\n 1. MUST discard every rung it holds for the room numbered `F` or below, and every storage key, file key or other key material it holds or has cached for an epoch below `F` — including one it derived in passing while applying commits through those epochs (`rooms/keys/commit`, `rooms/epoch/commits`);\n 2. MUST NOT store such a rung or key again from any source — a delivery from its principal, a backfill, a repair, a catch-up, or a host that has not been pruned — and MUST NOT ask for one;\n 3. MUST refuse to derive or use a key for an epoch below `F`, answering exactly as it answers for an epoch its chain does not reach (`beyondChain`, with an earliest epoch at or above `F`), whatever it still holds;\n 4. MUST keep `F` itself for as long as it holds anything for the room, since it is what makes items 2 and 3 enforceable after the material is gone.\n\nA key holder SHOULD learn the floor whenever it fetches rungs or catches up, and SHOULD ask for it — a `rooms/epoch/chain` 0.2 read carries it whatever `fromEpoch` and `limit` it names — at least as often as it otherwise reads the room. One that never asks never learns, and keeps what it held.\n\n**What a floor does not do, stated plainly.** It is honoured by parties that conform; it does not reach into one that does not, and it recalls nothing. Plaintext a key holder already returned, records a member already opened, files already downloaded and decrypted, exports, and any key a member's own software extracted are beyond it. What it guarantees cryptographically is what the prune guarantees: a party that had not derived a key below the floor before the host erased its rungs can never derive it afterwards. What it adds is that every conforming key holder stops being able to — so that a restart, a new device or an agent's next recall reads nothing below the floor, rather than everything its holder happened to keep.";
424
+ };
425
+ readonly EpochLink: {
426
+ readonly title: "EpochLink";
427
+ readonly type: "object";
428
+ readonly additionalProperties: false;
429
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
430
+ 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.";
431
+ readonly properties: {
432
+ readonly epoch: {
433
+ readonly type: "integer";
434
+ readonly minimum: 2;
435
+ 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.";
436
+ };
437
+ readonly wrapped: {
438
+ readonly type: "string";
439
+ 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.";
440
+ };
441
+ readonly nonce: {
442
+ readonly type: "string";
443
+ readonly description: "AEAD nonce, base64url.";
444
+ };
445
+ };
446
+ };
447
+ };
448
+ };
449
+ };
450
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/chain/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAGpF,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC,GAAG;IACF;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;AAE3C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,kDAA2D,CAAC;AAEpF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAE5C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,2DAAoE,CAAC;AAEtG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwHjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgF1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}