@openvtc/trust-tasks 0.28.13 → 0.28.14

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.
@@ -0,0 +1,266 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/trust-task-discovery/0.4/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.4";
7
+ /**
8
+ * The earlier version of this specification that this one declares it
9
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
10
+ * `null`. Only the direct declaration — follow the chain with
11
+ * `extendsChain` / `readForSpec`.
12
+ */
13
+ export const EXTENDS = null;
14
+ /**
15
+ * Why this version is deprecated, or `null` while it is current. A
16
+ * superseded or retired version is still supported, and is withdrawn from
17
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
18
+ * Versions").
19
+ */
20
+ export const DEPRECATION = null;
21
+ /** Trust Task response type URI (request type URI + "#response"). */
22
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.4#response";
23
+ /**
24
+ * This specification's payload schema, as a value.
25
+ *
26
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
27
+ * rather than only as a `.json` file because TypeScript types are erased
28
+ * at runtime: without a schema a consumer has nothing to validate, and
29
+ * every REQUIRED payload member is optional in practice. Cross-file
30
+ * `$ref`s are already inlined, so it needs no resolver.
31
+ */
32
+ export const PAYLOAD_SCHEMA = {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "$id": "https://trusttasks.org/spec/trust-task-discovery/0.4",
35
+ "title": "Trust Task Discovery — payload",
36
+ "description": "Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.",
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "patterns": {
41
+ "type": "array",
42
+ "maxItems": 16,
43
+ "items": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Slug-glob pattern. Matches: '*' (every slug); '<prefix>/*' (any slug starting with '<prefix>/' — e.g. 'acl/*' matches 'acl/grant', 'acl/revoke', 'acl/grant/sub'); otherwise an exact slug match. Wildcards anywhere other than as a trailing segment are not interpreted — the only sigils are the trailing '/*' and the bare '*'."
47
+ },
48
+ "description": "Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally."
49
+ }
50
+ },
51
+ "$defs": {
52
+ "AcceptanceWindow": {
53
+ "title": "Acceptance window",
54
+ "description": "The acceptance window a responder applies, as a consumer, to documents it receives (SPEC.md §7.2 items 4 and 13, *Bounding the record*). A document's acceptance end is issuedAt + maxAgeSeconds where it states no `expiresAt`; where it states one, the earlier of `expiresAt` and issuedAt + expiryHorizonSeconds, or of `expiresAt` and issuedAt + maxAgeSeconds where the window carries no expiryHorizonSeconds. A responder refuses a document when now is past its acceptance end + clockSkewSeconds, when issuedAt > now + clockSkewSeconds, and when now is at or past a stated `expiresAt`. All members are whole seconds.",
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "maxAgeSeconds",
59
+ "clockSkewSeconds"
60
+ ],
61
+ "properties": {
62
+ "maxAgeSeconds": {
63
+ "type": "integer",
64
+ "minimum": 1,
65
+ "description": "The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts a document that states no `expiresAt`, before any clock-skew tolerance is applied."
66
+ },
67
+ "clockSkewSeconds": {
68
+ "type": "integer",
69
+ "minimum": 0,
70
+ "description": "The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none."
71
+ },
72
+ "expiryHorizonSeconds": {
73
+ "type": "integer",
74
+ "minimum": 1,
75
+ "description": "The greatest span, in whole seconds, after a document's `issuedAt` up to which the responder honours a stated `expiresAt` in place of maxAgeSeconds. An `expiresAt` beyond it is not refused; the horizon applies in its place. Absent: the responder applies maxAgeSeconds to every document, whatever `expiresAt` it states, as a trust-task-discovery/0.3 window does."
76
+ }
77
+ }
78
+ },
79
+ "Response": {
80
+ "$anchor": "response",
81
+ "title": "Trust Task Discovery — response payload",
82
+ "description": "List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.4#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "supportedTypes"
87
+ ],
88
+ "properties": {
89
+ "supportedTypes": {
90
+ "type": "array",
91
+ "items": {
92
+ "oneOf": [
93
+ {
94
+ "type": "string",
95
+ "format": "uri",
96
+ "description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
97
+ },
98
+ {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "type"
103
+ ],
104
+ "properties": {
105
+ "type": {
106
+ "type": "string",
107
+ "format": "uri",
108
+ "description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
109
+ },
110
+ "requiredExt": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string",
114
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
115
+ },
116
+ "minItems": 1,
117
+ "uniqueItems": true,
118
+ "description": "Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies."
119
+ },
120
+ "acceptanceWindow": {
121
+ "$ref": "#/$defs/AcceptanceWindow"
122
+ }
123
+ },
124
+ "description": "Object form: lists a Type URI together with optional capability annotations. An `acceptanceWindow` here is the window the responder applies to documents of this Type URI, and takes precedence over the response-level `acceptanceWindow` for this entry."
125
+ }
126
+ ],
127
+ "description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`, `acceptanceWindow`)."
128
+ },
129
+ "description": "Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form."
130
+ },
131
+ "frameworkVersion": {
132
+ "type": "string",
133
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
134
+ "description": "MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH."
135
+ },
136
+ "acceptanceWindow": {
137
+ "$ref": "#/$defs/AcceptanceWindow"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ };
143
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
144
+ export const RESPONSE_PAYLOAD_SCHEMA = {
145
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
146
+ "$ref": "#/$defs/Response",
147
+ "$defs": {
148
+ "AcceptanceWindow": {
149
+ "title": "Acceptance window",
150
+ "description": "The acceptance window a responder applies, as a consumer, to documents it receives (SPEC.md §7.2 items 4 and 13, *Bounding the record*). A document's acceptance end is issuedAt + maxAgeSeconds where it states no `expiresAt`; where it states one, the earlier of `expiresAt` and issuedAt + expiryHorizonSeconds, or of `expiresAt` and issuedAt + maxAgeSeconds where the window carries no expiryHorizonSeconds. A responder refuses a document when now is past its acceptance end + clockSkewSeconds, when issuedAt > now + clockSkewSeconds, and when now is at or past a stated `expiresAt`. All members are whole seconds.",
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": [
154
+ "maxAgeSeconds",
155
+ "clockSkewSeconds"
156
+ ],
157
+ "properties": {
158
+ "maxAgeSeconds": {
159
+ "type": "integer",
160
+ "minimum": 1,
161
+ "description": "The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts a document that states no `expiresAt`, before any clock-skew tolerance is applied."
162
+ },
163
+ "clockSkewSeconds": {
164
+ "type": "integer",
165
+ "minimum": 0,
166
+ "description": "The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none."
167
+ },
168
+ "expiryHorizonSeconds": {
169
+ "type": "integer",
170
+ "minimum": 1,
171
+ "description": "The greatest span, in whole seconds, after a document's `issuedAt` up to which the responder honours a stated `expiresAt` in place of maxAgeSeconds. An `expiresAt` beyond it is not refused; the horizon applies in its place. Absent: the responder applies maxAgeSeconds to every document, whatever `expiresAt` it states, as a trust-task-discovery/0.3 window does."
172
+ }
173
+ }
174
+ },
175
+ "Response": {
176
+ "$anchor": "response",
177
+ "title": "Trust Task Discovery — response payload",
178
+ "description": "List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.4#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.",
179
+ "type": "object",
180
+ "additionalProperties": false,
181
+ "required": [
182
+ "supportedTypes"
183
+ ],
184
+ "properties": {
185
+ "supportedTypes": {
186
+ "type": "array",
187
+ "items": {
188
+ "oneOf": [
189
+ {
190
+ "type": "string",
191
+ "format": "uri",
192
+ "description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
193
+ },
194
+ {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "required": [
198
+ "type"
199
+ ],
200
+ "properties": {
201
+ "type": {
202
+ "type": "string",
203
+ "format": "uri",
204
+ "description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
205
+ },
206
+ "requiredExt": {
207
+ "type": "array",
208
+ "items": {
209
+ "type": "string",
210
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
211
+ },
212
+ "minItems": 1,
213
+ "uniqueItems": true,
214
+ "description": "Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies."
215
+ },
216
+ "acceptanceWindow": {
217
+ "$ref": "#/$defs/AcceptanceWindow"
218
+ }
219
+ },
220
+ "description": "Object form: lists a Type URI together with optional capability annotations. An `acceptanceWindow` here is the window the responder applies to documents of this Type URI, and takes precedence over the response-level `acceptanceWindow` for this entry."
221
+ }
222
+ ],
223
+ "description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`, `acceptanceWindow`)."
224
+ },
225
+ "description": "Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form."
226
+ },
227
+ "frameworkVersion": {
228
+ "type": "string",
229
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
230
+ "description": "MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH."
231
+ },
232
+ "acceptanceWindow": {
233
+ "$ref": "#/$defs/AcceptanceWindow"
234
+ }
235
+ }
236
+ }
237
+ }
238
+ };
239
+ /**
240
+ * SPEC.md §7.2 policy for the request variant, from this specification's
241
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
242
+ * per-specification and cannot be derived from the document alone, and
243
+ * item 2 needs the schema this carries.
244
+ */
245
+ export const SPEC = {
246
+ typeUri: TYPE_URI,
247
+ isBearer: false,
248
+ isProofRequired: false,
249
+ isRecipientRequired: true,
250
+ isIssuedAtRequired: false,
251
+ payloadSchema: PAYLOAD_SCHEMA,
252
+ };
253
+ /**
254
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
255
+ * tracks the *issuer* party's requirement because a response swaps the
256
+ * parties (§7.3 item 5).
257
+ */
258
+ export const RESPONSE_SPEC = {
259
+ typeUri: RESPONSE_TYPE_URI,
260
+ isBearer: false,
261
+ isProofRequired: false,
262
+ isRecipientRequired: true,
263
+ isIssuedAtRequired: false,
264
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
265
+ };
266
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../src/trust-task-discovery/0.4/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8GH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAExF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB,IAAI,CAAC;AAK/C,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC;AAK1G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B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BACvP;gBACD,kBAAkB,EAAE;oBAClB,MAAM,EAAE,QAAQ;oBAChB,SAAS,EAAE,uDAAuD;oBAClE,aAAa,EAAE,6jBAA6jB;iBAC7kB;gBACD,kBAAkB,EAAE;oBAClB,MAAM,EAAE,0BAA0B;iBACnC;aACF;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,KAAK;IACzB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,KAAK;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.28.13",
3
+ "version": "0.28.14",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -1938,6 +1938,7 @@ export * as TrustTaskControl_v0_1 from "./trust-task-control/0.1/payload.js";
1938
1938
  export * as TrustTaskDiscovery_v0_1 from "./trust-task-discovery/0.1/payload.js";
