@openvtc/trust-tasks 0.23.8 → 0.24.0

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 (298) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/_shared/components.d.ts +2451 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/oob/_shared/0.1/oob.d.ts +16 -0
  5. package/dist/auth/oob/_shared/0.1/oob.d.ts.map +1 -0
  6. package/dist/auth/oob/_shared/0.1/oob.js +6 -0
  7. package/dist/auth/oob/_shared/0.1/oob.js.map +1 -0
  8. package/dist/auth/oob/cancel/0.1/payload.d.ts +262 -0
  9. package/dist/auth/oob/cancel/0.1/payload.d.ts.map +1 -0
  10. package/dist/auth/oob/cancel/0.1/payload.js +153 -0
  11. package/dist/auth/oob/cancel/0.1/payload.js.map +1 -0
  12. package/dist/auth/oob/claim/0.1/payload.d.ts +463 -0
  13. package/dist/auth/oob/claim/0.1/payload.d.ts.map +1 -0
  14. package/dist/auth/oob/claim/0.1/payload.js +264 -0
  15. package/dist/auth/oob/claim/0.1/payload.js.map +1 -0
  16. package/dist/auth/oob/grant/0.1/payload.d.ts +212 -0
  17. package/dist/auth/oob/grant/0.1/payload.d.ts.map +1 -0
  18. package/dist/auth/oob/grant/0.1/payload.js +117 -0
  19. package/dist/auth/oob/grant/0.1/payload.js.map +1 -0
  20. package/dist/auth/oob/identify/0.1/payload.d.ts +145 -0
  21. package/dist/auth/oob/identify/0.1/payload.d.ts.map +1 -0
  22. package/dist/auth/oob/identify/0.1/payload.js +81 -0
  23. package/dist/auth/oob/identify/0.1/payload.js.map +1 -0
  24. package/dist/auth/oob/prove/0.1/payload.d.ts +740 -0
  25. package/dist/auth/oob/prove/0.1/payload.d.ts.map +1 -0
  26. package/dist/auth/oob/prove/0.1/payload.js +422 -0
  27. package/dist/auth/oob/prove/0.1/payload.js.map +1 -0
  28. package/dist/auth/oob/redeem/0.1/payload.d.ts +364 -0
  29. package/dist/auth/oob/redeem/0.1/payload.d.ts.map +1 -0
  30. package/dist/auth/oob/redeem/0.1/payload.js +199 -0
  31. package/dist/auth/oob/redeem/0.1/payload.js.map +1 -0
  32. package/dist/auth/oob/request/0.1/payload.d.ts +330 -0
  33. package/dist/auth/oob/request/0.1/payload.d.ts.map +1 -0
  34. package/dist/auth/oob/request/0.1/payload.js +193 -0
  35. package/dist/auth/oob/request/0.1/payload.js.map +1 -0
  36. package/dist/auth/oob/respond/0.1/payload.d.ts +235 -0
  37. package/dist/auth/oob/respond/0.1/payload.d.ts.map +1 -0
  38. package/dist/auth/oob/respond/0.1/payload.js +140 -0
  39. package/dist/auth/oob/respond/0.1/payload.js.map +1 -0
  40. package/dist/device/list/0.1/payload.d.ts +4 -4
  41. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  42. package/dist/device/list/0.1/payload.js +6 -2
  43. package/dist/device/list/0.1/payload.js.map +1 -1
  44. package/dist/device/list/0.2/payload.d.ts +4 -4
  45. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  46. package/dist/device/list/0.2/payload.js +6 -2
  47. package/dist/device/list/0.2/payload.js.map +1 -1
  48. package/dist/device/register/0.1/payload.d.ts +4 -4
  49. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  50. package/dist/device/register/0.1/payload.js +6 -2
  51. package/dist/device/register/0.1/payload.js.map +1 -1
  52. package/dist/device/register/0.2/payload.d.ts +4 -4
  53. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  54. package/dist/device/register/0.2/payload.js +6 -2
  55. package/dist/device/register/0.2/payload.js.map +1 -1
  56. package/dist/external/_shared/0.1/accounts.d.ts +18 -0
  57. package/dist/external/_shared/0.1/accounts.d.ts.map +1 -0
  58. package/dist/external/_shared/0.1/accounts.js +6 -0
  59. package/dist/external/_shared/0.1/accounts.js.map +1 -0
  60. package/dist/external/accounts/archive/0.1/payload.d.ts +2945 -0
  61. package/dist/external/accounts/archive/0.1/payload.d.ts.map +1 -0
  62. package/dist/external/accounts/archive/0.1/payload.js +1736 -0
  63. package/dist/external/accounts/archive/0.1/payload.js.map +1 -0
  64. package/dist/external/accounts/bindings/grant/0.1/payload.d.ts +2938 -0
  65. package/dist/external/accounts/bindings/grant/0.1/payload.d.ts.map +1 -0
  66. package/dist/external/accounts/bindings/grant/0.1/payload.js +1735 -0
  67. package/dist/external/accounts/bindings/grant/0.1/payload.js.map +1 -0
  68. package/dist/external/accounts/bindings/revoke/0.1/payload.d.ts +2958 -0
  69. package/dist/external/accounts/bindings/revoke/0.1/payload.d.ts.map +1 -0
  70. package/dist/external/accounts/bindings/revoke/0.1/payload.js +1743 -0
  71. package/dist/external/accounts/bindings/revoke/0.1/payload.js.map +1 -0
  72. package/dist/external/accounts/create/0.1/payload.d.ts +2954 -0
  73. package/dist/external/accounts/create/0.1/payload.d.ts.map +1 -0
  74. package/dist/external/accounts/create/0.1/payload.js +1742 -0
  75. package/dist/external/accounts/create/0.1/payload.js.map +1 -0
  76. package/dist/external/accounts/delete/0.1/payload.d.ts +310 -0
  77. package/dist/external/accounts/delete/0.1/payload.d.ts.map +1 -0
  78. package/dist/external/accounts/delete/0.1/payload.js +176 -0
  79. package/dist/external/accounts/delete/0.1/payload.js.map +1 -0
  80. package/dist/external/accounts/get/0.1/payload.d.ts +2931 -0
  81. package/dist/external/accounts/get/0.1/payload.d.ts.map +1 -0
  82. package/dist/external/accounts/get/0.1/payload.js +1731 -0
  83. package/dist/external/accounts/get/0.1/payload.js.map +1 -0
  84. package/dist/external/accounts/keys/rotate/0.1/payload.d.ts +3216 -0
  85. package/dist/external/accounts/keys/rotate/0.1/payload.d.ts.map +1 -0
  86. package/dist/external/accounts/keys/rotate/0.1/payload.js +1912 -0
  87. package/dist/external/accounts/keys/rotate/0.1/payload.js.map +1 -0
  88. package/dist/external/accounts/list/0.1/payload.d.ts +3034 -0
  89. package/dist/external/accounts/list/0.1/payload.d.ts.map +1 -0
  90. package/dist/external/accounts/list/0.1/payload.js +1791 -0
  91. package/dist/external/accounts/list/0.1/payload.js.map +1 -0
  92. package/dist/external/accounts/probe/0.1/payload.d.ts +511 -0
  93. package/dist/external/accounts/probe/0.1/payload.d.ts.map +1 -0
  94. package/dist/external/accounts/probe/0.1/payload.js +307 -0
  95. package/dist/external/accounts/probe/0.1/payload.js.map +1 -0
  96. package/dist/external/accounts/restore/0.1/payload.d.ts +2945 -0
  97. package/dist/external/accounts/restore/0.1/payload.d.ts.map +1 -0
  98. package/dist/external/accounts/restore/0.1/payload.js +1736 -0
  99. package/dist/external/accounts/restore/0.1/payload.js.map +1 -0
  100. package/dist/external/accounts/resume/0.1/payload.d.ts +2945 -0
  101. package/dist/external/accounts/resume/0.1/payload.d.ts.map +1 -0
  102. package/dist/external/accounts/resume/0.1/payload.js +1736 -0
  103. package/dist/external/accounts/resume/0.1/payload.js.map +1 -0
  104. package/dist/external/accounts/secret/set/0.1/payload.d.ts +379 -0
  105. package/dist/external/accounts/secret/set/0.1/payload.d.ts.map +1 -0
  106. package/dist/external/accounts/secret/set/0.1/payload.js +212 -0
  107. package/dist/external/accounts/secret/set/0.1/payload.js.map +1 -0
  108. package/dist/external/accounts/setup/0.1/payload.d.ts +535 -0
  109. package/dist/external/accounts/setup/0.1/payload.d.ts.map +1 -0
  110. package/dist/external/accounts/setup/0.1/payload.js +325 -0
  111. package/dist/external/accounts/setup/0.1/payload.js.map +1 -0
  112. package/dist/external/accounts/suspend/0.1/payload.d.ts +2945 -0
  113. package/dist/external/accounts/suspend/0.1/payload.d.ts.map +1 -0
  114. package/dist/external/accounts/suspend/0.1/payload.js +1736 -0
  115. package/dist/external/accounts/suspend/0.1/payload.js.map +1 -0
  116. package/dist/external/accounts/update/0.1/payload.d.ts +2949 -0
  117. package/dist/external/accounts/update/0.1/payload.d.ts.map +1 -0
  118. package/dist/external/accounts/update/0.1/payload.js +1739 -0
  119. package/dist/external/accounts/update/0.1/payload.js.map +1 -0
  120. package/dist/external/credentials/issue/0.1/payload.d.ts +586 -0
  121. package/dist/external/credentials/issue/0.1/payload.d.ts.map +1 -0
  122. package/dist/external/credentials/issue/0.1/payload.js +322 -0
  123. package/dist/external/credentials/issue/0.1/payload.js.map +1 -0
  124. package/dist/external/sign/0.1/payload.d.ts +348 -0
  125. package/dist/external/sign/0.1/payload.d.ts.map +1 -0
  126. package/dist/external/sign/0.1/payload.js +193 -0
  127. package/dist/external/sign/0.1/payload.js.map +1 -0
  128. package/dist/index.d.ts +53 -0
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +53 -0
  131. package/dist/index.js.map +1 -1
  132. package/dist/rooms/_shared/0.1/blobs.d.ts +16 -0
  133. package/dist/rooms/_shared/0.1/blobs.d.ts.map +1 -0
  134. package/dist/rooms/_shared/0.1/blobs.js +6 -0
  135. package/dist/rooms/_shared/0.1/blobs.js.map +1 -0
  136. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  137. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  138. package/dist/rooms/blobs/chunk/0.1/payload.d.ts +375 -0
  139. package/dist/rooms/blobs/chunk/0.1/payload.d.ts.map +1 -0
  140. package/dist/rooms/blobs/chunk/0.1/payload.js +213 -0
  141. package/dist/rooms/blobs/chunk/0.1/payload.js.map +1 -0
  142. package/dist/rooms/blobs/get/0.1/payload.d.ts +743 -0
  143. package/dist/rooms/blobs/get/0.1/payload.d.ts.map +1 -0
  144. package/dist/rooms/blobs/get/0.1/payload.js +415 -0
  145. package/dist/rooms/blobs/get/0.1/payload.js.map +1 -0
  146. package/dist/rooms/blobs/upload/abort/0.1/payload.d.ts +263 -0
  147. package/dist/rooms/blobs/upload/abort/0.1/payload.d.ts.map +1 -0
  148. package/dist/rooms/blobs/upload/abort/0.1/payload.js +151 -0
  149. package/dist/rooms/blobs/upload/abort/0.1/payload.js.map +1 -0
  150. package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts +793 -0
  151. package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts.map +1 -0
  152. package/dist/rooms/blobs/upload/begin/0.1/payload.js +437 -0
  153. package/dist/rooms/blobs/upload/begin/0.1/payload.js.map +1 -0
  154. package/dist/rooms/blobs/upload/chunk/0.1/payload.d.ts +459 -0
  155. package/dist/rooms/blobs/upload/chunk/0.1/payload.d.ts.map +1 -0
  156. package/dist/rooms/blobs/upload/chunk/0.1/payload.js +256 -0
  157. package/dist/rooms/blobs/upload/chunk/0.1/payload.js.map +1 -0
  158. package/dist/rooms/blobs/upload/commit/0.1/payload.d.ts +326 -0
  159. package/dist/rooms/blobs/upload/commit/0.1/payload.d.ts.map +1 -0
  160. package/dist/rooms/blobs/upload/commit/0.1/payload.js +185 -0
  161. package/dist/rooms/blobs/upload/commit/0.1/payload.js.map +1 -0
  162. package/dist/rooms/info/0.1/payload.d.ts +897 -0
  163. package/dist/rooms/info/0.1/payload.d.ts.map +1 -0
  164. package/dist/rooms/info/0.1/payload.js +498 -0
  165. package/dist/rooms/info/0.1/payload.js.map +1 -0
  166. package/dist/rooms/keys/file-key/0.1/payload.d.ts +306 -0
  167. package/dist/rooms/keys/file-key/0.1/payload.d.ts.map +1 -0
  168. package/dist/rooms/keys/file-key/0.1/payload.js +167 -0
  169. package/dist/rooms/keys/file-key/0.1/payload.js.map +1 -0
  170. package/dist/rooms/records/get/0.2/payload.d.ts +954 -0
  171. package/dist/rooms/records/get/0.2/payload.d.ts.map +1 -0
  172. package/dist/rooms/records/get/0.2/payload.js +515 -0
  173. package/dist/rooms/records/get/0.2/payload.js.map +1 -0
  174. package/dist/rooms/records/list/0.2/payload.d.ts +854 -0
  175. package/dist/rooms/records/list/0.2/payload.d.ts.map +1 -0
  176. package/dist/rooms/records/list/0.2/payload.js +462 -0
  177. package/dist/rooms/records/list/0.2/payload.js.map +1 -0
  178. package/dist/rooms/records/put/0.2/payload.d.ts +679 -0
  179. package/dist/rooms/records/put/0.2/payload.d.ts.map +1 -0
  180. package/dist/rooms/records/put/0.2/payload.js +357 -0
  181. package/dist/rooms/records/put/0.2/payload.js.map +1 -0
  182. package/dist/rooms/usage/0.1/payload.d.ts +795 -0
  183. package/dist/rooms/usage/0.1/payload.d.ts.map +1 -0
  184. package/dist/rooms/usage/0.1/payload.js +417 -0
  185. package/dist/rooms/usage/0.1/payload.js.map +1 -0
  186. package/dist/vtc/_shared/0.1/room-storage.d.ts +16 -0
  187. package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -0
  188. package/dist/vtc/_shared/0.1/room-storage.js +6 -0
  189. package/dist/vtc/_shared/0.1/room-storage.js.map +1 -0
  190. package/dist/vtc/rooms/get/0.1/payload.d.ts +1813 -0
  191. package/dist/vtc/rooms/get/0.1/payload.d.ts.map +1 -0
  192. package/dist/vtc/rooms/get/0.1/payload.js +892 -0
  193. package/dist/vtc/rooms/get/0.1/payload.js.map +1 -0
  194. package/dist/vtc/rooms/limits/set/0.1/payload.d.ts +873 -0
  195. package/dist/vtc/rooms/limits/set/0.1/payload.d.ts.map +1 -0
  196. package/dist/vtc/rooms/limits/set/0.1/payload.js +489 -0
  197. package/dist/vtc/rooms/limits/set/0.1/payload.js.map +1 -0
  198. package/dist/vtc/rooms/storage/assign/0.1/payload.d.ts +341 -0
  199. package/dist/vtc/rooms/storage/assign/0.1/payload.d.ts.map +1 -0
  200. package/dist/vtc/rooms/storage/assign/0.1/payload.js +191 -0
  201. package/dist/vtc/rooms/storage/assign/0.1/payload.js.map +1 -0
  202. package/dist/vtc/rooms/storage/migrate/0.1/payload.d.ts +452 -0
  203. package/dist/vtc/rooms/storage/migrate/0.1/payload.d.ts.map +1 -0
  204. package/dist/vtc/rooms/storage/migrate/0.1/payload.js +260 -0
  205. package/dist/vtc/rooms/storage/migrate/0.1/payload.js.map +1 -0
  206. package/dist/vtc/rooms/usage/0.1/payload.d.ts +880 -0
  207. package/dist/vtc/rooms/usage/0.1/payload.d.ts.map +1 -0
  208. package/dist/vtc/rooms/usage/0.1/payload.js +457 -0
  209. package/dist/vtc/rooms/usage/0.1/payload.js.map +1 -0
  210. package/dist/vtc/storage/configs/create/0.1/payload.d.ts +1272 -0
  211. package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -0
  212. package/dist/vtc/storage/configs/create/0.1/payload.js +737 -0
  213. package/dist/vtc/storage/configs/create/0.1/payload.js.map +1 -0
  214. package/dist/vtc/storage/configs/get/0.1/payload.d.ts +1750 -0
  215. package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -0
  216. package/dist/vtc/storage/configs/get/0.1/payload.js +1019 -0
  217. package/dist/vtc/storage/configs/get/0.1/payload.js.map +1 -0
  218. package/dist/vtc/storage/configs/list/0.1/payload.d.ts +1851 -0
  219. package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -0
  220. package/dist/vtc/storage/configs/list/0.1/payload.js +1069 -0
  221. package/dist/vtc/storage/configs/list/0.1/payload.js.map +1 -0
  222. package/dist/vtc/storage/configs/probe/0.1/payload.d.ts +459 -0
  223. package/dist/vtc/storage/configs/probe/0.1/payload.d.ts.map +1 -0
  224. package/dist/vtc/storage/configs/probe/0.1/payload.js +267 -0
  225. package/dist/vtc/storage/configs/probe/0.1/payload.js.map +1 -0
  226. package/dist/vtc/storage/configs/retire/0.1/payload.d.ts +294 -0
  227. package/dist/vtc/storage/configs/retire/0.1/payload.d.ts.map +1 -0
  228. package/dist/vtc/storage/configs/retire/0.1/payload.js +176 -0
  229. package/dist/vtc/storage/configs/retire/0.1/payload.js.map +1 -0
  230. package/dist/vtc/storage/configs/update/0.1/payload.d.ts +1274 -0
  231. package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -0
  232. package/dist/vtc/storage/configs/update/0.1/payload.js +736 -0
  233. package/dist/vtc/storage/configs/update/0.1/payload.js.map +1 -0
  234. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +511 -0
  235. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -0
  236. package/dist/vtc/storage/credentials/set/0.1/payload.js +293 -0
  237. package/dist/vtc/storage/credentials/set/0.1/payload.js.map +1 -0
  238. package/package.json +1 -1
  239. package/src/_shared/components.ts +2539 -4
  240. package/src/auth/oob/_shared/0.1/oob.ts +17 -0
  241. package/src/auth/oob/cancel/0.1/payload.ts +188 -0
  242. package/src/auth/oob/claim/0.1/payload.ts +306 -0
  243. package/src/auth/oob/grant/0.1/payload.ts +159 -0
  244. package/src/auth/oob/identify/0.1/payload.ts +110 -0
  245. package/src/auth/oob/prove/0.1/payload.ts +473 -0
  246. package/src/auth/oob/redeem/0.1/payload.ts +248 -0
  247. package/src/auth/oob/request/0.1/payload.ts +230 -0
  248. package/src/auth/oob/respond/0.1/payload.ts +178 -0
  249. package/src/device/list/0.1/payload.ts +6 -2
  250. package/src/device/list/0.2/payload.ts +6 -2
  251. package/src/device/register/0.1/payload.ts +6 -2
  252. package/src/device/register/0.2/payload.ts +6 -2
  253. package/src/external/_shared/0.1/accounts.ts +19 -0
  254. package/src/external/accounts/archive/0.1/payload.ts +1770 -0
  255. package/src/external/accounts/bindings/grant/0.1/payload.ts +1766 -0
  256. package/src/external/accounts/bindings/revoke/0.1/payload.ts +1778 -0
  257. package/src/external/accounts/create/0.1/payload.ts +1777 -0
  258. package/src/external/accounts/delete/0.1/payload.ts +211 -0
  259. package/src/external/accounts/get/0.1/payload.ts +1761 -0
  260. package/src/external/accounts/keys/rotate/0.1/payload.ts +1947 -0
  261. package/src/external/accounts/list/0.1/payload.ts +1834 -0
  262. package/src/external/accounts/probe/0.1/payload.ts +337 -0
  263. package/src/external/accounts/restore/0.1/payload.ts +1770 -0
  264. package/src/external/accounts/resume/0.1/payload.ts +1770 -0
  265. package/src/external/accounts/secret/set/0.1/payload.ts +248 -0
  266. package/src/external/accounts/setup/0.1/payload.ts +355 -0
  267. package/src/external/accounts/suspend/0.1/payload.ts +1770 -0
  268. package/src/external/accounts/update/0.1/payload.ts +1771 -0
  269. package/src/external/credentials/issue/0.1/payload.ts +365 -0
  270. package/src/external/sign/0.1/payload.ts +234 -0
  271. package/src/index.ts +53 -0
  272. package/src/rooms/_shared/0.1/blobs.ts +17 -0
  273. package/src/rooms/_shared/0.1/room.ts +1 -1
  274. package/src/rooms/blobs/chunk/0.1/payload.ts +251 -0
  275. package/src/rooms/blobs/get/0.1/payload.ts +463 -0
  276. package/src/rooms/blobs/upload/abort/0.1/payload.ts +187 -0
  277. package/src/rooms/blobs/upload/begin/0.1/payload.ts +491 -0
  278. package/src/rooms/blobs/upload/chunk/0.1/payload.ts +304 -0
  279. package/src/rooms/blobs/upload/commit/0.1/payload.ts +224 -0
  280. package/src/rooms/info/0.1/payload.ts +572 -0
  281. package/src/rooms/keys/file-key/0.1/payload.ts +224 -0
  282. package/src/rooms/records/get/0.2/payload.ts +614 -0
  283. package/src/rooms/records/list/0.2/payload.ts +533 -0
  284. package/src/rooms/records/put/0.2/payload.ts +441 -0
  285. package/src/rooms/usage/0.1/payload.ts +499 -0
  286. package/src/vtc/_shared/0.1/room-storage.ts +17 -0
  287. package/src/vtc/rooms/get/0.1/payload.ts +1275 -0
  288. package/src/vtc/rooms/limits/set/0.1/payload.ts +555 -0
  289. package/src/vtc/rooms/storage/assign/0.1/payload.ts +237 -0
  290. package/src/vtc/rooms/storage/migrate/0.1/payload.ts +317 -0
  291. package/src/vtc/rooms/usage/0.1/payload.ts +568 -0
  292. package/src/vtc/storage/configs/create/0.1/payload.ts +784 -0
  293. package/src/vtc/storage/configs/get/0.1/payload.ts +1054 -0
  294. package/src/vtc/storage/configs/list/0.1/payload.ts +1121 -0
  295. package/src/vtc/storage/configs/probe/0.1/payload.ts +329 -0
  296. package/src/vtc/storage/configs/retire/0.1/payload.ts +211 -0
  297. package/src/vtc/storage/configs/update/0.1/payload.ts +783 -0
  298. package/src/vtc/storage/credentials/set/0.1/payload.ts +339 -0
