@openvtc/trust-tasks 0.18.3 → 0.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +193 -0
- package/dist/_shared/components.d.ts +56 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/process-attestation/0.1/payload.d.ts +1190 -0
- package/dist/process-attestation/0.1/payload.d.ts.map +1 -0
- package/dist/process-attestation/0.1/payload.js +660 -0
- package/dist/process-attestation/0.1/payload.js.map +1 -0
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.d.ts +58 -2
- package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.js +32 -0
- package/dist/rooms/create/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/commits/0.1/payload.d.ts +506 -0
- package/dist/rooms/epoch/commits/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/commits/0.1/payload.js +268 -0
- package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -0
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +20 -0
- package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.js +5 -0
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/prune/0.1/payload.d.ts +423 -0
- package/dist/rooms/epoch/prune/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/prune/0.1/payload.js +229 -0
- package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/browse/0.1/payload.d.ts +20 -0
- package/dist/rooms/keys/browse/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/browse/0.1/payload.js +24 -0
- package/dist/rooms/keys/browse/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.d.ts +20 -0
- package/dist/rooms/keys/read/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.js +24 -0
- package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
- package/dist/rooms/owner/anchor/0.1/payload.d.ts +537 -0
- package/dist/rooms/owner/anchor/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/anchor/0.1/payload.js +291 -0
- package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +56 -0
- package/src/index.ts +4 -0
- package/src/process-attestation/0.1/payload.ts +794 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.1/payload.ts +42 -2
- package/src/rooms/epoch/commits/0.1/payload.ts +341 -0
- package/src/rooms/epoch/mint/0.1/payload.ts +15 -0
- package/src/rooms/epoch/prune/0.1/payload.ts +289 -0
- package/src/rooms/keys/browse/0.1/payload.ts +24 -0
- package/src/rooms/keys/read/0.1/payload.ts +24 -0
- package/src/rooms/owner/anchor/0.1/payload.ts +353 -0
|
@@ -0,0 +1,1190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/process-attestation/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1.
|
|
8
|
+
*/
|
|
9
|
+
export type DisclosureCategory = "document" | "timeline" | "integrity" | "anchors";
|
|
10
|
+
/**
|
|
11
|
+
* The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.
|
|
12
|
+
*/
|
|
13
|
+
export type ProcessAttestationResponsePayload = Attested | Unavailable;
|
|
14
|
+
/**
|
|
15
|
+
* Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.
|
|
16
|
+
*/
|
|
17
|
+
export type ReceiptReference = {
|
|
18
|
+
type: "uri";
|
|
19
|
+
uri: string;
|
|
20
|
+
mediaType?: string;
|
|
21
|
+
} | {
|
|
22
|
+
type: "inline";
|
|
23
|
+
mediaType: string;
|
|
24
|
+
/**
|
|
25
|
+
* base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.
|
|
26
|
+
*/
|
|
27
|
+
data: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* What a Verifier asks of a Holder: identify an artifact by digest, supply a freshness challenge, and name the disclosure categories wanted. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
31
|
+
*/
|
|
32
|
+
export interface ProcessAttestationPayload {
|
|
33
|
+
artifact: Artifact;
|
|
34
|
+
/**
|
|
35
|
+
* Verifier-supplied freshness nonce, echoed verbatim in the response. The floor is 16 characters because anti-replay is the only integrity property the request has.
|
|
36
|
+
*/
|
|
37
|
+
challenge: string;
|
|
38
|
+
/**
|
|
39
|
+
* Categories the Verifier requests. A Holder MAY return fewer; it MUST NOT return more.
|
|
40
|
+
*/
|
|
41
|
+
disclosure?: DisclosureCategory[];
|
|
42
|
+
ext?: Ext;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Deterministic identification of the object whose production is in question.
|
|
46
|
+
*/
|
|
47
|
+
export interface Artifact {
|
|
48
|
+
/**
|
|
49
|
+
* base64url, unpadded.
|
|
50
|
+
*/
|
|
51
|
+
digest: string;
|
|
52
|
+
/**
|
|
53
|
+
* Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values.
|
|
54
|
+
*/
|
|
55
|
+
algorithm: "sha-256" | "sha-384" | "sha-512" | "blake3";
|
|
56
|
+
byteLength?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface Attested {
|
|
59
|
+
result: "attested";
|
|
60
|
+
/**
|
|
61
|
+
* The request's challenge, echoed verbatim.
|
|
62
|
+
*/
|
|
63
|
+
challenge: string;
|
|
64
|
+
artifact: Artifact;
|
|
65
|
+
ext?: Ext;
|
|
66
|
+
assessment: Assessment;
|
|
67
|
+
receiptReference: ReceiptReference;
|
|
68
|
+
disclosed?: Disclosed;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Opaque at the task layer. The task standardizes the interaction, not the receipt.
|
|
72
|
+
*/
|
|
73
|
+
export interface Assessment {
|
|
74
|
+
/**
|
|
75
|
+
* Specification the receipt is verified under. Names which vocabulary `determination` belongs to.
|
|
76
|
+
*/
|
|
77
|
+
primitive: string;
|
|
78
|
+
/**
|
|
79
|
+
* Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean.
|
|
80
|
+
*/
|
|
81
|
+
determination: string;
|
|
82
|
+
/**
|
|
83
|
+
* The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property.
|
|
84
|
+
*/
|
|
85
|
+
confidence?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Only the categories the request asked for.
|
|
89
|
+
*/
|
|
90
|
+
export interface Disclosed {
|
|
91
|
+
document?: {
|
|
92
|
+
byteLength?: number;
|
|
93
|
+
mediaType?: string;
|
|
94
|
+
};
|
|
95
|
+
timeline?: {
|
|
96
|
+
startedAt?: string;
|
|
97
|
+
endedAt?: string;
|
|
98
|
+
checkpointCount?: number;
|
|
99
|
+
};
|
|
100
|
+
integrity?: {
|
|
101
|
+
chainValid?: boolean;
|
|
102
|
+
signatureValid?: boolean;
|
|
103
|
+
keyCustody?: "software" | "tpm" | "secureEnclave";
|
|
104
|
+
};
|
|
105
|
+
anchors?: {
|
|
106
|
+
kind: "rfc3161" | "opentimestamps" | "roughtime";
|
|
107
|
+
anchoredAt?: string;
|
|
108
|
+
}[];
|
|
109
|
+
}
|
|
110
|
+
export interface Unavailable {
|
|
111
|
+
result: "unavailable";
|
|
112
|
+
/**
|
|
113
|
+
* The request's challenge, echoed verbatim.
|
|
114
|
+
*/
|
|
115
|
+
challenge: string;
|
|
116
|
+
artifact: Artifact;
|
|
117
|
+
ext?: Ext;
|
|
118
|
+
}
|
|
119
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
120
|
+
export type { Ext };
|
|
121
|
+
/** Trust Task type URI. */
|
|
122
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/process-attestation/0.1";
|
|
123
|
+
/** Stable alias for this specification's request payload shape. */
|
|
124
|
+
export type Payload = ProcessAttestationPayload;
|
|
125
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
126
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/process-attestation/0.1#response";
|
|
127
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
128
|
+
export type Response = ProcessAttestationResponsePayload;
|
|
129
|
+
/**
|
|
130
|
+
* This specification's payload schema, as a value.
|
|
131
|
+
*
|
|
132
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
133
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
134
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
135
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
136
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
137
|
+
*/
|
|
138
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
139
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
140
|
+
readonly $id: "https://trusttasks.org/spec/process-attestation/0.1";
|
|
141
|
+
readonly title: "Process Attestation — payload";
|
|
142
|
+
readonly description: "What a Verifier asks of a Holder: identify an artifact by digest, supply a freshness challenge, and name the disclosure categories wanted. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
143
|
+
readonly type: "object";
|
|
144
|
+
readonly additionalProperties: false;
|
|
145
|
+
readonly required: readonly ["artifact", "challenge"];
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly artifact: {
|
|
148
|
+
readonly $ref: "#/$defs/Artifact";
|
|
149
|
+
};
|
|
150
|
+
readonly challenge: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
readonly minLength: 16;
|
|
153
|
+
readonly maxLength: 256;
|
|
154
|
+
readonly description: "Verifier-supplied freshness nonce, echoed verbatim in the response. The floor is 16 characters because anti-replay is the only integrity property the request has.";
|
|
155
|
+
};
|
|
156
|
+
readonly disclosure: {
|
|
157
|
+
readonly type: "array";
|
|
158
|
+
readonly uniqueItems: true;
|
|
159
|
+
readonly items: {
|
|
160
|
+
readonly $ref: "#/$defs/DisclosureCategory";
|
|
161
|
+
};
|
|
162
|
+
readonly description: "Categories the Verifier requests. A Holder MAY return fewer; it MUST NOT return more.";
|
|
163
|
+
};
|
|
164
|
+
readonly ext: {
|
|
165
|
+
readonly $ref: "#/$defs/Ext";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
readonly $defs: {
|
|
169
|
+
readonly Response: {
|
|
170
|
+
readonly $anchor: "response";
|
|
171
|
+
readonly title: "Process Attestation — response payload";
|
|
172
|
+
readonly description: "The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.";
|
|
173
|
+
readonly unevaluatedProperties: false;
|
|
174
|
+
readonly oneOf: readonly [{
|
|
175
|
+
readonly type: "object";
|
|
176
|
+
readonly title: "Attested";
|
|
177
|
+
readonly additionalProperties: false;
|
|
178
|
+
readonly required: readonly ["result", "challenge", "artifact", "assessment", "receiptReference"];
|
|
179
|
+
readonly properties: {
|
|
180
|
+
readonly result: {
|
|
181
|
+
readonly const: "attested";
|
|
182
|
+
};
|
|
183
|
+
readonly challenge: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly minLength: 16;
|
|
186
|
+
readonly maxLength: 256;
|
|
187
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
188
|
+
};
|
|
189
|
+
readonly artifact: {
|
|
190
|
+
readonly $ref: "#/$defs/Artifact";
|
|
191
|
+
};
|
|
192
|
+
readonly ext: {
|
|
193
|
+
readonly $ref: "#/$defs/Ext";
|
|
194
|
+
};
|
|
195
|
+
readonly assessment: {
|
|
196
|
+
readonly $ref: "#/$defs/Assessment";
|
|
197
|
+
};
|
|
198
|
+
readonly receiptReference: {
|
|
199
|
+
readonly $ref: "#/$defs/ReceiptReference";
|
|
200
|
+
};
|
|
201
|
+
readonly disclosed: {
|
|
202
|
+
readonly $ref: "#/$defs/Disclosed";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
}, {
|
|
206
|
+
readonly type: "object";
|
|
207
|
+
readonly title: "Unavailable";
|
|
208
|
+
readonly additionalProperties: false;
|
|
209
|
+
readonly required: readonly ["result", "challenge", "artifact"];
|
|
210
|
+
readonly properties: {
|
|
211
|
+
readonly result: {
|
|
212
|
+
readonly const: "unavailable";
|
|
213
|
+
};
|
|
214
|
+
readonly challenge: {
|
|
215
|
+
readonly type: "string";
|
|
216
|
+
readonly minLength: 16;
|
|
217
|
+
readonly maxLength: 256;
|
|
218
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
219
|
+
};
|
|
220
|
+
readonly artifact: {
|
|
221
|
+
readonly $ref: "#/$defs/Artifact";
|
|
222
|
+
};
|
|
223
|
+
readonly ext: {
|
|
224
|
+
readonly $ref: "#/$defs/Ext";
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}];
|
|
228
|
+
};
|
|
229
|
+
readonly Artifact: {
|
|
230
|
+
readonly type: "object";
|
|
231
|
+
readonly additionalProperties: false;
|
|
232
|
+
readonly required: readonly ["digest", "algorithm"];
|
|
233
|
+
readonly description: "Deterministic identification of the object whose production is in question.";
|
|
234
|
+
readonly properties: {
|
|
235
|
+
readonly digest: {
|
|
236
|
+
readonly type: "string";
|
|
237
|
+
readonly pattern: "^[A-Za-z0-9_-]{16,128}$";
|
|
238
|
+
readonly description: "base64url, unpadded.";
|
|
239
|
+
};
|
|
240
|
+
readonly algorithm: {
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly enum: readonly ["sha-256", "sha-384", "sha-512", "blake3"];
|
|
243
|
+
readonly description: "Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values.";
|
|
244
|
+
};
|
|
245
|
+
readonly byteLength: {
|
|
246
|
+
readonly type: "integer";
|
|
247
|
+
readonly minimum: 0;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly Assessment: {
|
|
252
|
+
readonly type: "object";
|
|
253
|
+
readonly additionalProperties: false;
|
|
254
|
+
readonly required: readonly ["primitive", "determination"];
|
|
255
|
+
readonly description: "Opaque at the task layer. The task standardizes the interaction, not the receipt.";
|
|
256
|
+
readonly properties: {
|
|
257
|
+
readonly primitive: {
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
readonly format: "uri";
|
|
260
|
+
readonly description: "Specification the receipt is verified under. Names which vocabulary `determination` belongs to.";
|
|
261
|
+
readonly maxLength: 2048;
|
|
262
|
+
};
|
|
263
|
+
readonly determination: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
readonly minLength: 1;
|
|
266
|
+
readonly maxLength: 128;
|
|
267
|
+
readonly description: "Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean.";
|
|
268
|
+
};
|
|
269
|
+
readonly confidence: {
|
|
270
|
+
readonly type: "integer";
|
|
271
|
+
readonly minimum: 0;
|
|
272
|
+
readonly maximum: 100;
|
|
273
|
+
readonly description: "The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property.";
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
readonly ReceiptReference: {
|
|
278
|
+
readonly description: "Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.";
|
|
279
|
+
readonly oneOf: readonly [{
|
|
280
|
+
readonly type: "object";
|
|
281
|
+
readonly additionalProperties: false;
|
|
282
|
+
readonly required: readonly ["type", "uri"];
|
|
283
|
+
readonly properties: {
|
|
284
|
+
readonly type: {
|
|
285
|
+
readonly const: "uri";
|
|
286
|
+
};
|
|
287
|
+
readonly uri: {
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
readonly format: "uri";
|
|
290
|
+
readonly maxLength: 2048;
|
|
291
|
+
};
|
|
292
|
+
readonly mediaType: {
|
|
293
|
+
readonly type: "string";
|
|
294
|
+
readonly maxLength: 255;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
}, {
|
|
298
|
+
readonly type: "object";
|
|
299
|
+
readonly additionalProperties: false;
|
|
300
|
+
readonly required: readonly ["type", "mediaType", "data"];
|
|
301
|
+
readonly properties: {
|
|
302
|
+
readonly type: {
|
|
303
|
+
readonly const: "inline";
|
|
304
|
+
};
|
|
305
|
+
readonly mediaType: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
readonly maxLength: 255;
|
|
308
|
+
};
|
|
309
|
+
readonly data: {
|
|
310
|
+
readonly type: "string";
|
|
311
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
312
|
+
readonly description: "base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.";
|
|
313
|
+
readonly maxLength: 262144;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
}];
|
|
317
|
+
};
|
|
318
|
+
readonly DisclosureCategory: {
|
|
319
|
+
readonly type: "string";
|
|
320
|
+
readonly enum: readonly ["document", "timeline", "integrity", "anchors"];
|
|
321
|
+
readonly description: "Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1.";
|
|
322
|
+
};
|
|
323
|
+
readonly Disclosed: {
|
|
324
|
+
readonly type: "object";
|
|
325
|
+
readonly additionalProperties: false;
|
|
326
|
+
readonly description: "Only the categories the request asked for.";
|
|
327
|
+
readonly properties: {
|
|
328
|
+
readonly document: {
|
|
329
|
+
readonly type: "object";
|
|
330
|
+
readonly additionalProperties: false;
|
|
331
|
+
readonly properties: {
|
|
332
|
+
readonly byteLength: {
|
|
333
|
+
readonly type: "integer";
|
|
334
|
+
readonly minimum: 0;
|
|
335
|
+
};
|
|
336
|
+
readonly mediaType: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
readonly maxLength: 255;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
readonly timeline: {
|
|
343
|
+
readonly type: "object";
|
|
344
|
+
readonly additionalProperties: false;
|
|
345
|
+
readonly properties: {
|
|
346
|
+
readonly startedAt: {
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
readonly format: "date-time";
|
|
349
|
+
};
|
|
350
|
+
readonly endedAt: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly format: "date-time";
|
|
353
|
+
};
|
|
354
|
+
readonly checkpointCount: {
|
|
355
|
+
readonly type: "integer";
|
|
356
|
+
readonly minimum: 0;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
readonly integrity: {
|
|
361
|
+
readonly type: "object";
|
|
362
|
+
readonly additionalProperties: false;
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly chainValid: {
|
|
365
|
+
readonly type: "boolean";
|
|
366
|
+
};
|
|
367
|
+
readonly signatureValid: {
|
|
368
|
+
readonly type: "boolean";
|
|
369
|
+
};
|
|
370
|
+
readonly keyCustody: {
|
|
371
|
+
readonly type: "string";
|
|
372
|
+
readonly enum: readonly ["software", "tpm", "secureEnclave"];
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
readonly anchors: {
|
|
377
|
+
readonly type: "array";
|
|
378
|
+
readonly items: {
|
|
379
|
+
readonly type: "object";
|
|
380
|
+
readonly additionalProperties: false;
|
|
381
|
+
readonly required: readonly ["kind"];
|
|
382
|
+
readonly properties: {
|
|
383
|
+
readonly kind: {
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly enum: readonly ["rfc3161", "opentimestamps", "roughtime"];
|
|
386
|
+
};
|
|
387
|
+
readonly anchoredAt: {
|
|
388
|
+
readonly type: "string";
|
|
389
|
+
readonly format: "date-time";
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
readonly Ext: {
|
|
397
|
+
readonly title: "Ext";
|
|
398
|
+
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.";
|
|
399
|
+
readonly type: "object";
|
|
400
|
+
readonly minProperties: 1;
|
|
401
|
+
readonly additionalProperties: true;
|
|
402
|
+
readonly propertyNames: {
|
|
403
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
409
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
410
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
411
|
+
readonly $ref: "#/$defs/Response";
|
|
412
|
+
readonly $defs: {
|
|
413
|
+
readonly Response: {
|
|
414
|
+
readonly $anchor: "response";
|
|
415
|
+
readonly title: "Process Attestation — response payload";
|
|
416
|
+
readonly description: "The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.";
|
|
417
|
+
readonly unevaluatedProperties: false;
|
|
418
|
+
readonly oneOf: readonly [{
|
|
419
|
+
readonly type: "object";
|
|
420
|
+
readonly title: "Attested";
|
|
421
|
+
readonly additionalProperties: false;
|
|
422
|
+
readonly required: readonly ["result", "challenge", "artifact", "assessment", "receiptReference"];
|
|
423
|
+
readonly properties: {
|
|
424
|
+
readonly result: {
|
|
425
|
+
readonly const: "attested";
|
|
426
|
+
};
|
|
427
|
+
readonly challenge: {
|
|
428
|
+
readonly type: "string";
|
|
429
|
+
readonly minLength: 16;
|
|
430
|
+
readonly maxLength: 256;
|
|
431
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
432
|
+
};
|
|
433
|
+
readonly artifact: {
|
|
434
|
+
readonly $ref: "#/$defs/Artifact";
|
|
435
|
+
};
|
|
436
|
+
readonly ext: {
|
|
437
|
+
readonly $ref: "#/$defs/Ext";
|
|
438
|
+
};
|
|
439
|
+
readonly assessment: {
|
|
440
|
+
readonly $ref: "#/$defs/Assessment";
|
|
441
|
+
};
|
|
442
|
+
readonly receiptReference: {
|
|
443
|
+
readonly $ref: "#/$defs/ReceiptReference";
|
|
444
|
+
};
|
|
445
|
+
readonly disclosed: {
|
|
446
|
+
readonly $ref: "#/$defs/Disclosed";
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
}, {
|
|
450
|
+
readonly type: "object";
|
|
451
|
+
readonly title: "Unavailable";
|
|
452
|
+
readonly additionalProperties: false;
|
|
453
|
+
readonly required: readonly ["result", "challenge", "artifact"];
|
|
454
|
+
readonly properties: {
|
|
455
|
+
readonly result: {
|
|
456
|
+
readonly const: "unavailable";
|
|
457
|
+
};
|
|
458
|
+
readonly challenge: {
|
|
459
|
+
readonly type: "string";
|
|
460
|
+
readonly minLength: 16;
|
|
461
|
+
readonly maxLength: 256;
|
|
462
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
463
|
+
};
|
|
464
|
+
readonly artifact: {
|
|
465
|
+
readonly $ref: "#/$defs/Artifact";
|
|
466
|
+
};
|
|
467
|
+
readonly ext: {
|
|
468
|
+
readonly $ref: "#/$defs/Ext";
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
}];
|
|
472
|
+
};
|
|
473
|
+
readonly Artifact: {
|
|
474
|
+
readonly type: "object";
|
|
475
|
+
readonly additionalProperties: false;
|
|
476
|
+
readonly required: readonly ["digest", "algorithm"];
|
|
477
|
+
readonly description: "Deterministic identification of the object whose production is in question.";
|
|
478
|
+
readonly properties: {
|
|
479
|
+
readonly digest: {
|
|
480
|
+
readonly type: "string";
|
|
481
|
+
readonly pattern: "^[A-Za-z0-9_-]{16,128}$";
|
|
482
|
+
readonly description: "base64url, unpadded.";
|
|
483
|
+
};
|
|
484
|
+
readonly algorithm: {
|
|
485
|
+
readonly type: "string";
|
|
486
|
+
readonly enum: readonly ["sha-256", "sha-384", "sha-512", "blake3"];
|
|
487
|
+
readonly description: "Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values.";
|
|
488
|
+
};
|
|
489
|
+
readonly byteLength: {
|
|
490
|
+
readonly type: "integer";
|
|
491
|
+
readonly minimum: 0;
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
readonly Assessment: {
|
|
496
|
+
readonly type: "object";
|
|
497
|
+
readonly additionalProperties: false;
|
|
498
|
+
readonly required: readonly ["primitive", "determination"];
|
|
499
|
+
readonly description: "Opaque at the task layer. The task standardizes the interaction, not the receipt.";
|
|
500
|
+
readonly properties: {
|
|
501
|
+
readonly primitive: {
|
|
502
|
+
readonly type: "string";
|
|
503
|
+
readonly format: "uri";
|
|
504
|
+
readonly description: "Specification the receipt is verified under. Names which vocabulary `determination` belongs to.";
|
|
505
|
+
readonly maxLength: 2048;
|
|
506
|
+
};
|
|
507
|
+
readonly determination: {
|
|
508
|
+
readonly type: "string";
|
|
509
|
+
readonly minLength: 1;
|
|
510
|
+
readonly maxLength: 128;
|
|
511
|
+
readonly description: "Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean.";
|
|
512
|
+
};
|
|
513
|
+
readonly confidence: {
|
|
514
|
+
readonly type: "integer";
|
|
515
|
+
readonly minimum: 0;
|
|
516
|
+
readonly maximum: 100;
|
|
517
|
+
readonly description: "The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property.";
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
readonly ReceiptReference: {
|
|
522
|
+
readonly description: "Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.";
|
|
523
|
+
readonly oneOf: readonly [{
|
|
524
|
+
readonly type: "object";
|
|
525
|
+
readonly additionalProperties: false;
|
|
526
|
+
readonly required: readonly ["type", "uri"];
|
|
527
|
+
readonly properties: {
|
|
528
|
+
readonly type: {
|
|
529
|
+
readonly const: "uri";
|
|
530
|
+
};
|
|
531
|
+
readonly uri: {
|
|
532
|
+
readonly type: "string";
|
|
533
|
+
readonly format: "uri";
|
|
534
|
+
readonly maxLength: 2048;
|
|
535
|
+
};
|
|
536
|
+
readonly mediaType: {
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
readonly maxLength: 255;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
}, {
|
|
542
|
+
readonly type: "object";
|
|
543
|
+
readonly additionalProperties: false;
|
|
544
|
+
readonly required: readonly ["type", "mediaType", "data"];
|
|
545
|
+
readonly properties: {
|
|
546
|
+
readonly type: {
|
|
547
|
+
readonly const: "inline";
|
|
548
|
+
};
|
|
549
|
+
readonly mediaType: {
|
|
550
|
+
readonly type: "string";
|
|
551
|
+
readonly maxLength: 255;
|
|
552
|
+
};
|
|
553
|
+
readonly data: {
|
|
554
|
+
readonly type: "string";
|
|
555
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
556
|
+
readonly description: "base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.";
|
|
557
|
+
readonly maxLength: 262144;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
}];
|
|
561
|
+
};
|
|
562
|
+
readonly DisclosureCategory: {
|
|
563
|
+
readonly type: "string";
|
|
564
|
+
readonly enum: readonly ["document", "timeline", "integrity", "anchors"];
|
|
565
|
+
readonly description: "Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1.";
|
|
566
|
+
};
|
|
567
|
+
readonly Disclosed: {
|
|
568
|
+
readonly type: "object";
|
|
569
|
+
readonly additionalProperties: false;
|
|
570
|
+
readonly description: "Only the categories the request asked for.";
|
|
571
|
+
readonly properties: {
|
|
572
|
+
readonly document: {
|
|
573
|
+
readonly type: "object";
|
|
574
|
+
readonly additionalProperties: false;
|
|
575
|
+
readonly properties: {
|
|
576
|
+
readonly byteLength: {
|
|
577
|
+
readonly type: "integer";
|
|
578
|
+
readonly minimum: 0;
|
|
579
|
+
};
|
|
580
|
+
readonly mediaType: {
|
|
581
|
+
readonly type: "string";
|
|
582
|
+
readonly maxLength: 255;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
readonly timeline: {
|
|
587
|
+
readonly type: "object";
|
|
588
|
+
readonly additionalProperties: false;
|
|
589
|
+
readonly properties: {
|
|
590
|
+
readonly startedAt: {
|
|
591
|
+
readonly type: "string";
|
|
592
|
+
readonly format: "date-time";
|
|
593
|
+
};
|
|
594
|
+
readonly endedAt: {
|
|
595
|
+
readonly type: "string";
|
|
596
|
+
readonly format: "date-time";
|
|
597
|
+
};
|
|
598
|
+
readonly checkpointCount: {
|
|
599
|
+
readonly type: "integer";
|
|
600
|
+
readonly minimum: 0;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
readonly integrity: {
|
|
605
|
+
readonly type: "object";
|
|
606
|
+
readonly additionalProperties: false;
|
|
607
|
+
readonly properties: {
|
|
608
|
+
readonly chainValid: {
|
|
609
|
+
readonly type: "boolean";
|
|
610
|
+
};
|
|
611
|
+
readonly signatureValid: {
|
|
612
|
+
readonly type: "boolean";
|
|
613
|
+
};
|
|
614
|
+
readonly keyCustody: {
|
|
615
|
+
readonly type: "string";
|
|
616
|
+
readonly enum: readonly ["software", "tpm", "secureEnclave"];
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
readonly anchors: {
|
|
621
|
+
readonly type: "array";
|
|
622
|
+
readonly items: {
|
|
623
|
+
readonly type: "object";
|
|
624
|
+
readonly additionalProperties: false;
|
|
625
|
+
readonly required: readonly ["kind"];
|
|
626
|
+
readonly properties: {
|
|
627
|
+
readonly kind: {
|
|
628
|
+
readonly type: "string";
|
|
629
|
+
readonly enum: readonly ["rfc3161", "opentimestamps", "roughtime"];
|
|
630
|
+
};
|
|
631
|
+
readonly anchoredAt: {
|
|
632
|
+
readonly type: "string";
|
|
633
|
+
readonly format: "date-time";
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
readonly Ext: {
|
|
641
|
+
readonly title: "Ext";
|
|
642
|
+
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.";
|
|
643
|
+
readonly type: "object";
|
|
644
|
+
readonly minProperties: 1;
|
|
645
|
+
readonly additionalProperties: true;
|
|
646
|
+
readonly propertyNames: {
|
|
647
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
/**
|
|
653
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
654
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
655
|
+
* per-specification and cannot be derived from the document alone, and
|
|
656
|
+
* item 2 needs the schema this carries.
|
|
657
|
+
*/
|
|
658
|
+
export declare const SPEC: {
|
|
659
|
+
readonly typeUri: "https://trusttasks.org/spec/process-attestation/0.1";
|
|
660
|
+
readonly isBearer: false;
|
|
661
|
+
readonly isProofRequired: false;
|
|
662
|
+
readonly isRecipientRequired: true;
|
|
663
|
+
readonly isIssuedAtRequired: true;
|
|
664
|
+
readonly payloadSchema: {
|
|
665
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
666
|
+
readonly $id: "https://trusttasks.org/spec/process-attestation/0.1";
|
|
667
|
+
readonly title: "Process Attestation — payload";
|
|
668
|
+
readonly description: "What a Verifier asks of a Holder: identify an artifact by digest, supply a freshness challenge, and name the disclosure categories wanted. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
669
|
+
readonly type: "object";
|
|
670
|
+
readonly additionalProperties: false;
|
|
671
|
+
readonly required: readonly ["artifact", "challenge"];
|
|
672
|
+
readonly properties: {
|
|
673
|
+
readonly artifact: {
|
|
674
|
+
readonly $ref: "#/$defs/Artifact";
|
|
675
|
+
};
|
|
676
|
+
readonly challenge: {
|
|
677
|
+
readonly type: "string";
|
|
678
|
+
readonly minLength: 16;
|
|
679
|
+
readonly maxLength: 256;
|
|
680
|
+
readonly description: "Verifier-supplied freshness nonce, echoed verbatim in the response. The floor is 16 characters because anti-replay is the only integrity property the request has.";
|
|
681
|
+
};
|
|
682
|
+
readonly disclosure: {
|
|
683
|
+
readonly type: "array";
|
|
684
|
+
readonly uniqueItems: true;
|
|
685
|
+
readonly items: {
|
|
686
|
+
readonly $ref: "#/$defs/DisclosureCategory";
|
|
687
|
+
};
|
|
688
|
+
readonly description: "Categories the Verifier requests. A Holder MAY return fewer; it MUST NOT return more.";
|
|
689
|
+
};
|
|
690
|
+
readonly ext: {
|
|
691
|
+
readonly $ref: "#/$defs/Ext";
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
readonly $defs: {
|
|
695
|
+
readonly Response: {
|
|
696
|
+
readonly $anchor: "response";
|
|
697
|
+
readonly title: "Process Attestation — response payload";
|
|
698
|
+
readonly description: "The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.";
|
|
699
|
+
readonly unevaluatedProperties: false;
|
|
700
|
+
readonly oneOf: readonly [{
|
|
701
|
+
readonly type: "object";
|
|
702
|
+
readonly title: "Attested";
|
|
703
|
+
readonly additionalProperties: false;
|
|
704
|
+
readonly required: readonly ["result", "challenge", "artifact", "assessment", "receiptReference"];
|
|
705
|
+
readonly properties: {
|
|
706
|
+
readonly result: {
|
|
707
|
+
readonly const: "attested";
|
|
708
|
+
};
|
|
709
|
+
readonly challenge: {
|
|
710
|
+
readonly type: "string";
|
|
711
|
+
readonly minLength: 16;
|
|
712
|
+
readonly maxLength: 256;
|
|
713
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
714
|
+
};
|
|
715
|
+
readonly artifact: {
|
|
716
|
+
readonly $ref: "#/$defs/Artifact";
|
|
717
|
+
};
|
|
718
|
+
readonly ext: {
|
|
719
|
+
readonly $ref: "#/$defs/Ext";
|
|
720
|
+
};
|
|
721
|
+
readonly assessment: {
|
|
722
|
+
readonly $ref: "#/$defs/Assessment";
|
|
723
|
+
};
|
|
724
|
+
readonly receiptReference: {
|
|
725
|
+
readonly $ref: "#/$defs/ReceiptReference";
|
|
726
|
+
};
|
|
727
|
+
readonly disclosed: {
|
|
728
|
+
readonly $ref: "#/$defs/Disclosed";
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
}, {
|
|
732
|
+
readonly type: "object";
|
|
733
|
+
readonly title: "Unavailable";
|
|
734
|
+
readonly additionalProperties: false;
|
|
735
|
+
readonly required: readonly ["result", "challenge", "artifact"];
|
|
736
|
+
readonly properties: {
|
|
737
|
+
readonly result: {
|
|
738
|
+
readonly const: "unavailable";
|
|
739
|
+
};
|
|
740
|
+
readonly challenge: {
|
|
741
|
+
readonly type: "string";
|
|
742
|
+
readonly minLength: 16;
|
|
743
|
+
readonly maxLength: 256;
|
|
744
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
745
|
+
};
|
|
746
|
+
readonly artifact: {
|
|
747
|
+
readonly $ref: "#/$defs/Artifact";
|
|
748
|
+
};
|
|
749
|
+
readonly ext: {
|
|
750
|
+
readonly $ref: "#/$defs/Ext";
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
}];
|
|
754
|
+
};
|
|
755
|
+
readonly Artifact: {
|
|
756
|
+
readonly type: "object";
|
|
757
|
+
readonly additionalProperties: false;
|
|
758
|
+
readonly required: readonly ["digest", "algorithm"];
|
|
759
|
+
readonly description: "Deterministic identification of the object whose production is in question.";
|
|
760
|
+
readonly properties: {
|
|
761
|
+
readonly digest: {
|
|
762
|
+
readonly type: "string";
|
|
763
|
+
readonly pattern: "^[A-Za-z0-9_-]{16,128}$";
|
|
764
|
+
readonly description: "base64url, unpadded.";
|
|
765
|
+
};
|
|
766
|
+
readonly algorithm: {
|
|
767
|
+
readonly type: "string";
|
|
768
|
+
readonly enum: readonly ["sha-256", "sha-384", "sha-512", "blake3"];
|
|
769
|
+
readonly description: "Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values.";
|
|
770
|
+
};
|
|
771
|
+
readonly byteLength: {
|
|
772
|
+
readonly type: "integer";
|
|
773
|
+
readonly minimum: 0;
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
readonly Assessment: {
|
|
778
|
+
readonly type: "object";
|
|
779
|
+
readonly additionalProperties: false;
|
|
780
|
+
readonly required: readonly ["primitive", "determination"];
|
|
781
|
+
readonly description: "Opaque at the task layer. The task standardizes the interaction, not the receipt.";
|
|
782
|
+
readonly properties: {
|
|
783
|
+
readonly primitive: {
|
|
784
|
+
readonly type: "string";
|
|
785
|
+
readonly format: "uri";
|
|
786
|
+
readonly description: "Specification the receipt is verified under. Names which vocabulary `determination` belongs to.";
|
|
787
|
+
readonly maxLength: 2048;
|
|
788
|
+
};
|
|
789
|
+
readonly determination: {
|
|
790
|
+
readonly type: "string";
|
|
791
|
+
readonly minLength: 1;
|
|
792
|
+
readonly maxLength: 128;
|
|
793
|
+
readonly description: "Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean.";
|
|
794
|
+
};
|
|
795
|
+
readonly confidence: {
|
|
796
|
+
readonly type: "integer";
|
|
797
|
+
readonly minimum: 0;
|
|
798
|
+
readonly maximum: 100;
|
|
799
|
+
readonly description: "The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property.";
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
readonly ReceiptReference: {
|
|
804
|
+
readonly description: "Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.";
|
|
805
|
+
readonly oneOf: readonly [{
|
|
806
|
+
readonly type: "object";
|
|
807
|
+
readonly additionalProperties: false;
|
|
808
|
+
readonly required: readonly ["type", "uri"];
|
|
809
|
+
readonly properties: {
|
|
810
|
+
readonly type: {
|
|
811
|
+
readonly const: "uri";
|
|
812
|
+
};
|
|
813
|
+
readonly uri: {
|
|
814
|
+
readonly type: "string";
|
|
815
|
+
readonly format: "uri";
|
|
816
|
+
readonly maxLength: 2048;
|
|
817
|
+
};
|
|
818
|
+
readonly mediaType: {
|
|
819
|
+
readonly type: "string";
|
|
820
|
+
readonly maxLength: 255;
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
}, {
|
|
824
|
+
readonly type: "object";
|
|
825
|
+
readonly additionalProperties: false;
|
|
826
|
+
readonly required: readonly ["type", "mediaType", "data"];
|
|
827
|
+
readonly properties: {
|
|
828
|
+
readonly type: {
|
|
829
|
+
readonly const: "inline";
|
|
830
|
+
};
|
|
831
|
+
readonly mediaType: {
|
|
832
|
+
readonly type: "string";
|
|
833
|
+
readonly maxLength: 255;
|
|
834
|
+
};
|
|
835
|
+
readonly data: {
|
|
836
|
+
readonly type: "string";
|
|
837
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
838
|
+
readonly description: "base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.";
|
|
839
|
+
readonly maxLength: 262144;
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
}];
|
|
843
|
+
};
|
|
844
|
+
readonly DisclosureCategory: {
|
|
845
|
+
readonly type: "string";
|
|
846
|
+
readonly enum: readonly ["document", "timeline", "integrity", "anchors"];
|
|
847
|
+
readonly description: "Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1.";
|
|
848
|
+
};
|
|
849
|
+
readonly Disclosed: {
|
|
850
|
+
readonly type: "object";
|
|
851
|
+
readonly additionalProperties: false;
|
|
852
|
+
readonly description: "Only the categories the request asked for.";
|
|
853
|
+
readonly properties: {
|
|
854
|
+
readonly document: {
|
|
855
|
+
readonly type: "object";
|
|
856
|
+
readonly additionalProperties: false;
|
|
857
|
+
readonly properties: {
|
|
858
|
+
readonly byteLength: {
|
|
859
|
+
readonly type: "integer";
|
|
860
|
+
readonly minimum: 0;
|
|
861
|
+
};
|
|
862
|
+
readonly mediaType: {
|
|
863
|
+
readonly type: "string";
|
|
864
|
+
readonly maxLength: 255;
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
readonly timeline: {
|
|
869
|
+
readonly type: "object";
|
|
870
|
+
readonly additionalProperties: false;
|
|
871
|
+
readonly properties: {
|
|
872
|
+
readonly startedAt: {
|
|
873
|
+
readonly type: "string";
|
|
874
|
+
readonly format: "date-time";
|
|
875
|
+
};
|
|
876
|
+
readonly endedAt: {
|
|
877
|
+
readonly type: "string";
|
|
878
|
+
readonly format: "date-time";
|
|
879
|
+
};
|
|
880
|
+
readonly checkpointCount: {
|
|
881
|
+
readonly type: "integer";
|
|
882
|
+
readonly minimum: 0;
|
|
883
|
+
};
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
readonly integrity: {
|
|
887
|
+
readonly type: "object";
|
|
888
|
+
readonly additionalProperties: false;
|
|
889
|
+
readonly properties: {
|
|
890
|
+
readonly chainValid: {
|
|
891
|
+
readonly type: "boolean";
|
|
892
|
+
};
|
|
893
|
+
readonly signatureValid: {
|
|
894
|
+
readonly type: "boolean";
|
|
895
|
+
};
|
|
896
|
+
readonly keyCustody: {
|
|
897
|
+
readonly type: "string";
|
|
898
|
+
readonly enum: readonly ["software", "tpm", "secureEnclave"];
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
readonly anchors: {
|
|
903
|
+
readonly type: "array";
|
|
904
|
+
readonly items: {
|
|
905
|
+
readonly type: "object";
|
|
906
|
+
readonly additionalProperties: false;
|
|
907
|
+
readonly required: readonly ["kind"];
|
|
908
|
+
readonly properties: {
|
|
909
|
+
readonly kind: {
|
|
910
|
+
readonly type: "string";
|
|
911
|
+
readonly enum: readonly ["rfc3161", "opentimestamps", "roughtime"];
|
|
912
|
+
};
|
|
913
|
+
readonly anchoredAt: {
|
|
914
|
+
readonly type: "string";
|
|
915
|
+
readonly format: "date-time";
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
readonly Ext: {
|
|
923
|
+
readonly title: "Ext";
|
|
924
|
+
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.";
|
|
925
|
+
readonly type: "object";
|
|
926
|
+
readonly minProperties: 1;
|
|
927
|
+
readonly additionalProperties: true;
|
|
928
|
+
readonly propertyNames: {
|
|
929
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
936
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
937
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
938
|
+
* parties (§7.3 item 5).
|
|
939
|
+
*/
|
|
940
|
+
export declare const RESPONSE_SPEC: {
|
|
941
|
+
readonly typeUri: "https://trusttasks.org/spec/process-attestation/0.1#response";
|
|
942
|
+
readonly isBearer: false;
|
|
943
|
+
readonly isProofRequired: true;
|
|
944
|
+
readonly isRecipientRequired: true;
|
|
945
|
+
readonly isIssuedAtRequired: true;
|
|
946
|
+
readonly payloadSchema: {
|
|
947
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
948
|
+
readonly $ref: "#/$defs/Response";
|
|
949
|
+
readonly $defs: {
|
|
950
|
+
readonly Response: {
|
|
951
|
+
readonly $anchor: "response";
|
|
952
|
+
readonly title: "Process Attestation — response payload";
|
|
953
|
+
readonly description: "The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.";
|
|
954
|
+
readonly unevaluatedProperties: false;
|
|
955
|
+
readonly oneOf: readonly [{
|
|
956
|
+
readonly type: "object";
|
|
957
|
+
readonly title: "Attested";
|
|
958
|
+
readonly additionalProperties: false;
|
|
959
|
+
readonly required: readonly ["result", "challenge", "artifact", "assessment", "receiptReference"];
|
|
960
|
+
readonly properties: {
|
|
961
|
+
readonly result: {
|
|
962
|
+
readonly const: "attested";
|
|
963
|
+
};
|
|
964
|
+
readonly challenge: {
|
|
965
|
+
readonly type: "string";
|
|
966
|
+
readonly minLength: 16;
|
|
967
|
+
readonly maxLength: 256;
|
|
968
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
969
|
+
};
|
|
970
|
+
readonly artifact: {
|
|
971
|
+
readonly $ref: "#/$defs/Artifact";
|
|
972
|
+
};
|
|
973
|
+
readonly ext: {
|
|
974
|
+
readonly $ref: "#/$defs/Ext";
|
|
975
|
+
};
|
|
976
|
+
readonly assessment: {
|
|
977
|
+
readonly $ref: "#/$defs/Assessment";
|
|
978
|
+
};
|
|
979
|
+
readonly receiptReference: {
|
|
980
|
+
readonly $ref: "#/$defs/ReceiptReference";
|
|
981
|
+
};
|
|
982
|
+
readonly disclosed: {
|
|
983
|
+
readonly $ref: "#/$defs/Disclosed";
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
}, {
|
|
987
|
+
readonly type: "object";
|
|
988
|
+
readonly title: "Unavailable";
|
|
989
|
+
readonly additionalProperties: false;
|
|
990
|
+
readonly required: readonly ["result", "challenge", "artifact"];
|
|
991
|
+
readonly properties: {
|
|
992
|
+
readonly result: {
|
|
993
|
+
readonly const: "unavailable";
|
|
994
|
+
};
|
|
995
|
+
readonly challenge: {
|
|
996
|
+
readonly type: "string";
|
|
997
|
+
readonly minLength: 16;
|
|
998
|
+
readonly maxLength: 256;
|
|
999
|
+
readonly description: "The request's challenge, echoed verbatim.";
|
|
1000
|
+
};
|
|
1001
|
+
readonly artifact: {
|
|
1002
|
+
readonly $ref: "#/$defs/Artifact";
|
|
1003
|
+
};
|
|
1004
|
+
readonly ext: {
|
|
1005
|
+
readonly $ref: "#/$defs/Ext";
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
}];
|
|
1009
|
+
};
|
|
1010
|
+
readonly Artifact: {
|
|
1011
|
+
readonly type: "object";
|
|
1012
|
+
readonly additionalProperties: false;
|
|
1013
|
+
readonly required: readonly ["digest", "algorithm"];
|
|
1014
|
+
readonly description: "Deterministic identification of the object whose production is in question.";
|
|
1015
|
+
readonly properties: {
|
|
1016
|
+
readonly digest: {
|
|
1017
|
+
readonly type: "string";
|
|
1018
|
+
readonly pattern: "^[A-Za-z0-9_-]{16,128}$";
|
|
1019
|
+
readonly description: "base64url, unpadded.";
|
|
1020
|
+
};
|
|
1021
|
+
readonly algorithm: {
|
|
1022
|
+
readonly type: "string";
|
|
1023
|
+
readonly enum: readonly ["sha-256", "sha-384", "sha-512", "blake3"];
|
|
1024
|
+
readonly description: "Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values.";
|
|
1025
|
+
};
|
|
1026
|
+
readonly byteLength: {
|
|
1027
|
+
readonly type: "integer";
|
|
1028
|
+
readonly minimum: 0;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
readonly Assessment: {
|
|
1033
|
+
readonly type: "object";
|
|
1034
|
+
readonly additionalProperties: false;
|
|
1035
|
+
readonly required: readonly ["primitive", "determination"];
|
|
1036
|
+
readonly description: "Opaque at the task layer. The task standardizes the interaction, not the receipt.";
|
|
1037
|
+
readonly properties: {
|
|
1038
|
+
readonly primitive: {
|
|
1039
|
+
readonly type: "string";
|
|
1040
|
+
readonly format: "uri";
|
|
1041
|
+
readonly description: "Specification the receipt is verified under. Names which vocabulary `determination` belongs to.";
|
|
1042
|
+
readonly maxLength: 2048;
|
|
1043
|
+
};
|
|
1044
|
+
readonly determination: {
|
|
1045
|
+
readonly type: "string";
|
|
1046
|
+
readonly minLength: 1;
|
|
1047
|
+
readonly maxLength: 128;
|
|
1048
|
+
readonly description: "Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean.";
|
|
1049
|
+
};
|
|
1050
|
+
readonly confidence: {
|
|
1051
|
+
readonly type: "integer";
|
|
1052
|
+
readonly minimum: 0;
|
|
1053
|
+
readonly maximum: 100;
|
|
1054
|
+
readonly description: "The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property.";
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
readonly ReceiptReference: {
|
|
1059
|
+
readonly description: "Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.";
|
|
1060
|
+
readonly oneOf: readonly [{
|
|
1061
|
+
readonly type: "object";
|
|
1062
|
+
readonly additionalProperties: false;
|
|
1063
|
+
readonly required: readonly ["type", "uri"];
|
|
1064
|
+
readonly properties: {
|
|
1065
|
+
readonly type: {
|
|
1066
|
+
readonly const: "uri";
|
|
1067
|
+
};
|
|
1068
|
+
readonly uri: {
|
|
1069
|
+
readonly type: "string";
|
|
1070
|
+
readonly format: "uri";
|
|
1071
|
+
readonly maxLength: 2048;
|
|
1072
|
+
};
|
|
1073
|
+
readonly mediaType: {
|
|
1074
|
+
readonly type: "string";
|
|
1075
|
+
readonly maxLength: 255;
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
}, {
|
|
1079
|
+
readonly type: "object";
|
|
1080
|
+
readonly additionalProperties: false;
|
|
1081
|
+
readonly required: readonly ["type", "mediaType", "data"];
|
|
1082
|
+
readonly properties: {
|
|
1083
|
+
readonly type: {
|
|
1084
|
+
readonly const: "inline";
|
|
1085
|
+
};
|
|
1086
|
+
readonly mediaType: {
|
|
1087
|
+
readonly type: "string";
|
|
1088
|
+
readonly maxLength: 255;
|
|
1089
|
+
};
|
|
1090
|
+
readonly data: {
|
|
1091
|
+
readonly type: "string";
|
|
1092
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
1093
|
+
readonly description: "base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.";
|
|
1094
|
+
readonly maxLength: 262144;
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
}];
|
|
1098
|
+
};
|
|
1099
|
+
readonly DisclosureCategory: {
|
|
1100
|
+
readonly type: "string";
|
|
1101
|
+
readonly enum: readonly ["document", "timeline", "integrity", "anchors"];
|
|
1102
|
+
readonly description: "Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1.";
|
|
1103
|
+
};
|
|
1104
|
+
readonly Disclosed: {
|
|
1105
|
+
readonly type: "object";
|
|
1106
|
+
readonly additionalProperties: false;
|
|
1107
|
+
readonly description: "Only the categories the request asked for.";
|
|
1108
|
+
readonly properties: {
|
|
1109
|
+
readonly document: {
|
|
1110
|
+
readonly type: "object";
|
|
1111
|
+
readonly additionalProperties: false;
|
|
1112
|
+
readonly properties: {
|
|
1113
|
+
readonly byteLength: {
|
|
1114
|
+
readonly type: "integer";
|
|
1115
|
+
readonly minimum: 0;
|
|
1116
|
+
};
|
|
1117
|
+
readonly mediaType: {
|
|
1118
|
+
readonly type: "string";
|
|
1119
|
+
readonly maxLength: 255;
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
readonly timeline: {
|
|
1124
|
+
readonly type: "object";
|
|
1125
|
+
readonly additionalProperties: false;
|
|
1126
|
+
readonly properties: {
|
|
1127
|
+
readonly startedAt: {
|
|
1128
|
+
readonly type: "string";
|
|
1129
|
+
readonly format: "date-time";
|
|
1130
|
+
};
|
|
1131
|
+
readonly endedAt: {
|
|
1132
|
+
readonly type: "string";
|
|
1133
|
+
readonly format: "date-time";
|
|
1134
|
+
};
|
|
1135
|
+
readonly checkpointCount: {
|
|
1136
|
+
readonly type: "integer";
|
|
1137
|
+
readonly minimum: 0;
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
readonly integrity: {
|
|
1142
|
+
readonly type: "object";
|
|
1143
|
+
readonly additionalProperties: false;
|
|
1144
|
+
readonly properties: {
|
|
1145
|
+
readonly chainValid: {
|
|
1146
|
+
readonly type: "boolean";
|
|
1147
|
+
};
|
|
1148
|
+
readonly signatureValid: {
|
|
1149
|
+
readonly type: "boolean";
|
|
1150
|
+
};
|
|
1151
|
+
readonly keyCustody: {
|
|
1152
|
+
readonly type: "string";
|
|
1153
|
+
readonly enum: readonly ["software", "tpm", "secureEnclave"];
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
readonly anchors: {
|
|
1158
|
+
readonly type: "array";
|
|
1159
|
+
readonly items: {
|
|
1160
|
+
readonly type: "object";
|
|
1161
|
+
readonly additionalProperties: false;
|
|
1162
|
+
readonly required: readonly ["kind"];
|
|
1163
|
+
readonly properties: {
|
|
1164
|
+
readonly kind: {
|
|
1165
|
+
readonly type: "string";
|
|
1166
|
+
readonly enum: readonly ["rfc3161", "opentimestamps", "roughtime"];
|
|
1167
|
+
};
|
|
1168
|
+
readonly anchoredAt: {
|
|
1169
|
+
readonly type: "string";
|
|
1170
|
+
readonly format: "date-time";
|
|
1171
|
+
};
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
readonly Ext: {
|
|
1178
|
+
readonly title: "Ext";
|
|
1179
|
+
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.";
|
|
1180
|
+
readonly type: "object";
|
|
1181
|
+
readonly minProperties: 1;
|
|
1182
|
+
readonly additionalProperties: true;
|
|
1183
|
+
readonly propertyNames: {
|
|
1184
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1190
|
+
//# sourceMappingURL=payload.d.ts.map
|