1939
1939
  export * as TrustTaskDiscovery_v0_2 from "./trust-task-discovery/0.2/payload.js";
1940
1940
  export * as TrustTaskDiscovery_v0_3 from "./trust-task-discovery/0.3/payload.js";
1941
+ export * as TrustTaskDiscovery_v0_4 from "./trust-task-discovery/0.4/payload.js";
1941
1942
  export * as TrustTaskError_v0_1 from "./trust-task-error/0.1/payload.js";
1942
1943
  export * as TrustTaskError_v0_2 from "./trust-task-error/0.2/payload.js";
1943
1944
  export * as TrustTaskError_v0_3 from "./trust-task-error/0.3/payload.js";
@@ -3,7 +3,7 @@
3
3
  * Source: specs/process-attestation/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Ext } from "../../_shared/components.js";
6
+ import type { DigestMultibase, Ext } from "../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**
@@ -22,6 +22,10 @@ export type ReceiptReference =
22
22
  type: "uri";
23
23
  uri: string;
24
24
  mediaType?: string;
25
+ /**
26
+ * Digest of the exact receipt bytes the URI serves. The response's proof covers the URI and not what it serves, so this is what lets a retained response show which receipt it referred to; a Verifier that dereferences the URI compares before relying on the bytes (Verifier rule 6).
27
+ */
28
+ digestMultibase?: DigestMultibase;
25
29
  }
