@openvtc/trust-tasks 0.21.11 → 0.21.12

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 (203) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/_framework/0.4/framework.d.ts +1 -1
  3. package/dist/_framework/0.4/framework.d.ts.map +1 -1
  4. package/dist/_shared/components.d.ts +371 -0
  5. package/dist/_shared/components.d.ts.map +1 -1
  6. package/dist/auth/_shared/0.1/signing-key.d.ts +16 -0
  7. package/dist/auth/_shared/0.1/signing-key.d.ts.map +1 -0
  8. package/dist/auth/_shared/0.1/signing-key.js +6 -0
  9. package/dist/auth/_shared/0.1/signing-key.js.map +1 -0
  10. package/dist/auth/signing-key/enroll/0.1/payload.d.ts +545 -0
  11. package/dist/auth/signing-key/enroll/0.1/payload.d.ts.map +1 -0
  12. package/dist/auth/signing-key/enroll/0.1/payload.js +307 -0
  13. package/dist/auth/signing-key/enroll/0.1/payload.js.map +1 -0
  14. package/dist/auth/signing-key/list/0.1/payload.d.ts +509 -0
  15. package/dist/auth/signing-key/list/0.1/payload.d.ts.map +1 -0
  16. package/dist/auth/signing-key/list/0.1/payload.js +289 -0
  17. package/dist/auth/signing-key/list/0.1/payload.js.map +1 -0
  18. package/dist/auth/signing-key/revoke/0.1/payload.d.ts +292 -0
  19. package/dist/auth/signing-key/revoke/0.1/payload.d.ts.map +1 -0
  20. package/dist/auth/signing-key/revoke/0.1/payload.js +167 -0
  21. package/dist/auth/signing-key/revoke/0.1/payload.js.map +1 -0
  22. package/dist/index.d.ts +38 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +38 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/vtc/_shared/0.1/community-presentation.d.ts +16 -0
  27. package/dist/vtc/_shared/0.1/community-presentation.d.ts.map +1 -0
  28. package/dist/vtc/_shared/0.1/community-presentation.js +6 -0
  29. package/dist/vtc/_shared/0.1/community-presentation.js.map +1 -0
  30. package/dist/vtc/_shared/0.1/relationship-lifecycle.d.ts +16 -0
  31. package/dist/vtc/_shared/0.1/relationship-lifecycle.d.ts.map +1 -0
  32. package/dist/vtc/_shared/0.1/relationship-lifecycle.js +6 -0
  33. package/dist/vtc/_shared/0.1/relationship-lifecycle.js.map +1 -0
  34. package/dist/vtc/_shared/0.1/schema-registry.d.ts +16 -0
  35. package/dist/vtc/_shared/0.1/schema-registry.d.ts.map +1 -0
  36. package/dist/vtc/_shared/0.1/schema-registry.js +6 -0
  37. package/dist/vtc/_shared/0.1/schema-registry.js.map +1 -0
  38. package/dist/vtc/_shared/0.1/vetting-auto-grant.d.ts +16 -0
  39. package/dist/vtc/_shared/0.1/vetting-auto-grant.d.ts.map +1 -0
  40. package/dist/vtc/_shared/0.1/vetting-auto-grant.js +6 -0
  41. package/dist/vtc/_shared/0.1/vetting-auto-grant.js.map +1 -0
  42. package/dist/vtc/_shared/0.1/website-transfer.d.ts +16 -0
  43. package/dist/vtc/_shared/0.1/website-transfer.d.ts.map +1 -0
  44. package/dist/vtc/_shared/0.1/website-transfer.js +6 -0
  45. package/dist/vtc/_shared/0.1/website-transfer.js.map +1 -0
  46. package/dist/vtc/community/branding/show/0.1/payload.d.ts +319 -0
  47. package/dist/vtc/community/branding/show/0.1/payload.d.ts.map +1 -0
  48. package/dist/vtc/community/branding/show/0.1/payload.js +179 -0
  49. package/dist/vtc/community/branding/show/0.1/payload.js.map +1 -0
  50. package/dist/vtc/community/branding/update/0.1/payload.d.ts +328 -0
  51. package/dist/vtc/community/branding/update/0.1/payload.d.ts.map +1 -0
  52. package/dist/vtc/community/branding/update/0.1/payload.js +185 -0
  53. package/dist/vtc/community/branding/update/0.1/payload.js.map +1 -0
  54. package/dist/vtc/community/join-discovery/show/0.1/payload.d.ts +267 -0
  55. package/dist/vtc/community/join-discovery/show/0.1/payload.d.ts.map +1 -0
  56. package/dist/vtc/community/join-discovery/show/0.1/payload.js +157 -0
  57. package/dist/vtc/community/join-discovery/show/0.1/payload.js.map +1 -0
  58. package/dist/vtc/community/join-discovery/update/0.1/payload.d.ts +276 -0
  59. package/dist/vtc/community/join-discovery/update/0.1/payload.d.ts.map +1 -0
  60. package/dist/vtc/community/join-discovery/update/0.1/payload.js +163 -0
  61. package/dist/vtc/community/join-discovery/update/0.1/payload.js.map +1 -0
  62. package/dist/vtc/community/requested-attributes/show/0.1/payload.d.ts +339 -0
  63. package/dist/vtc/community/requested-attributes/show/0.1/payload.d.ts.map +1 -0
  64. package/dist/vtc/community/requested-attributes/show/0.1/payload.js +193 -0
  65. package/dist/vtc/community/requested-attributes/show/0.1/payload.js.map +1 -0
  66. package/dist/vtc/community/requested-attributes/update/0.1/payload.d.ts +348 -0
  67. package/dist/vtc/community/requested-attributes/update/0.1/payload.d.ts.map +1 -0
  68. package/dist/vtc/community/requested-attributes/update/0.1/payload.js +199 -0
  69. package/dist/vtc/community/requested-attributes/update/0.1/payload.js.map +1 -0
  70. package/dist/vtc/join-requests/query/0.1/payload.d.ts +412 -0
  71. package/dist/vtc/join-requests/query/0.1/payload.d.ts.map +1 -0
  72. package/dist/vtc/join-requests/query/0.1/payload.js +228 -0
  73. package/dist/vtc/join-requests/query/0.1/payload.js.map +1 -0
  74. package/dist/vtc/join-requests/vetting/show/0.1/payload.d.ts +1016 -0
  75. package/dist/vtc/join-requests/vetting/show/0.1/payload.d.ts.map +1 -0
  76. package/dist/vtc/join-requests/vetting/show/0.1/payload.js +509 -0
  77. package/dist/vtc/join-requests/vetting/show/0.1/payload.js.map +1 -0
  78. package/dist/vtc/relationships/restore/0.1/payload.d.ts +462 -0
  79. package/dist/vtc/relationships/restore/0.1/payload.d.ts.map +1 -0
  80. package/dist/vtc/relationships/restore/0.1/payload.js +270 -0
  81. package/dist/vtc/relationships/restore/0.1/payload.js.map +1 -0
  82. package/dist/vtc/relationships/suspend/0.1/payload.d.ts +462 -0
  83. package/dist/vtc/relationships/suspend/0.1/payload.d.ts.map +1 -0
  84. package/dist/vtc/relationships/suspend/0.1/payload.js +270 -0
  85. package/dist/vtc/relationships/suspend/0.1/payload.js.map +1 -0
  86. package/dist/vtc/rooms/list/0.1/payload.d.ts +653 -0
  87. package/dist/vtc/rooms/list/0.1/payload.d.ts.map +1 -0
  88. package/dist/vtc/rooms/list/0.1/payload.js +360 -0
  89. package/dist/vtc/rooms/list/0.1/payload.js.map +1 -0
  90. package/dist/vtc/schemas/accepts/delete/0.1/payload.d.ts +240 -0
  91. package/dist/vtc/schemas/accepts/delete/0.1/payload.d.ts.map +1 -0
  92. package/dist/vtc/schemas/accepts/delete/0.1/payload.js +141 -0
  93. package/dist/vtc/schemas/accepts/delete/0.1/payload.js.map +1 -0
  94. package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts +1214 -0
  95. package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts.map +1 -0
  96. package/dist/vtc/schemas/accepts/list/0.1/payload.js +681 -0
  97. package/dist/vtc/schemas/accepts/list/0.1/payload.js.map +1 -0
  98. package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts +1165 -0
  99. package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts.map +1 -0
  100. package/dist/vtc/schemas/accepts/register/0.1/payload.js +665 -0
  101. package/dist/vtc/schemas/accepts/register/0.1/payload.js.map +1 -0
  102. package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts +1144 -0
  103. package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts.map +1 -0
  104. package/dist/vtc/schemas/accepts/show/0.1/payload.js +655 -0
  105. package/dist/vtc/schemas/accepts/show/0.1/payload.js.map +1 -0
  106. package/dist/vtc/schemas/delete/0.1/payload.d.ts +240 -0
  107. package/dist/vtc/schemas/delete/0.1/payload.d.ts.map +1 -0
  108. package/dist/vtc/schemas/delete/0.1/payload.js +141 -0
  109. package/dist/vtc/schemas/delete/0.1/payload.js.map +1 -0
  110. package/dist/vtc/schemas/list/0.1/payload.d.ts +541 -0
  111. package/dist/vtc/schemas/list/0.1/payload.d.ts.map +1 -0
  112. package/dist/vtc/schemas/list/0.1/payload.js +300 -0
  113. package/dist/vtc/schemas/list/0.1/payload.js.map +1 -0
  114. package/dist/vtc/schemas/register/0.1/payload.d.ts +512 -0
  115. package/dist/vtc/schemas/register/0.1/payload.d.ts.map +1 -0
  116. package/dist/vtc/schemas/register/0.1/payload.js +292 -0
  117. package/dist/vtc/schemas/register/0.1/payload.js.map +1 -0
  118. package/dist/vtc/schemas/show/0.1/payload.d.ts +484 -0
  119. package/dist/vtc/schemas/show/0.1/payload.d.ts.map +1 -0
  120. package/dist/vtc/schemas/show/0.1/payload.js +279 -0
  121. package/dist/vtc/schemas/show/0.1/payload.js.map +1 -0
  122. package/dist/vtc/vetting/auto-grant/show/0.1/payload.d.ts +463 -0
  123. package/dist/vtc/vetting/auto-grant/show/0.1/payload.d.ts.map +1 -0
  124. package/dist/vtc/vetting/auto-grant/show/0.1/payload.js +269 -0
  125. package/dist/vtc/vetting/auto-grant/show/0.1/payload.js.map +1 -0
  126. package/dist/vtc/vetting/auto-grant/update/0.1/payload.d.ts +491 -0
  127. package/dist/vtc/vetting/auto-grant/update/0.1/payload.d.ts.map +1 -0
  128. package/dist/vtc/vetting/auto-grant/update/0.1/payload.js +282 -0
  129. package/dist/vtc/vetting/auto-grant/update/0.1/payload.js.map +1 -0
  130. package/dist/vtc/vetting/revocations/list/0.1/payload.d.ts +608 -0
  131. package/dist/vtc/vetting/revocations/list/0.1/payload.d.ts.map +1 -0
  132. package/dist/vtc/vetting/revocations/list/0.1/payload.js +332 -0
  133. package/dist/vtc/vetting/revocations/list/0.1/payload.js.map +1 -0
  134. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.d.ts +992 -0
  135. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.d.ts.map +1 -0
  136. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.js +461 -0
  137. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.js.map +1 -0
  138. package/dist/vtc/website/deploy/0.1/payload.d.ts +369 -0
  139. package/dist/vtc/website/deploy/0.1/payload.d.ts.map +1 -0
  140. package/dist/vtc/website/deploy/0.1/payload.js +213 -0
  141. package/dist/vtc/website/deploy/0.1/payload.js.map +1 -0
  142. package/dist/vtc/website/files/show/0.1/payload.d.ts +455 -0
  143. package/dist/vtc/website/files/show/0.1/payload.d.ts.map +1 -0
  144. package/dist/vtc/website/files/show/0.1/payload.js +247 -0
  145. package/dist/vtc/website/files/show/0.1/payload.js.map +1 -0
  146. package/dist/vtc/website/upload/abort/0.1/payload.d.ts +256 -0
  147. package/dist/vtc/website/upload/abort/0.1/payload.d.ts.map +1 -0
  148. package/dist/vtc/website/upload/abort/0.1/payload.js +149 -0
  149. package/dist/vtc/website/upload/abort/0.1/payload.js.map +1 -0
  150. package/dist/vtc/website/upload/begin/0.1/payload.d.ts +658 -0
  151. package/dist/vtc/website/upload/begin/0.1/payload.d.ts.map +1 -0
  152. package/dist/vtc/website/upload/begin/0.1/payload.js +375 -0
  153. package/dist/vtc/website/upload/begin/0.1/payload.js.map +1 -0
  154. package/dist/vtc/website/upload/chunk/0.1/payload.d.ts +447 -0
  155. package/dist/vtc/website/upload/chunk/0.1/payload.d.ts.map +1 -0
  156. package/dist/vtc/website/upload/chunk/0.1/payload.js +253 -0
  157. package/dist/vtc/website/upload/chunk/0.1/payload.js.map +1 -0
  158. package/dist/vtc/website/upload/commit/0.1/payload.d.ts +603 -0
  159. package/dist/vtc/website/upload/commit/0.1/payload.d.ts.map +1 -0
  160. package/dist/vtc/website/upload/commit/0.1/payload.js +337 -0
  161. package/dist/vtc/website/upload/commit/0.1/payload.js.map +1 -0
  162. package/package.json +1 -1
  163. package/src/_framework/0.4/framework.ts +1 -1
  164. package/src/_shared/components.ts +371 -0
  165. package/src/auth/_shared/0.1/signing-key.ts +17 -0
  166. package/src/auth/signing-key/enroll/0.1/payload.ts +349 -0
  167. package/src/auth/signing-key/list/0.1/payload.ts +323 -0
  168. package/src/auth/signing-key/revoke/0.1/payload.ts +204 -0
  169. package/src/index.ts +38 -0
  170. package/src/vtc/_shared/0.1/community-presentation.ts +17 -0
  171. package/src/vtc/_shared/0.1/relationship-lifecycle.ts +17 -0
  172. package/src/vtc/_shared/0.1/schema-registry.ts +17 -0
  173. package/src/vtc/_shared/0.1/vetting-auto-grant.ts +17 -0
  174. package/src/vtc/_shared/0.1/website-transfer.ts +17 -0
  175. package/src/vtc/community/branding/show/0.1/payload.ts +207 -0
  176. package/src/vtc/community/branding/update/0.1/payload.ts +214 -0
  177. package/src/vtc/community/join-discovery/show/0.1/payload.ts +185 -0
  178. package/src/vtc/community/join-discovery/update/0.1/payload.ts +192 -0
  179. package/src/vtc/community/requested-attributes/show/0.1/payload.ts +221 -0
  180. package/src/vtc/community/requested-attributes/update/0.1/payload.ts +228 -0
  181. package/src/vtc/join-requests/query/0.1/payload.ts +285 -0
  182. package/src/vtc/join-requests/vetting/show/0.1/payload.ts +740 -0
  183. package/src/vtc/relationships/restore/0.1/payload.ts +307 -0
  184. package/src/vtc/relationships/suspend/0.1/payload.ts +307 -0
  185. package/src/vtc/rooms/list/0.1/payload.ts +449 -0
  186. package/src/vtc/schemas/accepts/delete/0.1/payload.ts +170 -0
  187. package/src/vtc/schemas/accepts/list/0.1/payload.ts +724 -0
  188. package/src/vtc/schemas/accepts/register/0.1/payload.ts +697 -0
  189. package/src/vtc/schemas/accepts/show/0.1/payload.ts +684 -0
  190. package/src/vtc/schemas/delete/0.1/payload.ts +170 -0
  191. package/src/vtc/schemas/list/0.1/payload.ts +344 -0
  192. package/src/vtc/schemas/register/0.1/payload.ts +325 -0
  193. package/src/vtc/schemas/show/0.1/payload.ts +308 -0
  194. package/src/vtc/vetting/auto-grant/show/0.1/payload.ts +297 -0
  195. package/src/vtc/vetting/auto-grant/update/0.1/payload.ts +316 -0
  196. package/src/vtc/vetting/revocations/list/0.1/payload.ts +416 -0
  197. package/src/vtc/vetting/vetters/grants/list/0.1/payload.ts +700 -0
  198. package/src/vtc/website/deploy/0.1/payload.ts +255 -0
  199. package/src/vtc/website/files/show/0.1/payload.ts +303 -0
  200. package/src/vtc/website/upload/abort/0.1/payload.ts +182 -0
  201. package/src/vtc/website/upload/begin/0.1/payload.ts +408 -0
  202. package/src/vtc/website/upload/chunk/0.1/payload.ts +295 -0
  203. package/src/vtc/website/upload/commit/0.1/payload.ts +385 -0