@@ -0,0 +1,491 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/blobs/upload/begin/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { AuthorityPresentation, BlobManifest, ChunkCount, ChunkIndex, ChunkManifest, ChunkSize, DigestMultibase, ExpectedSizeBytes, ExpiresAt, Ext, TransferId } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Open an upload of one file's ciphertext into a data room, committing to its size and to the digest of every chunk before any byte moves, and reserving room for it against every limit that applies. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface RoomsBlobsUploadBeginPayload {
13
+ /**
14
+ * The room the file is for. The host verifies the presentation against credentials this identifier issued, never against a member list of its own.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * Must confer the `write` action at this room's scope. Its leaf's subject must be the party the host authenticated for this request.
19
+ */
20
+ presentation: AuthorityPresentation;
21
+ /**
22
+ * The ciphertext manifest. Its digest is the BlobRef the blob will have once committed.
23
+ */
24
+ manifest: BlobManifest;
25
+ ext?: Ext;
26
+ }
27
+ /**
28
+ * Success response to rooms/blobs/upload/begin. Type https://trusttasks.org/spec/rooms/blobs/upload/begin/0.1#response.
29
+ */
30
+ export interface RoomsBlobsUploadBeginResponsePayload {
31
+ uploadId: TransferId;
32
+ /**
33
+ * The chunk indices the host does not yet hold, in ascending order. Every index on a new upload; only what is left on a resumed one; none when `alreadyCommitted` is true. Empty means the upload can be committed.
34
+ *
35
+ * @maxItems 4096
36
+ */
37
+ missing: ChunkIndex[];
38
+ expiresAt: ExpiresAt;
39
+ /**
40
+ * True when the manifest's BlobRef is already committed in this room. `missing` is then empty, nothing was reserved, and commit returns the existing blob without charging it again. Absent or false on every other answer.
41
+ */
42
+ alreadyCommitted?: boolean;
43
+ ext?: Ext;
44
+ }
45
+
46
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
47
+ export type { AuthorityPresentation, BlobManifest, ChunkCount, ChunkIndex, ChunkManifest, ChunkSize, DigestMultibase, ExpectedSizeBytes, ExpiresAt, Ext, TransferId };
48
+
49
+ /** Trust Task type URI. */
50
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/blobs/upload/begin/0.1" as const;
51
+
52
+ /** Stable alias for this specification's request payload shape. */
53
+ export type Payload = RoomsBlobsUploadBeginPayload;
54
+
55
+ /** Trust Task response type URI (request type URI + "#response"). */
56
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/blobs/upload/begin/0.1#response" as const;
57
+
58
+ /** Stable alias for this specification's success-response payload shape. */
59
+ export type Response = RoomsBlobsUploadBeginResponsePayload;
60
+
61
+ /**
62
+ * This specification's payload schema, as a value.
63
+ *
64
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
65
+ * rather than only as a `.json` file because TypeScript types are erased
66
+ * at runtime: without a schema a consumer has nothing to validate, and
67
+ * every REQUIRED payload member is optional in practice. Cross-file
68
+ * `$ref`s are already inlined, so it needs no resolver.
69
+ */
70
+ export const PAYLOAD_SCHEMA = {
71
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
72
+ "$id": "https://trusttasks.org/spec/rooms/blobs/upload/begin/0.1",
73
+ "title": "Rooms Blobs — Upload — Begin — payload",
74
+ "description": "Open an upload of one file's ciphertext into a data room, committing to its size and to the digest of every chunk before any byte moves, and reserving room for it against every limit that applies. The outer document members are owned by the framework — SPEC §6.3.",
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "roomId",
79
+ "presentation",
80
+ "manifest"
81
+ ],
82
+ "properties": {
83
+ "roomId": {
84
+ "type": "string",
85
+ "maxLength": 2048,
86
+ "description": "The room the file is for. The host verifies the presentation against credentials this identifier issued, never against a member list of its own."
87
+ },
88
+ "presentation": {
89
+ "$ref": "#/$defs/AuthorityPresentation",
90
+ "description": "Must confer the `write` action at this room's scope. Its leaf's subject must be the party the host authenticated for this request."
91
+ },
92
+ "manifest": {
93
+ "$ref": "#/$defs/BlobManifest",
94
+ "description": "The ciphertext manifest. Its digest is the BlobRef the blob will have once committed."
95
+ },
96
+ "ext": {
97
+ "$ref": "#/$defs/Ext"
98
+ }
99
+ },
100
+ "$defs": {
101
+ "Response": {
102
+ "$anchor": "response",
103
+ "title": "Rooms Blobs — Upload — Begin — response payload",
104
+ "description": "Success response to rooms/blobs/upload/begin. Type https://trusttasks.org/spec/rooms/blobs/upload/begin/0.1#response.",
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "uploadId",
109
+ "missing",
110
+ "expiresAt"
111
+ ],
112
+ "properties": {
113
+ "uploadId": {
114
+ "$ref": "#/$defs/TransferId"
115
+ },
116
+ "missing": {
117
+ "type": "array",
118
+ "maxItems": 4096,
119
+ "uniqueItems": true,
120
+ "items": {
121
+ "$ref": "#/$defs/ChunkIndex"
122
+ },
123
+ "description": "The chunk indices the host does not yet hold, in ascending order. Every index on a new upload; only what is left on a resumed one; none when `alreadyCommitted` is true. Empty means the upload can be committed."
124
+ },
125
+ "expiresAt": {
126
+ "$ref": "#/$defs/ExpiresAt"
127
+ },
128
+ "alreadyCommitted": {
129
+ "type": "boolean",
130
+ "description": "True when the manifest's BlobRef is already committed in this room. `missing` is then empty, nothing was reserved, and commit returns the existing blob without charging it again. Absent or false on every other answer."
131
+ },
132
+ "ext": {
133
+ "$ref": "#/$defs/Ext"
134
+ }
135
+ }
136
+ },
137
+ "Ext": {
138
+ "title": "Ext",
139
+ "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.",
140
+ "type": "object",
141
+ "minProperties": 1,
142
+ "additionalProperties": true,
143
+ "propertyNames": {
144
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
145
+ }
146
+ },
147
+ "ExpiresAt": {
148
+ "title": "ExpiresAt",
149
+ "description": "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.",
150
+ "type": "string",
151
+ "format": "date-time"
152
+ },
153
+ "ChunkIndex": {
154
+ "title": "ChunkIndex",
155
+ "description": "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.",
156
+ "type": "integer",
157
+ "minimum": 0,
158
+ "maximum": 4095
159
+ },
160
+ "TransferId": {
161
+ "title": "TransferId",
162
+ "type": "string",
163
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
164
+ "description": "Handle for one upload (begin → chunk → commit or abort) or one download (get → chunk). Host-generated and unguessable, which is what lets a reference to another party's transfer be answered as not-found without confirming that it exists. Bound at creation to the party that opened it: the subject the host authenticated for the opening request. Opaque: a producer quotes what it was given."
165
+ },
166
+ "BlobManifest": {
167
+ "title": "BlobManifest",
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": [
171
+ "size",
172
+ "chunks",
173
+ "digest"
174
+ ],
175
+ "description": "The ciphertext manifest of one blob, committed by the uploader before any byte moves. Its digest is the BlobRef. Every chunk is checked against `chunks.chunkDigests` on arrival and the reassembled blob against `digest`, so a host can neither accept nor serve bytes the uploader did not commit to. The manifest also appears, by its BlobRef, inside the sealed FileManifest the author signs; a reader who opens the record therefore knows which ciphertext its author meant, and a host cannot substitute a different blob under the same record.\n\nConsistency rules JSON Schema cannot state: `chunks.chunkCount` MUST equal ceil(size / chunks.chunkSize), and `chunks.chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.\n\nEach transfer chunk is exactly one sealed STREAM segment (see FileManifest): every chunk but the last is `chunkSize` bytes, and `chunkSize` is the plaintext segment size plus the 16-byte AEAD tag. The 262144-byte ceiling of ChunkSize therefore puts the largest plaintext segment at 262128 bytes, and the 4096-chunk ceiling of ChunkCount puts the largest blob at 1 GiB of ciphertext.",
176
+ "properties": {
177
+ "size": {
178
+ "$ref": "#/$defs/ExpectedSizeBytes",
179
+ "description": "Ciphertext bytes, padding included. What the host stores, and what every limit and usage figure is stated in."
180
+ },
181
+ "chunks": {
182
+ "$ref": "#/$defs/ChunkManifest"
183
+ },
184
+ "digest": {
185
+ "$ref": "#/$defs/DigestMultibase",
186
+ "description": "Digest of the whole ciphertext, over its bytes. Checked after reassembly, so a correct set of chunks in the wrong order is still caught."
187
+ }
188
+ }
189
+ },
190
+ "DigestMultibase": {
191
+ "title": "DigestMultibase",
192
+ "description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
193
+ "type": "string",
194
+ "minLength": 16,
195
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
196
+ "examples": [
197
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
198
+ ]
199
+ },
200
+ "ChunkManifest": {
201
+ "title": "ChunkManifest",
202
+ "description": "The terms of a `chunkedTrustTask` transfer, committed before any chunk moves. On export the recipient states them in the descriptor; on import the producer pre-commits them in the request and the recipient echoes them. Either way the manifest arrives in a document whose proof is REQUIRED, so the per-chunk digests are authenticated by the party that computed them and each chunk can be verified — and a single bad chunk re-fetched or refused — on arrival rather than only after reassembly.\n\nConsistency rules JSON Schema cannot state: `chunkCount` MUST equal ceil(expectedSizeBytes / chunkSize) for the bundle the manifest describes, and `chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.",
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": [
206
+ "chunkSize",
207
+ "chunkCount",
208
+ "chunkDigests"
209
+ ],
210
+ "properties": {
211
+ "chunkSize": {
212
+ "$ref": "#/$defs/ChunkSize"
213
+ },
214
+ "chunkCount": {
215
+ "$ref": "#/$defs/ChunkCount"
216
+ },
217
+ "chunkDigests": {
218
+ "type": "array",
219
+ "minItems": 1,
220
+ "maxItems": 4096,
221
+ "description": "Digest of each chunk's raw bytes (not of its base64url encoding), in index order. Compared as decoded multihash bytes, never as encoded strings. sha2-256 is RECOMMENDED and MUST be implemented by every party; a party that does not implement the hash a digest names MUST treat the manifest as unverifiable rather than skip the check.",
222
+ "items": {
223
+ "$ref": "#/$defs/DigestMultibase"
224
+ }
225
+ }
226
+ }
227
+ },
228
+ "ChunkCount": {
229
+ "title": "ChunkCount",
230
+ "description": "Number of chunks in the bundle, equal to ceil(expectedSizeBytes / chunkSize). Bounded at 4096 so that the manifest itself — one digest per chunk — fits in the single document that carries it under the same message-size reasoning as a chunk.",
231
+ "type": "integer",
232
+ "minimum": 1,
233
+ "maximum": 4096
234
+ },
235
+ "ChunkSize": {
236
+ "title": "ChunkSize",
237
+ "description": "Size in bytes of every chunk except the last, which carries the remainder and is between 1 and this value inclusive. The ceiling of 262144 (256 KiB) is normative and is derived in `vta/backup/initiate-export/1.1` under Chunked transfer: it is the largest power of two whose `get-chunk` or `put-chunk` document still fits a 1 MiB mediator message after base64url encoding of `data`, DIDComm authcrypt encoding, and two nested forward wrappers. The floor of 16384 keeps a 1 GiB bundle within `ChunkCount`'s ceiling at sizes a constrained transport can still choose.",
238
+ "type": "integer",
239
+ "minimum": 16384,
240
+ "maximum": 262144
241
+ },
242
+ "ExpectedSizeBytes": {
243
+ "title": "ExpectedSizeBytes",
244
+ "description": "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.",
245
+ "type": "integer",
246
+ "minimum": 1
247
+ },
248
+ "AuthorityPresentation": {
249
+ "title": "AuthorityPresentation",
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "required": [
253
+ "membership",
254
+ "authority"
255
+ ],
256
+ "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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
257
+ "properties": {
258
+ "membership": {
259
+ "type": "string",
260
+ "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."
261
+ },
262
+ "authority": {
263
+ "type": "array",
264
+ "minItems": 1,
265
+ "maxItems": 8,
266
+ "items": {
267
+ "type": "string"
268
+ },
269
+ "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."
270
+ },
271
+ "subjectBinding": {
272
+ "type": "string",
273
+ "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."
274
+ }
275
+ }
276
+ }
277
+ }
278
+ } as const;
279
+
280
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
281
+ export const RESPONSE_PAYLOAD_SCHEMA = {
282
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
283
+ "$ref": "#/$defs/Response",
284
+ "$defs": {
285
+ "Response": {
286
+ "$anchor": "response",
287
+ "title": "Rooms Blobs — Upload — Begin — response payload",
288
+ "description": "Success response to rooms/blobs/upload/begin. Type https://trusttasks.org/spec/rooms/blobs/upload/begin/0.1#response.",
289
+ "type": "object",
290
+ "additionalProperties": false,
291
+ "required": [
292
+ "uploadId",
293
+ "missing",
294
+ "expiresAt"
295
+ ],
296
+ "properties": {
297
+ "uploadId": {
298
+ "$ref": "#/$defs/TransferId"
299
+ },
300
+ "missing": {
301
+ "type": "array",
302
+ "maxItems": 4096,
303
+ "uniqueItems": true,
304
+ "items": {
305
+ "$ref": "#/$defs/ChunkIndex"
306
+ },
307
+ "description": "The chunk indices the host does not yet hold, in ascending order. Every index on a new upload; only what is left on a resumed one; none when `alreadyCommitted` is true. Empty means the upload can be committed."
308
+ },
309
+ "expiresAt": {
310
+ "$ref": "#/$defs/ExpiresAt"
311
+ },
312
+ "alreadyCommitted": {
313
+ "type": "boolean",
314
+ "description": "True when the manifest's BlobRef is already committed in this room. `missing` is then empty, nothing was reserved, and commit returns the existing blob without charging it again. Absent or false on every other answer."
315
+ },
316
+ "ext": {
317
+ "$ref": "#/$defs/Ext"
318
+ }
319
+ }
320
+ },
321
+ "Ext": {
322
+ "title": "Ext",
323
+ "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.",
324
+ "type": "object",
325
+ "minProperties": 1,
326
+ "additionalProperties": true,
327
+ "propertyNames": {
328
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
329
+ }
330
+ },
331
+ "ExpiresAt": {
332
+ "title": "ExpiresAt",
333
+ "description": "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.",
334
+ "type": "string",
335
+ "format": "date-time"
336
+ },
337
+ "ChunkIndex": {
338
+ "title": "ChunkIndex",
339
+ "description": "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.",
340
+ "type": "integer",
341
+ "minimum": 0,
342
+ "maximum": 4095
343
+ },
344
+ "TransferId": {
345
+ "title": "TransferId",
346
+ "type": "string",
347
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
348
+ "description": "Handle for one upload (begin → chunk → commit or abort) or one download (get → chunk). Host-generated and unguessable, which is what lets a reference to another party's transfer be answered as not-found without confirming that it exists. Bound at creation to the party that opened it: the subject the host authenticated for the opening request. Opaque: a producer quotes what it was given."
349
+ },
350
+ "BlobManifest": {
351
+ "title": "BlobManifest",
352
+ "type": "object",
353
+ "additionalProperties": false,
354
+ "required": [
355
+ "size",
356
+ "chunks",
357
+ "digest"
358
+ ],
359
+ "description": "The ciphertext manifest of one blob, committed by the uploader before any byte moves. Its digest is the BlobRef. Every chunk is checked against `chunks.chunkDigests` on arrival and the reassembled blob against `digest`, so a host can neither accept nor serve bytes the uploader did not commit to. The manifest also appears, by its BlobRef, inside the sealed FileManifest the author signs; a reader who opens the record therefore knows which ciphertext its author meant, and a host cannot substitute a different blob under the same record.\n\nConsistency rules JSON Schema cannot state: `chunks.chunkCount` MUST equal ceil(size / chunks.chunkSize), and `chunks.chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.\n\nEach transfer chunk is exactly one sealed STREAM segment (see FileManifest): every chunk but the last is `chunkSize` bytes, and `chunkSize` is the plaintext segment size plus the 16-byte AEAD tag. The 262144-byte ceiling of ChunkSize therefore puts the largest plaintext segment at 262128 bytes, and the 4096-chunk ceiling of ChunkCount puts the largest blob at 1 GiB of ciphertext.",
360
+ "properties": {
361
+ "size": {
362
+ "$ref": "#/$defs/ExpectedSizeBytes",
363
+ "description": "Ciphertext bytes, padding included. What the host stores, and what every limit and usage figure is stated in."
364
+ },
365
+ "chunks": {
366
+ "$ref": "#/$defs/ChunkManifest"
367
+ },
368
+ "digest": {
369
+ "$ref": "#/$defs/DigestMultibase",
370
+ "description": "Digest of the whole ciphertext, over its bytes. Checked after reassembly, so a correct set of chunks in the wrong order is still caught."
371
+ }
372
+ }
373
+ },
374
+ "DigestMultibase": {
375
+ "title": "DigestMultibase",
376
+ "description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
377
+ "type": "string",
378
+ "minLength": 16,
379
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
380
+ "examples": [
381
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
382
+ ]
383
+ },
384
+ "ChunkManifest": {
385
+ "title": "ChunkManifest",
386
+ "description": "The terms of a `chunkedTrustTask` transfer, committed before any chunk moves. On export the recipient states them in the descriptor; on import the producer pre-commits them in the request and the recipient echoes them. Either way the manifest arrives in a document whose proof is REQUIRED, so the per-chunk digests are authenticated by the party that computed them and each chunk can be verified — and a single bad chunk re-fetched or refused — on arrival rather than only after reassembly.\n\nConsistency rules JSON Schema cannot state: `chunkCount` MUST equal ceil(expectedSizeBytes / chunkSize) for the bundle the manifest describes, and `chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.",
387
+ "type": "object",
388
+ "additionalProperties": false,
389
+ "required": [
390
+ "chunkSize",
391
+ "chunkCount",
392
+ "chunkDigests"
393
+ ],
394
+ "properties": {
395
+ "chunkSize": {
396
+ "$ref": "#/$defs/ChunkSize"
397
+ },
398
+ "chunkCount": {
399
+ "$ref": "#/$defs/ChunkCount"
400
+ },
401
+ "chunkDigests": {
402
+ "type": "array",
403
+ "minItems": 1,
404
+ "maxItems": 4096,
405
+ "description": "Digest of each chunk's raw bytes (not of its base64url encoding), in index order. Compared as decoded multihash bytes, never as encoded strings. sha2-256 is RECOMMENDED and MUST be implemented by every party; a party that does not implement the hash a digest names MUST treat the manifest as unverifiable rather than skip the check.",
406
+ "items": {
407
+ "$ref": "#/$defs/DigestMultibase"
408
+ }
409
+ }
410
+ }
411
+ },
412
+ "ChunkCount": {
413
+ "title": "ChunkCount",
414
+ "description": "Number of chunks in the bundle, equal to ceil(expectedSizeBytes / chunkSize). Bounded at 4096 so that the manifest itself — one digest per chunk — fits in the single document that carries it under the same message-size reasoning as a chunk.",
415
+ "type": "integer",
416
+ "minimum": 1,
417
+ "maximum": 4096
418
+ },
419
+ "ChunkSize": {
420
+ "title": "ChunkSize",
421
+ "description": "Size in bytes of every chunk except the last, which carries the remainder and is between 1 and this value inclusive. The ceiling of 262144 (256 KiB) is normative and is derived in `vta/backup/initiate-export/1.1` under Chunked transfer: it is the largest power of two whose `get-chunk` or `put-chunk` document still fits a 1 MiB mediator message after base64url encoding of `data`, DIDComm authcrypt encoding, and two nested forward wrappers. The floor of 16384 keeps a 1 GiB bundle within `ChunkCount`'s ceiling at sizes a constrained transport can still choose.",
422
+ "type": "integer",
423
+ "minimum": 16384,
424
+ "maximum": 262144
425
+ },
426
+ "ExpectedSizeBytes": {
427
+ "title": "ExpectedSizeBytes",
428
+ "description": "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.",
429
+ "type": "integer",
430
+ "minimum": 1
431
+ },
432
+ "AuthorityPresentation": {
433
+ "title": "AuthorityPresentation",
434
+ "type": "object",
435
+ "additionalProperties": false,
436
+ "required": [
437
+ "membership",
438
+ "authority"
439
+ ],
440
+ "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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
441
+ "properties": {
442
+ "membership": {
443
+ "type": "string",
444
+ "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."
445
+ },
446
+ "authority": {
447
+ "type": "array",
448
+ "minItems": 1,
449
+ "maxItems": 8,
450
+ "items": {
451
+ "type": "string"
452
+ },
453
+ "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."
454
+ },
455
+ "subjectBinding": {
456
+ "type": "string",
457
+ "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."
458
+ }
459
+ }
460
+ }
461
+ }
462
+ } as const;
463
+
464
+ /**
465
+ * SPEC.md §7.2 policy for the request variant, from this specification's
466
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
467
+ * per-specification and cannot be derived from the document alone, and
468
+ * item 2 needs the schema this carries.
469
+ */
470
+ export const SPEC = {
471
+ typeUri: TYPE_URI,
472
+ isBearer: false,
473
+ isProofRequired: true,
474
+ isRecipientRequired: true,
475
+ isIssuedAtRequired: true,
476
+ payloadSchema: PAYLOAD_SCHEMA,
477
+ } as const;
478
+
479
+ /**
480
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
481
+ * tracks the *issuer* party's requirement because a response swaps the
482
+ * parties (§7.3 item 5).
483
+ */
484
+ export const RESPONSE_SPEC = {
485
+ typeUri: RESPONSE_TYPE_URI,
486
+ isBearer: false,
487
+ isProofRequired: true,
488
+ isRecipientRequired: true,
489
+ isIssuedAtRequired: true,
490
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
491
+ } as const;