26
30
  | {
27
31
  type: "inline";
@@ -102,13 +106,19 @@ export interface Disclosed {
102
106
  endedAt?: string;
103
107
  checkpointCount?: number;
104
108
  };
109
+ /**
110
+ * The Holder's own report of its receipt's state. It is not verification: a Verifier relies on its own verification of the receipt (Verifier rules 4 and 7).
111
+ */
105
112
  integrity?: {
106
113
  chainValid?: boolean;
107
114
  signatureValid?: boolean;
108
115
  keyCustody?: "software" | "tpm" | "secureEnclave";
109
116
  };
110
117
  anchors?: {
111
- kind: "rfc3161" | "opentimestamps" | "roughtime";
118
+ /**
119
+ * The anchoring mechanism. `rfc3161` is a timestamp-authority response, `opentimestamps` an OpenTimestamps proof, `roughtime` a Roughtime sample, `blockchain` a direct chain anchor. Appended values are additive; a reader passes an unrecognised one through.
120
+ */
121
+ kind: "rfc3161" | "opentimestamps" | "roughtime" | "blockchain";
112
122
  anchoredAt?: string;
113
123
  }[];
114
124
  }
@@ -123,7 +133,7 @@ export interface Unavailable {
123
133
  }
124
134
 
125
135
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
126
- export type { Ext };
136
+ export type { DigestMultibase, Ext };
127
137
 
128
138
  /** Trust Task type URI. */
129
139
  export const TYPE_URI = "https://trusttasks.org/spec/process-attestation/0.1" as const;