@@ -0,0 +1,658 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/website/upload/begin/0.1/payload.schema.json
4
+ */
5
+ import type { ChunkCount, ChunkManifest, ChunkSize, DigestMultibase, ExpectedSha256, ExpectedSizeBytes, ExpiresAt, Ext, UploadId, UploadTarget, WebsiteEtag, WebsitePath } from "../../../../../_shared/components.js";
6
+ /**
7
+ * Open an upload of one website file or a whole-site bundle, committing to its size, SHA-256 and chunk digests. The outer document members are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTCWebsiteUploadBeginPayload {
10
+ target: UploadTarget;
11
+ expectedSha256: ExpectedSha256;
12
+ expectedSizeBytes: ExpectedSizeBytes;
13
+ chunks: ChunkManifest;
14
+ ext?: Ext;
15
+ }
16
+ export interface VTCWebsiteUploadBeginResponsePayload {
17
+ uploadId: UploadId;
18
+ expiresAt: ExpiresAt;
19
+ ext?: Ext;
20
+ }
21
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
22
+ export type { ChunkCount, ChunkManifest, ChunkSize, DigestMultibase, ExpectedSha256, ExpectedSizeBytes, ExpiresAt, Ext, UploadId, UploadTarget, WebsiteEtag, WebsitePath };
23
+ /** Trust Task type URI. */
24
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/website/upload/begin/0.1";
25
+ /** Stable alias for this specification's request payload shape. */
26
+ export type Payload = VTCWebsiteUploadBeginPayload;
27
+ /** Trust Task response type URI (request type URI + "#response"). */
28
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/website/upload/begin/0.1#response";
29
+ /** Stable alias for this specification's success-response payload shape. */
30
+ export type Response = VTCWebsiteUploadBeginResponsePayload;
31
+ /**
32
+ * This specification's payload schema, as a value.
33
+ *
34
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
35
+ * rather than only as a `.json` file because TypeScript types are erased
36
+ * at runtime: without a schema a consumer has nothing to validate, and
37
+ * every REQUIRED payload member is optional in practice. Cross-file
38
+ * `$ref`s are already inlined, so it needs no resolver.
39
+ */
40
+ export declare const PAYLOAD_SCHEMA: {
41
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
42
+ readonly $id: "https://trusttasks.org/spec/vtc/website/upload/begin/0.1";
43
+ readonly title: "VTC Website — Upload — Begin — payload";
44
+ readonly description: "Open an upload of one website file or a whole-site bundle, committing to its size, SHA-256 and chunk digests. The outer document members are owned by the framework — SPEC §6.3.";
45
+ readonly type: "object";
46
+ readonly additionalProperties: false;
47
+ readonly required: readonly ["target", "expectedSha256", "expectedSizeBytes", "chunks"];
48
+ readonly properties: {
49
+ readonly target: {
50
+ readonly $ref: "#/$defs/UploadTarget";
51
+ };
52
+ readonly expectedSha256: {
53
+ readonly $ref: "#/$defs/ExpectedSha256";
54
+ };
55
+ readonly expectedSizeBytes: {
56
+ readonly $ref: "#/$defs/ExpectedSizeBytes";
57
+ };
58
+ readonly chunks: {
59
+ readonly $ref: "#/$defs/ChunkManifest";
60
+ };
61
+ readonly ext: {
62
+ readonly $ref: "#/$defs/Ext";
63
+ };
64
+ };
65
+ readonly $defs: {
66
+ readonly Response: {
67
+ readonly $anchor: "response";
68
+ readonly title: "VTC Website — Upload — Begin — response payload";
69
+ readonly type: "object";
70
+ readonly additionalProperties: false;
71
+ readonly required: readonly ["uploadId", "expiresAt"];
72
+ readonly properties: {
73
+ readonly uploadId: {
74
+ readonly $ref: "#/$defs/UploadId";
75
+ };
76
+ readonly expiresAt: {
77
+ readonly $ref: "#/$defs/ExpiresAt";
78
+ };
79
+ readonly ext: {
80
+ readonly $ref: "#/$defs/Ext";
81
+ };
82
+ };
83
+ };
84
+ readonly Ext: {
85
+ readonly title: "Ext";
86
+ 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.";
87
+ readonly type: "object";
88
+ readonly minProperties: 1;
89
+ readonly additionalProperties: true;
90
+ readonly propertyNames: {
91
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
92
+ };
93
+ };
94
+ readonly ExpiresAt: {
95
+ readonly title: "ExpiresAt";
96
+ readonly 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.";
97
+ readonly type: "string";
98
+ readonly format: "date-time";
99
+ };
100
+ readonly UploadId: {
101
+ readonly title: "UploadId";
102
+ readonly type: "string";
103
+ readonly 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}$";
104
+ readonly description: "Handle for one upload across begin, chunk, commit and abort, and — for a bundle — deploy. Recipient-generated and unguessable, which is what lets a reference to somebody else's upload be answered as not-found without confirming it exists. Opaque: a producer quotes what it was given.";
105
+ };
106
+ readonly ChunkManifest: {
107
+ readonly title: "ChunkManifest";
108
+ readonly 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.";
109
+ readonly type: "object";
110
+ readonly additionalProperties: false;
111
+ readonly required: readonly ["chunkSize", "chunkCount", "chunkDigests"];
112
+ readonly properties: {
113
+ readonly chunkSize: {
114
+ readonly $ref: "#/$defs/ChunkSize";
115
+ };
116
+ readonly chunkCount: {
117
+ readonly $ref: "#/$defs/ChunkCount";
118
+ };
119
+ readonly chunkDigests: {
120
+ readonly type: "array";
121
+ readonly minItems: 1;
122
+ readonly maxItems: 4096;
123
+ readonly 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.";
124
+ readonly items: {
125
+ readonly $ref: "#/$defs/DigestMultibase";
126
+ };
127
+ };
128
+ };
129
+ };
130
+ readonly ChunkCount: {
131
+ readonly title: "ChunkCount";
132
+ readonly 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.";
133
+ readonly type: "integer";
134
+ readonly minimum: 1;
135
+ readonly maximum: 4096;
136
+ };
137
+ readonly ChunkSize: {
138
+ readonly title: "ChunkSize";
139
+ readonly 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.";
140
+ readonly type: "integer";
141
+ readonly minimum: 16384;
142
+ readonly maximum: 262144;
143
+ };
144
+ readonly DigestMultibase: {
145
+ readonly title: "DigestMultibase";
146
+ readonly 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`.";
147
+ readonly type: "string";
148
+ readonly minLength: 16;
149
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
150
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
151
+ };
152
+ readonly ExpectedSizeBytes: {
153
+ readonly title: "ExpectedSizeBytes";
154
+ readonly description: "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.";
155
+ readonly type: "integer";
156
+ readonly minimum: 1;
157
+ };
158
+ readonly ExpectedSha256: {
159
+ readonly title: "ExpectedSha256";
160
+ readonly description: "Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.";
161
+ readonly type: "string";
162
+ readonly pattern: "^[0-9a-f]{64}$";
163
+ };
164
+ readonly UploadTarget: {
165
+ readonly title: "UploadTarget";
166
+ readonly type: "object";
167
+ readonly additionalProperties: false;
168
+ readonly required: readonly ["kind"];
169
+ readonly description: "What the uploaded bytes are for, committed before any byte moves. `file`: one file at `path`, written into the site when the upload commits — the single-file write. `bundle`: a gzip-compressed tar of the whole site, staged when the upload commits and published by vtc/website/deploy. `path` is required for a `file` target and forbidden for a `bundle`, and `ifMatch` is allowed only for a `file` — rules over two members that this schema does not express; a community refuses a violation with `malformedRequest`. `ifMatch` is optimistic concurrency: the write commits only if the file's current content hash is this value.";
170
+ readonly properties: {
171
+ readonly kind: {
172
+ readonly type: "string";
173
+ readonly enum: readonly ["file", "bundle"];
174
+ };
175
+ readonly path: {
176
+ readonly $ref: "#/$defs/WebsitePath";
177
+ };
178
+ readonly ifMatch: {
179
+ readonly $ref: "#/$defs/WebsiteEtag";
180
+ };
181
+ };
182
+ };
183
+ readonly WebsiteEtag: {
184
+ readonly title: "WebsiteEtag";
185
+ readonly type: "string";
186
+ readonly pattern: "^[0-9a-f]{64}$";
187
+ readonly description: "A file's content hash: the lowercase hex SHA-256 of its bytes — the `etag` vtc/website/files/list reports, and the `ETag` a direct read of the path returns, without the HTTP quotes.";
188
+ };
189
+ readonly WebsitePath: {
190
+ readonly title: "WebsitePath";
191
+ readonly type: "string";
192
+ readonly minLength: 1;
193
+ readonly maxLength: 1024;
194
+ readonly pattern: "^[^\\\\]+$";
195
+ readonly description: "A file's path relative to the site root, `/`-separated, with or without a leading `/`. The community resolves it inside the site root and refuses one that escapes the root (`..`), names a hidden file or directory (a segment beginning `.`), carries a blocklisted extension, or contains a control character — the same rules the public read handler applies, so nothing can be written that the site would refuse to serve, and nothing can be read that it would not.";
196
+ };
197
+ };
198
+ };
199
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
200
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
201
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
202
+ readonly $ref: "#/$defs/Response";
203
+ readonly $defs: {
204
+ readonly Response: {
205
+ readonly $anchor: "response";
206
+ readonly title: "VTC Website — Upload — Begin — response payload";
207
+ readonly type: "object";
208
+ readonly additionalProperties: false;
209
+ readonly required: readonly ["uploadId", "expiresAt"];
210
+ readonly properties: {
211
+ readonly uploadId: {
212
+ readonly $ref: "#/$defs/UploadId";
213
+ };
214
+ readonly expiresAt: {
215
+ readonly $ref: "#/$defs/ExpiresAt";
216
+ };
217
+ readonly ext: {
218
+ readonly $ref: "#/$defs/Ext";
219
+ };
220
+ };
221
+ };
222
+ readonly Ext: {
223
+ readonly title: "Ext";
224
+ 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.";
225
+ readonly type: "object";
226
+ readonly minProperties: 1;
227
+ readonly additionalProperties: true;
228
+ readonly propertyNames: {
229
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
230
+ };
231
+ };
232
+ readonly ExpiresAt: {
233
+ readonly title: "ExpiresAt";
234
+ readonly 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.";
235
+ readonly type: "string";
236
+ readonly format: "date-time";
237
+ };
238
+ readonly UploadId: {
239
+ readonly title: "UploadId";
240
+ readonly type: "string";
241
+ readonly 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}$";
242
+ readonly description: "Handle for one upload across begin, chunk, commit and abort, and — for a bundle — deploy. Recipient-generated and unguessable, which is what lets a reference to somebody else's upload be answered as not-found without confirming it exists. Opaque: a producer quotes what it was given.";
243
+ };
244
+ readonly ChunkManifest: {
245
+ readonly title: "ChunkManifest";
246
+ readonly 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.";
247
+ readonly type: "object";
248
+ readonly additionalProperties: false;
249
+ readonly required: readonly ["chunkSize", "chunkCount", "chunkDigests"];
250
+ readonly properties: {
251
+ readonly chunkSize: {
252
+ readonly $ref: "#/$defs/ChunkSize";
253
+ };
254
+ readonly chunkCount: {
255
+ readonly $ref: "#/$defs/ChunkCount";
256
+ };
257
+ readonly chunkDigests: {
258
+ readonly type: "array";
259
+ readonly minItems: 1;
260
+ readonly maxItems: 4096;
261
+ readonly 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.";
262
+ readonly items: {
263
+ readonly $ref: "#/$defs/DigestMultibase";
264
+ };
265
+ };
266
+ };
267
+ };
268
+ readonly ChunkCount: {
269
+ readonly title: "ChunkCount";
270
+ readonly 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.";
271
+ readonly type: "integer";
272
+ readonly minimum: 1;
273
+ readonly maximum: 4096;
274
+ };
275
+ readonly ChunkSize: {
276
+ readonly title: "ChunkSize";
277
+ readonly 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.";
278
+ readonly type: "integer";
279
+ readonly minimum: 16384;
280
+ readonly maximum: 262144;
281
+ };
282
+ readonly DigestMultibase: {
283
+ readonly title: "DigestMultibase";
284
+ readonly 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`.";
285
+ readonly type: "string";
286
+ readonly minLength: 16;
287
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
288
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
289
+ };
290
+ readonly ExpectedSizeBytes: {
291
+ readonly title: "ExpectedSizeBytes";
292
+ readonly description: "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.";
293
+ readonly type: "integer";
294
+ readonly minimum: 1;
295
+ };
296
+ readonly ExpectedSha256: {
297
+ readonly title: "ExpectedSha256";
298
+ readonly description: "Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.";
299
+ readonly type: "string";
300
+ readonly pattern: "^[0-9a-f]{64}$";
301
+ };
302
+ readonly UploadTarget: {
303
+ readonly title: "UploadTarget";
304
+ readonly type: "object";
305
+ readonly additionalProperties: false;
306
+ readonly required: readonly ["kind"];
307
+ readonly description: "What the uploaded bytes are for, committed before any byte moves. `file`: one file at `path`, written into the site when the upload commits — the single-file write. `bundle`: a gzip-compressed tar of the whole site, staged when the upload commits and published by vtc/website/deploy. `path` is required for a `file` target and forbidden for a `bundle`, and `ifMatch` is allowed only for a `file` — rules over two members that this schema does not express; a community refuses a violation with `malformedRequest`. `ifMatch` is optimistic concurrency: the write commits only if the file's current content hash is this value.";
308
+ readonly properties: {
309
+ readonly kind: {
310
+ readonly type: "string";
311
+ readonly enum: readonly ["file", "bundle"];
312
+ };
313
+ readonly path: {
314
+ readonly $ref: "#/$defs/WebsitePath";
315
+ };
316
+ readonly ifMatch: {
317
+ readonly $ref: "#/$defs/WebsiteEtag";
318
+ };
319
+ };
320
+ };
321
+ readonly WebsiteEtag: {
322
+ readonly title: "WebsiteEtag";
323
+ readonly type: "string";
324
+ readonly pattern: "^[0-9a-f]{64}$";
325
+ readonly description: "A file's content hash: the lowercase hex SHA-256 of its bytes — the `etag` vtc/website/files/list reports, and the `ETag` a direct read of the path returns, without the HTTP quotes.";
326
+ };
327
+ readonly WebsitePath: {
328
+ readonly title: "WebsitePath";
329
+ readonly type: "string";
330
+ readonly minLength: 1;
331
+ readonly maxLength: 1024;
332
+ readonly pattern: "^[^\\\\]+$";
333
+ readonly description: "A file's path relative to the site root, `/`-separated, with or without a leading `/`. The community resolves it inside the site root and refuses one that escapes the root (`..`), names a hidden file or directory (a segment beginning `.`), carries a blocklisted extension, or contains a control character — the same rules the public read handler applies, so nothing can be written that the site would refuse to serve, and nothing can be read that it would not.";
334
+ };
335
+ };
336
+ };
337
+ /**
338
+ * SPEC.md §7.2 policy for the request variant, from this specification's
339
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
340
+ * per-specification and cannot be derived from the document alone, and
341
+ * item 2 needs the schema this carries.
342
+ */
343
+ export declare const SPEC: {
344
+ readonly typeUri: "https://trusttasks.org/spec/vtc/website/upload/begin/0.1";
345
+ readonly isBearer: false;
346
+ readonly isProofRequired: true;
347
+ readonly isRecipientRequired: true;
348
+ readonly isIssuedAtRequired: true;
349
+ readonly payloadSchema: {
350
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
351
+ readonly $id: "https://trusttasks.org/spec/vtc/website/upload/begin/0.1";
352
+ readonly title: "VTC Website — Upload — Begin — payload";
353
+ readonly description: "Open an upload of one website file or a whole-site bundle, committing to its size, SHA-256 and chunk digests. The outer document members are owned by the framework — SPEC §6.3.";
354
+ readonly type: "object";
355
+ readonly additionalProperties: false;
356
+ readonly required: readonly ["target", "expectedSha256", "expectedSizeBytes", "chunks"];
357
+ readonly properties: {
358
+ readonly target: {
359
+ readonly $ref: "#/$defs/UploadTarget";
360
+ };
361
+ readonly expectedSha256: {
362
+ readonly $ref: "#/$defs/ExpectedSha256";
363
+ };
364
+ readonly expectedSizeBytes: {
365
+ readonly $ref: "#/$defs/ExpectedSizeBytes";
366
+ };
367
+ readonly chunks: {
368
+ readonly $ref: "#/$defs/ChunkManifest";
369
+ };
370
+ readonly ext: {
371
+ readonly $ref: "#/$defs/Ext";
372
+ };
373
+ };
374
+ readonly $defs: {
375
+ readonly Response: {
376
+ readonly $anchor: "response";
377
+ readonly title: "VTC Website — Upload — Begin — response payload";
378
+ readonly type: "object";
379
+ readonly additionalProperties: false;
380
+ readonly required: readonly ["uploadId", "expiresAt"];
381
+ readonly properties: {
382
+ readonly uploadId: {
383
+ readonly $ref: "#/$defs/UploadId";
384
+ };
385
+ readonly expiresAt: {
386
+ readonly $ref: "#/$defs/ExpiresAt";
387
+ };
388
+ readonly ext: {
389
+ readonly $ref: "#/$defs/Ext";
390
+ };
391
+ };
392
+ };
393
+ readonly Ext: {
394
+ readonly title: "Ext";
395
+ 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.";
396
+ readonly type: "object";
397
+ readonly minProperties: 1;
398
+ readonly additionalProperties: true;
399
+ readonly propertyNames: {
400
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
401
+ };
402
+ };
403
+ readonly ExpiresAt: {
404
+ readonly title: "ExpiresAt";
405
+ readonly 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.";
406
+ readonly type: "string";
407
+ readonly format: "date-time";
408
+ };
409
+ readonly UploadId: {
410
+ readonly title: "UploadId";
411
+ readonly type: "string";
412
+ readonly 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}$";
413
+ readonly description: "Handle for one upload across begin, chunk, commit and abort, and — for a bundle — deploy. Recipient-generated and unguessable, which is what lets a reference to somebody else's upload be answered as not-found without confirming it exists. Opaque: a producer quotes what it was given.";
414
+ };
415
+ readonly ChunkManifest: {
416
+ readonly title: "ChunkManifest";
417
+ readonly 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.";
418
+ readonly type: "object";
419
+ readonly additionalProperties: false;
420
+ readonly required: readonly ["chunkSize", "chunkCount", "chunkDigests"];
421
+ readonly properties: {
422
+ readonly chunkSize: {
423
+ readonly $ref: "#/$defs/ChunkSize";
424
+ };
425
+ readonly chunkCount: {
426
+ readonly $ref: "#/$defs/ChunkCount";
427
+ };
428
+ readonly chunkDigests: {
429
+ readonly type: "array";
430
+ readonly minItems: 1;
431
+ readonly maxItems: 4096;
432
+ readonly 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.";
433
+ readonly items: {
434
+ readonly $ref: "#/$defs/DigestMultibase";
435
+ };
436
+ };
437
+ };
438
+ };
439
+ readonly ChunkCount: {
440
+ readonly title: "ChunkCount";
441
+ readonly 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.";
442
+ readonly type: "integer";
443
+ readonly minimum: 1;
444
+ readonly maximum: 4096;
445
+ };
446
+ readonly ChunkSize: {
447
+ readonly title: "ChunkSize";
448
+ readonly 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.";
449
+ readonly type: "integer";
450
+ readonly minimum: 16384;
451
+ readonly maximum: 262144;
452
+ };
453
+ readonly DigestMultibase: {
454
+ readonly title: "DigestMultibase";
455
+ readonly 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`.";
456
+ readonly type: "string";
457
+ readonly minLength: 16;
458
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
459
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
460
+ };
461
+ readonly ExpectedSizeBytes: {
462
+ readonly title: "ExpectedSizeBytes";
463
+ readonly description: "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.";
464
+ readonly type: "integer";
465
+ readonly minimum: 1;
466
+ };
467
+ readonly ExpectedSha256: {
468
+ readonly title: "ExpectedSha256";
469
+ readonly description: "Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.";
470
+ readonly type: "string";
471
+ readonly pattern: "^[0-9a-f]{64}$";
472
+ };
473
+ readonly UploadTarget: {
474
+ readonly title: "UploadTarget";
475
+ readonly type: "object";
476
+ readonly additionalProperties: false;
477
+ readonly required: readonly ["kind"];
478
+ readonly description: "What the uploaded bytes are for, committed before any byte moves. `file`: one file at `path`, written into the site when the upload commits — the single-file write. `bundle`: a gzip-compressed tar of the whole site, staged when the upload commits and published by vtc/website/deploy. `path` is required for a `file` target and forbidden for a `bundle`, and `ifMatch` is allowed only for a `file` — rules over two members that this schema does not express; a community refuses a violation with `malformedRequest`. `ifMatch` is optimistic concurrency: the write commits only if the file's current content hash is this value.";
479
+ readonly properties: {
480
+ readonly kind: {
481
+ readonly type: "string";
482
+ readonly enum: readonly ["file", "bundle"];
483
+ };
484
+ readonly path: {
485
+ readonly $ref: "#/$defs/WebsitePath";
486
+ };
487
+ readonly ifMatch: {
488
+ readonly $ref: "#/$defs/WebsiteEtag";
489
+ };
490
+ };
491
+ };
492
+ readonly WebsiteEtag: {
493
+ readonly title: "WebsiteEtag";
494
+ readonly type: "string";
495
+ readonly pattern: "^[0-9a-f]{64}$";
496
+ readonly description: "A file's content hash: the lowercase hex SHA-256 of its bytes — the `etag` vtc/website/files/list reports, and the `ETag` a direct read of the path returns, without the HTTP quotes.";
497
+ };
498
+ readonly WebsitePath: {
499
+ readonly title: "WebsitePath";
500
+ readonly type: "string";
501
+ readonly minLength: 1;
502
+ readonly maxLength: 1024;
503
+ readonly pattern: "^[^\\\\]+$";
504
+ readonly description: "A file's path relative to the site root, `/`-separated, with or without a leading `/`. The community resolves it inside the site root and refuses one that escapes the root (`..`), names a hidden file or directory (a segment beginning `.`), carries a blocklisted extension, or contains a control character — the same rules the public read handler applies, so nothing can be written that the site would refuse to serve, and nothing can be read that it would not.";
505
+ };
506
+ };
507
+ };
508
+ };
509
+ /**
510
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
511
+ * tracks the *issuer* party's requirement because a response swaps the
512
+ * parties (§7.3 item 5).
513
+ */
514
+ export declare const RESPONSE_SPEC: {
515
+ readonly typeUri: "https://trusttasks.org/spec/vtc/website/upload/begin/0.1#response";
516
+ readonly isBearer: false;
517
+ readonly isProofRequired: true;
518
+ readonly isRecipientRequired: true;
519
+ readonly isIssuedAtRequired: true;
520
+ readonly payloadSchema: {
521
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
522
+ readonly $ref: "#/$defs/Response";
523
+ readonly $defs: {
524
+ readonly Response: {
525
+ readonly $anchor: "response";
526
+ readonly title: "VTC Website — Upload — Begin — response payload";
527
+ readonly type: "object";
528
+ readonly additionalProperties: false;
529
+ readonly required: readonly ["uploadId", "expiresAt"];
530
+ readonly properties: {
531
+ readonly uploadId: {
532
+ readonly $ref: "#/$defs/UploadId";
533
+ };
534
+ readonly expiresAt: {
535
+ readonly $ref: "#/$defs/ExpiresAt";
536
+ };
537
+ readonly ext: {
538
+ readonly $ref: "#/$defs/Ext";
539
+ };
540
+ };
541
+ };
542
+ readonly Ext: {
543
+ readonly title: "Ext";
544
+ 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.";
545
+ readonly type: "object";
546
+ readonly minProperties: 1;
547
+ readonly additionalProperties: true;
548
+ readonly propertyNames: {
549
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
550
+ };
551
+ };
552
+ readonly ExpiresAt: {
553
+ readonly title: "ExpiresAt";
554
+ readonly 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.";
555
+ readonly type: "string";
556
+ readonly format: "date-time";
557
+ };
558
+ readonly UploadId: {
559
+ readonly title: "UploadId";
560
+ readonly type: "string";
561
+ readonly 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}$";
562
+ readonly description: "Handle for one upload across begin, chunk, commit and abort, and — for a bundle — deploy. Recipient-generated and unguessable, which is what lets a reference to somebody else's upload be answered as not-found without confirming it exists. Opaque: a producer quotes what it was given.";
563
+ };
564
+ readonly ChunkManifest: {
565
+ readonly title: "ChunkManifest";
566
+ readonly 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.";
567
+ readonly type: "object";
568
+ readonly additionalProperties: false;
569
+ readonly required: readonly ["chunkSize", "chunkCount", "chunkDigests"];
570
+ readonly properties: {
571
+ readonly chunkSize: {
572
+ readonly $ref: "#/$defs/ChunkSize";
573
+ };
574
+ readonly chunkCount: {
575
+ readonly $ref: "#/$defs/ChunkCount";
576
+ };
577
+ readonly chunkDigests: {
578
+ readonly type: "array";
579
+ readonly minItems: 1;
580
+ readonly maxItems: 4096;
581
+ readonly 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.";
582
+ readonly items: {
583
+ readonly $ref: "#/$defs/DigestMultibase";
584
+ };
585
+ };
586
+ };
587
+ };
588
+ readonly ChunkCount: {
589
+ readonly title: "ChunkCount";
590
+ readonly 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.";
591
+ readonly type: "integer";
592
+ readonly minimum: 1;
593
+ readonly maximum: 4096;
594
+ };
595
+ readonly ChunkSize: {
596
+ readonly title: "ChunkSize";
597
+ readonly 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.";
598
+ readonly type: "integer";
599
+ readonly minimum: 16384;
600
+ readonly maximum: 262144;
601
+ };
602
+ readonly DigestMultibase: {
603
+ readonly title: "DigestMultibase";
604
+ readonly 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`.";
605
+ readonly type: "string";
606
+ readonly minLength: 16;
607
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
608
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
609
+ };
610
+ readonly ExpectedSizeBytes: {
611
+ readonly title: "ExpectedSizeBytes";
612
+ readonly description: "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.";
613
+ readonly type: "integer";
614
+ readonly minimum: 1;
615
+ };
616
+ readonly ExpectedSha256: {
617
+ readonly title: "ExpectedSha256";
618
+ readonly description: "Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.";
619
+ readonly type: "string";
620
+ readonly pattern: "^[0-9a-f]{64}$";
621
+ };
622
+ readonly UploadTarget: {
623
+ readonly title: "UploadTarget";
624
+ readonly type: "object";
625
+ readonly additionalProperties: false;
626
+ readonly required: readonly ["kind"];
627
+ readonly description: "What the uploaded bytes are for, committed before any byte moves. `file`: one file at `path`, written into the site when the upload commits — the single-file write. `bundle`: a gzip-compressed tar of the whole site, staged when the upload commits and published by vtc/website/deploy. `path` is required for a `file` target and forbidden for a `bundle`, and `ifMatch` is allowed only for a `file` — rules over two members that this schema does not express; a community refuses a violation with `malformedRequest`. `ifMatch` is optimistic concurrency: the write commits only if the file's current content hash is this value.";
628
+ readonly properties: {
629
+ readonly kind: {
630
+ readonly type: "string";
631
+ readonly enum: readonly ["file", "bundle"];
632
+ };
633
+ readonly path: {
634
+ readonly $ref: "#/$defs/WebsitePath";
635
+ };
636
+ readonly ifMatch: {
637
+ readonly $ref: "#/$defs/WebsiteEtag";
638
+ };
639
+ };
640
+ };
641
+ readonly WebsiteEtag: {
642
+ readonly title: "WebsiteEtag";
643
+ readonly type: "string";
644
+ readonly pattern: "^[0-9a-f]{64}$";
645
+ readonly description: "A file's content hash: the lowercase hex SHA-256 of its bytes — the `etag` vtc/website/files/list reports, and the `ETag` a direct read of the path returns, without the HTTP quotes.";
646
+ };
647
+ readonly WebsitePath: {
648
+ readonly title: "WebsitePath";
649
+ readonly type: "string";
650
+ readonly minLength: 1;
651
+ readonly maxLength: 1024;
652
+ readonly pattern: "^[^\\\\]+$";
653
+ readonly description: "A file's path relative to the site root, `/`-separated, with or without a leading `/`. The community resolves it inside the site root and refuses one that escapes the root (`..`), names a hidden file or directory (a segment beginning `.`), carries a blocklisted extension, or contains a control character — the same rules the public read handler applies, so nothing can be written that the site would refuse to serve, and nothing can be read that it would not.";
654
+ };
655
+ };
656
+ };
657
+ };
658
+ //# sourceMappingURL=payload.d.ts.map