@@ -350,6 +360,10 @@ export const PAYLOAD_SCHEMA = {
350
360
  "mediaType": {
351
361
  "type": "string",
352
362
  "maxLength": 255
363
+ },
364
+ "digestMultibase": {
365
+ "$ref": "#/$defs/DigestMultibase",
366
+ "description": "Digest of the exact receipt bytes the URI serves. The response's proof covers the URI and not what it serves, so this is what lets a retained response show which receipt it referred to; a Verifier that dereferences the URI compares before relying on the bytes (Verifier rule 6)."
353
367
  }
354
368
  }
355
369
  },
@@ -440,7 +454,8 @@ export const PAYLOAD_SCHEMA = {
440
454
  "secureEnclave"
441
455
  ]
442
456
  }
443
- }
457
+ },
458
+ "description": "The Holder's own report of its receipt's state. It is not verification: a Verifier relies on its own verification of the receipt (Verifier rules 4 and 7)."
444
459
  },
445
460
  "anchors": {
446
461
  "type": "array",
@@ -456,8 +471,10 @@ export const PAYLOAD_SCHEMA = {
456
471
  "enum": [
457
472
  "rfc3161",
458
473
  "opentimestamps",
459
- "roughtime"
460
- ]
474
+ "roughtime",
475
+ "blockchain"
476
+ ],
477
+ "description": "The anchoring mechanism. `rfc3161` is a timestamp-authority response, `opentimestamps` an OpenTimestamps proof, `roughtime` a Roughtime sample, `blockchain` a direct chain anchor. Appended values are additive; a reader passes an unrecognised one through."
461
478
  },
462
479
  "anchoredAt": {
463
480
  "type": "string",
@@ -468,6 +485,16 @@ export const PAYLOAD_SCHEMA = {
468
485
  }
469
486
  }
470
487
  },
488
+ "DigestMultibase": {
489
+ "title": "DigestMultibase",
490
+ "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`.",
491
+ "type": "string",
492
+ "minLength": 16,
493
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
494
+ "examples": [
495
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
496
+ ]
497
+ },
471
498
  "Ext": {
472
499
  "title": "Ext",
473
500
  "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.",
@@ -640,6 +667,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
640
667
  "mediaType": {
641
668
  "type": "string",
642
669
  "maxLength": 255
670
+ },
671
+ "digestMultibase": {
672
+ "$ref": "#/$defs/DigestMultibase",
673
+ "description": "Digest of the exact receipt bytes the URI serves. The response's proof covers the URI and not what it serves, so this is what lets a retained response show which receipt it referred to; a Verifier that dereferences the URI compares before relying on the bytes (Verifier rule 6)."
643
674
  }
644
675
  }
645
676
  },
@@ -730,7 +761,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
730
761
  "secureEnclave"
731
762
  ]
732
763
  }
733
- }
764
+ },
765
+ "description": "The Holder's own report of its receipt's state. It is not verification: a Verifier relies on its own verification of the receipt (Verifier rules 4 and 7)."
734
766
  },
735
767
  "anchors": {
736
768
  "type": "array",
@@ -746,8 +778,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
746
778
  "enum": [
747
779
  "rfc3161",
748
780
  "opentimestamps",
749
- "roughtime"
750
- ]
781
+ "roughtime",
782
+ "blockchain"
783
+ ],
784
+ "description": "The anchoring mechanism. `rfc3161` is a timestamp-authority response, `opentimestamps` an OpenTimestamps proof, `roughtime` a Roughtime sample, `blockchain` a direct chain anchor. Appended values are additive; a reader passes an unrecognised one through."
751
785
  },
752
786
  "anchoredAt": {
753
787
  "type": "string",
@@ -758,6 +792,16 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
758
792
  }
759
793
  }
760
794
  },
795
+ "DigestMultibase": {
796
+ "title": "DigestMultibase",
797
+ "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`.",
798
+ "type": "string",
799
+ "minLength": 16,
800
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
801
+ "examples": [
802
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
803
+ ]
804
+ },
761
805
  "Ext": {
762
806
  "title": "Ext",
763
807
  "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.",
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.
8
8
  *
9
- * @deprecated superseded by trust-task-discovery/0.3
9
+ * @deprecated superseded by trust-task-discovery/0.4
10
10
  */
11
11
  export interface TrustTaskDiscoveryPayload {
12
12
  /**
@@ -69,7 +69,7 @@ export interface TrustTaskDiscoveryPayload {
69
69
  /**
70
70
  * List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.1#response.
71
71
  *
72
- * @deprecated superseded by trust-task-discovery/0.3
72
+ * @deprecated superseded by trust-task-discovery/0.4
73
73
  */
74
74
  export interface TrustTaskDiscoveryResponsePayload {
75
75
  /**
@@ -113,12 +113,12 @@ export const EXTENDS: string | null = null;
113
113
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
114
114
  * Versions").
115
115
  */
116
- export const DEPRECATION: string | null = "superseded by trust-task-discovery/0.3";
116
+ export const DEPRECATION: string | null = "superseded by trust-task-discovery/0.4";
117
117
 
118
118
  /**
119
119
  * Stable alias for this specification's request payload shape.
120
120
  *
121
- * @deprecated superseded by trust-task-discovery/0.3
121
+ * @deprecated superseded by trust-task-discovery/0.4
122
122
  */
123
123
  export type Payload = TrustTaskDiscoveryPayload;
124
124
 
@@ -128,7 +128,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discove
128
128
  /**
129
129
  * Stable alias for this specification's success-response payload shape.
130
130
  *
131
- * @deprecated superseded by trust-task-discovery/0.3
131
+ * @deprecated superseded by trust-task-discovery/0.4
132
132
  */
133
133
  export type Response = TrustTaskDiscoveryResponsePayload;
134
134
 
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.
8
8
  *
9
- * @deprecated superseded by trust-task-discovery/0.3
9
+ * @deprecated superseded by trust-task-discovery/0.4
10
10
  */
11
11
  export interface TrustTaskDiscoveryPayload {
12
12
  /**
@@ -69,7 +69,7 @@ export interface TrustTaskDiscoveryPayload {
69
69
  /**
70
70
  * List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.2#response.
71
71
  *
72
- * @deprecated superseded by trust-task-discovery/0.3
72
+ * @deprecated superseded by trust-task-discovery/0.4
73
73
  */
74
74
  export interface TrustTaskDiscoveryResponsePayload {
75
75
  /**
@@ -113,12 +113,12 @@ export const EXTENDS: string | null = null;
113
113
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
114
114
  * Versions").
115
115
  */
116
- export const DEPRECATION: string | null = "superseded by trust-task-discovery/0.3";
116
+ export const DEPRECATION: string | null = "superseded by trust-task-discovery/0.4";
117
117
 
118
118
  /**
119
119
  * Stable alias for this specification's request payload shape.
120
120
  *
121
- * @deprecated superseded by trust-task-discovery/0.3
121
+ * @deprecated superseded by trust-task-discovery/0.4
122
122
  */
123
123
  export type Payload = TrustTaskDiscoveryPayload;
124
124
 
@@ -128,7 +128,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discove
128
128
  /**
129
129
  * Stable alias for this specification's success-response payload shape.
130
130
  *
131
- * @deprecated superseded by trust-task-discovery/0.3
131
+ * @deprecated superseded by trust-task-discovery/0.4
132
132
  */
133
133
  export type Response = TrustTaskDiscoveryResponsePayload;
134
134
 
@@ -5,6 +5,8 @@
5
5
 
6
6
  /**
7
7
  * Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.
8
+ *
9
+ * @deprecated superseded by trust-task-discovery/0.4
8
10
  */
9
11
  export interface TrustTaskDiscoveryPayload {
10
12
  /**
@@ -66,6 +68,8 @@ export interface TrustTaskDiscoveryPayload {
66
68
  }
67
69
  /**
68
70
  * List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.
71
+ *
72
+ * @deprecated superseded by trust-task-discovery/0.4
69
73
  */
70
74
  export interface TrustTaskDiscoveryResponsePayload {
71
75
  /**
@@ -124,15 +128,23 @@ export const EXTENDS: string | null = null;
124
128
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
125
129
  * Versions").
126
130
  */
127
- export const DEPRECATION: string | null = null;
131
+ export const DEPRECATION: string | null = "superseded by trust-task-discovery/0.4";
128
132
 
129
- /** Stable alias for this specification's request payload shape. */
133
+ /**
134
+ * Stable alias for this specification's request payload shape.
135
+ *
136
+ * @deprecated superseded by trust-task-discovery/0.4
137
+ */
130
138
  export type Payload = TrustTaskDiscoveryPayload;
131
139
 
132
140
  /** Trust Task response type URI (request type URI + "#response"). */
133
141
  export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.3#response" as const;
134
142
 
135
- /** Stable alias for this specification's success-response payload shape. */
143
+ /**
144
+ * Stable alias for this specification's success-response payload shape.
145
+ *
146
+ * @deprecated superseded by trust-task-discovery/0.4
147
+ */
136
148
  export type Response = TrustTaskDiscoveryResponsePayload;
137
149
 
138
150
  /**