@openvtc/trust-tasks 0.12.13 → 0.12.15

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 (46) hide show
  1. package/dist/auth/passkey/enroll/start/0.1/payload.d.ts +24 -0
  2. package/dist/auth/passkey/enroll/start/0.1/payload.d.ts.map +1 -1
  3. package/dist/auth/passkey/enroll/start/0.1/payload.js +8 -0
  4. package/dist/auth/passkey/enroll/start/0.1/payload.js.map +1 -1
  5. package/dist/auth/passkey/enroll/start/0.2/payload.d.ts +48 -0
  6. package/dist/auth/passkey/enroll/start/0.2/payload.d.ts.map +1 -1
  7. package/dist/auth/passkey/enroll/start/0.2/payload.js +16 -0
  8. package/dist/auth/passkey/enroll/start/0.2/payload.js.map +1 -1
  9. package/dist/auth/passkey/login/start/0.1/payload.d.ts +24 -0
  10. package/dist/auth/passkey/login/start/0.1/payload.d.ts.map +1 -1
  11. package/dist/auth/passkey/login/start/0.1/payload.js +8 -0
  12. package/dist/auth/passkey/login/start/0.1/payload.js.map +1 -1
  13. package/dist/auth/passkey/login/start/0.2/payload.d.ts +24 -0
  14. package/dist/auth/passkey/login/start/0.2/payload.d.ts.map +1 -1
  15. package/dist/auth/passkey/login/start/0.2/payload.js +8 -0
  16. package/dist/auth/passkey/login/start/0.2/payload.js.map +1 -1
  17. package/dist/auth/passkey/revoke/start/0.1/payload.d.ts +24 -0
  18. package/dist/auth/passkey/revoke/start/0.1/payload.d.ts.map +1 -1
  19. package/dist/auth/passkey/revoke/start/0.1/payload.js +8 -0
  20. package/dist/auth/passkey/revoke/start/0.1/payload.js.map +1 -1
  21. package/dist/auth/step-up/approve-request/0.1/payload.d.ts +24 -0
  22. package/dist/auth/step-up/approve-request/0.1/payload.d.ts.map +1 -1
  23. package/dist/auth/step-up/approve-request/0.1/payload.js +8 -0
  24. package/dist/auth/step-up/approve-request/0.1/payload.js.map +1 -1
  25. package/dist/auth/step-up/approve-request/0.2/payload.d.ts +24 -0
  26. package/dist/auth/step-up/approve-request/0.2/payload.d.ts.map +1 -1
  27. package/dist/auth/step-up/approve-request/0.2/payload.js +8 -0
  28. package/dist/auth/step-up/approve-request/0.2/payload.js.map +1 -1
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/vtc/relationships/graph/0.2/payload.d.ts +619 -0
  34. package/dist/vtc/relationships/graph/0.2/payload.d.ts.map +1 -0
  35. package/dist/vtc/relationships/graph/0.2/payload.js +328 -0
  36. package/dist/vtc/relationships/graph/0.2/payload.js.map +1 -0
  37. package/package.json +1 -1
  38. package/src/auth/passkey/enroll/start/0.1/payload.ts +16 -0
  39. package/src/auth/passkey/enroll/start/0.2/payload.ts +32 -0
  40. package/src/auth/passkey/login/start/0.1/payload.ts +16 -0
  41. package/src/auth/passkey/login/start/0.2/payload.ts +16 -0
  42. package/src/auth/passkey/revoke/start/0.1/payload.ts +16 -0
  43. package/src/auth/step-up/approve-request/0.1/payload.ts +16 -0
  44. package/src/auth/step-up/approve-request/0.2/payload.ts +16 -0
  45. package/src/index.ts +1 -0
  46. package/src/vtc/relationships/graph/0.2/payload.ts +413 -0
@@ -44,6 +44,14 @@ export interface AuthStepUpApproveRequest {
44
44
  * Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.
45
45
  */
46
46
  export interface PublicKeyCredentialRequestOptions {
47
+ /**
48
+ * Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.
49
+ *
50
+ * This component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.
51
+ *
52
+ * Structure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later.
53
+ */
54
+ extensions?: {};
47
55
  /**
48
56
  * base64url-encoded one-time nonce.
49
57
  */
@@ -215,6 +223,10 @@ export const PAYLOAD_SCHEMA = {
215
223
  "challenge"
216
224
  ],
217
225
  "properties": {
226
+ "extensions": {
227
+ "type": "object",
228
+ "description": "Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.\n\nThis component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.\n\nStructure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later."
229
+ },
218
230
  "challenge": {
219
231
  "type": "string",
220
232
  "description": "base64url-encoded one-time nonce."
@@ -328,6 +340,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
328
340
  "challenge"
329
341
  ],
330
342
  "properties": {
343
+ "extensions": {
344
+ "type": "object",
345
+ "description": "Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.\n\nThis component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.\n\nStructure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later."
346
+ },
331
347
  "challenge": {
332
348
  "type": "string",
333
349
  "description": "base64url-encoded one-time nonce."
package/src/index.ts CHANGED
@@ -398,6 +398,7 @@ export * as VtcPoliciesTest_v0_1 from "./vtc/policies/test/0.1/payload.js";
398
398
  export * as VtcRecognitionCheck_v0_1 from "./vtc/recognition/check/0.1/payload.js";
399
399
  export * as VtcRegistryDiagnostics_v0_1 from "./vtc/registry/diagnostics/0.1/payload.js";
400
400
  export * as VtcRelationshipsGraph_v0_1 from "./vtc/relationships/graph/0.1/payload.js";
401
+ export * as VtcRelationshipsGraph_v0_2 from "./vtc/relationships/graph/0.2/payload.js";
401
402
  export * as VtcRelationshipsList_v0_1 from "./vtc/relationships/list/0.1/payload.js";
402
403
  export * as VtcRelationshipsList_v0_2 from "./vtc/relationships/list/0.2/payload.js";
403
404
  export * as VtcRelationshipsPublish_v0_1 from "./vtc/relationships/publish/0.1/payload.js";
@@ -0,0 +1,413 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/relationships/graph/0.2/payload.schema.json
4
+ */
5
+
6
+ export interface VTCRelationshipsGraphPayload {
7
+ ext?: Ext;
8
+ }
9
+ /**
10
+ * 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.
11
+ */
12
+ export interface Ext {
13
+ [k: string]: unknown | undefined;
14
+ }
15
+ export interface VTCRelationshipsGraphResponsePayload {
16
+ /**
17
+ * One per distinct DID appearing in a live edge. No isolated nodes.
18
+ */
19
+ nodes: GraphNode[];
20
+ /**
21
+ * One per **pair** of identifiers with at least one live credential between them, not one per credential.
22
+ */
23
+ edges: GraphEdge[];
24
+ ext?: Ext;
25
+ }
26
+ export interface GraphNode {
27
+ /**
28
+ * A DID participating in at least one live relationship.
29
+ */
30
+ did: string;
31
+ }
32
+ /**
33
+ * One edge between a **pair** of identifiers, carrying every half published between them.
34
+ *
35
+ * `0.1` called each credential an edge, which made a DTG edge inexpressible: the two directed halves between the same pair are one relationship, and a consumer given a flat list had to re-derive that pairing — sorting DIDs, grouping, and deciding for itself what `complete` means. Two implementations doing that independently will disagree at the margins, which is exactly the reasoning a schema exists to settle once.
36
+ */
37
+ export interface GraphEdge {
38
+ /**
39
+ * The two endpoints, DID-sorted. Sorting gives the pair one identity whichever half was published first. Both entries are equal only for a self-issued credential.
40
+ *
41
+ * @minItems 2
42
+ * @maxItems 2
43
+ */
44
+ endpoints: [string, string];
45
+ /**
46
+ * Every credential published between the endpoints, oldest first. One for a half-edge, two for the ordinary reciprocated edge, more where a party has re-issued.
47
+ *
48
+ * @minItems 1
49
+ */
50
+ halves: [GraphHalf, ...GraphHalf[]];
51
+ /**
52
+ * True when both endpoints have asserted about each other. The distinction a flat list cannot make: an edge asserted by one party is a claim, and an edge asserted by both is a relationship.
53
+ */
54
+ complete: boolean;
55
+ }
56
+ /**
57
+ * One published relationship credential: a **directed half** of an edge, asserted by `issuerDid` about `subjectDid`.
58
+ *
59
+ * Body-free on purpose — the graph shows the shape of the trust network, not credential contents. `id` is the row identifier a revoke takes.
60
+ */
61
+ export interface GraphHalf {
62
+ id: string;
63
+ /**
64
+ * The asserting party.
65
+ */
66
+ issuerDid: string;
67
+ /**
68
+ * The party asserted about.
69
+ */
70
+ subjectDid: string;
71
+ createdAt: string;
72
+ /**
73
+ * The persona this issuer has asserted on this half, when they have.
74
+ *
75
+ * The one place deliberate correlation becomes visible: two pairwise halves carrying the same `personaDid` are the same party, said so by that party. A consumer that cannot read it cannot honour a correlation its subject chose to publish.
76
+ */
77
+ personaDid?: string | null;
78
+ }
79
+
80
+ /** Trust Task type URI. */
81
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/graph/0.2" as const;
82
+
83
+ /** Stable alias for this specification's request payload shape. */
84
+ export type Payload = VTCRelationshipsGraphPayload;
85
+
86
+ /** Trust Task response type URI (request type URI + "#response"). */
87
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/graph/0.2#response" as const;
88
+
89
+ /** Stable alias for this specification's success-response payload shape. */
90
+ export type Response = VTCRelationshipsGraphResponsePayload;
91
+
92
+ /**
93
+ * This specification's payload schema, as a value.
94
+ *
95
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
96
+ * rather than only as a `.json` file because TypeScript types are erased
97
+ * at runtime: without a schema a consumer has nothing to validate, and
98
+ * every REQUIRED payload member is optional in practice. Cross-file
99
+ * `$ref`s are already inlined, so it needs no resolver.
100
+ */
101
+ export const PAYLOAD_SCHEMA = {
102
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
103
+ "$id": "https://trusttasks.org/spec/vtc/relationships/graph/0.2",
104
+ "title": "VTC Relationships Graph — payload",
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "properties": {
108
+ "ext": {
109
+ "$ref": "#/$defs/Ext"
110
+ }
111
+ },
112
+ "$defs": {
113
+ "Response": {
114
+ "$anchor": "response",
115
+ "title": "VTC Relationships Graph — response payload",
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": [
119
+ "nodes",
120
+ "edges"
121
+ ],
122
+ "properties": {
123
+ "nodes": {
124
+ "type": "array",
125
+ "items": {
126
+ "$ref": "#/$defs/GraphNode"
127
+ },
128
+ "description": "One per distinct DID appearing in a live edge. No isolated nodes."
129
+ },
130
+ "edges": {
131
+ "type": "array",
132
+ "items": {
133
+ "$ref": "#/$defs/GraphEdge"
134
+ },
135
+ "description": "One per **pair** of identifiers with at least one live credential between them, not one per credential."
136
+ },
137
+ "ext": {
138
+ "$ref": "#/$defs/Ext"
139
+ }
140
+ }
141
+ },
142
+ "GraphNode": {
143
+ "$anchor": "graphNode",
144
+ "title": "GraphNode",
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "did"
149
+ ],
150
+ "properties": {
151
+ "did": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "description": "A DID participating in at least one live relationship."
155
+ }
156
+ }
157
+ },
158
+ "GraphEdge": {
159
+ "$anchor": "graphEdge",
160
+ "title": "GraphEdge",
161
+ "type": "object",
162
+ "additionalProperties": false,
163
+ "required": [
164
+ "endpoints",
165
+ "halves",
166
+ "complete"
167
+ ],
168
+ "properties": {
169
+ "endpoints": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string",
173
+ "pattern": "^did:"
174
+ },
175
+ "minItems": 2,
176
+ "maxItems": 2,
177
+ "description": "The two endpoints, DID-sorted. Sorting gives the pair one identity whichever half was published first. Both entries are equal only for a self-issued credential."
178
+ },
179
+ "halves": {
180
+ "type": "array",
181
+ "items": {
182
+ "$ref": "#/$defs/GraphHalf"
183
+ },
184
+ "minItems": 1,
185
+ "description": "Every credential published between the endpoints, oldest first. One for a half-edge, two for the ordinary reciprocated edge, more where a party has re-issued."
186
+ },
187
+ "complete": {
188
+ "type": "boolean",
189
+ "description": "True when both endpoints have asserted about each other. The distinction a flat list cannot make: an edge asserted by one party is a claim, and an edge asserted by both is a relationship."
190
+ }
191
+ },
192
+ "description": "One edge between a **pair** of identifiers, carrying every half published between them.\n\n`0.1` called each credential an edge, which made a DTG edge inexpressible: the two directed halves between the same pair are one relationship, and a consumer given a flat list had to re-derive that pairing — sorting DIDs, grouping, and deciding for itself what `complete` means. Two implementations doing that independently will disagree at the margins, which is exactly the reasoning a schema exists to settle once."
193
+ },
194
+ "GraphHalf": {
195
+ "$anchor": "graphHalf",
196
+ "title": "GraphHalf",
197
+ "type": "object",
198
+ "additionalProperties": false,
199
+ "description": "One published relationship credential: a **directed half** of an edge, asserted by `issuerDid` about `subjectDid`.\n\nBody-free on purpose — the graph shows the shape of the trust network, not credential contents. `id` is the row identifier a revoke takes.",
200
+ "required": [
201
+ "id",
202
+ "issuerDid",
203
+ "subjectDid",
204
+ "createdAt"
205
+ ],
206
+ "properties": {
207
+ "id": {
208
+ "type": "string",
209
+ "minLength": 1
210
+ },
211
+ "issuerDid": {
212
+ "type": "string",
213
+ "pattern": "^did:",
214
+ "description": "The asserting party."
215
+ },
216
+ "subjectDid": {
217
+ "type": "string",
218
+ "pattern": "^did:",
219
+ "description": "The party asserted about."
220
+ },
221
+ "createdAt": {
222
+ "type": "string",
223
+ "format": "date-time"
224
+ },
225
+ "personaDid": {
226
+ "type": [
227
+ "string",
228
+ "null"
229
+ ],
230
+ "pattern": "^did:|^$",
231
+ "description": "The persona this issuer has asserted on this half, when they have.\n\nThe one place deliberate correlation becomes visible: two pairwise halves carrying the same `personaDid` are the same party, said so by that party. A consumer that cannot read it cannot honour a correlation its subject chose to publish."
232
+ }
233
+ }
234
+ },
235
+ "Ext": {
236
+ "title": "Ext",
237
+ "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.",
238
+ "type": "object",
239
+ "minProperties": 1,
240
+ "additionalProperties": true,
241
+ "propertyNames": {
242
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
243
+ }
244
+ }
245
+ }
246
+ } as const;
247
+
248
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
249
+ export const RESPONSE_PAYLOAD_SCHEMA = {
250
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
251
+ "$ref": "#/$defs/Response",
252
+ "$defs": {
253
+ "Response": {
254
+ "$anchor": "response",
255
+ "title": "VTC Relationships Graph — response payload",
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "required": [
259
+ "nodes",
260
+ "edges"
261
+ ],
262
+ "properties": {
263
+ "nodes": {
264
+ "type": "array",
265
+ "items": {
266
+ "$ref": "#/$defs/GraphNode"
267
+ },
268
+ "description": "One per distinct DID appearing in a live edge. No isolated nodes."
269
+ },
270
+ "edges": {
271
+ "type": "array",
272
+ "items": {
273
+ "$ref": "#/$defs/GraphEdge"
274
+ },
275
+ "description": "One per **pair** of identifiers with at least one live credential between them, not one per credential."
276
+ },
277
+ "ext": {
278
+ "$ref": "#/$defs/Ext"
279
+ }
280
+ }
281
+ },
282
+ "GraphNode": {
283
+ "$anchor": "graphNode",
284
+ "title": "GraphNode",
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": [
288
+ "did"
289
+ ],
290
+ "properties": {
291
+ "did": {
292
+ "type": "string",
293
+ "minLength": 1,
294
+ "description": "A DID participating in at least one live relationship."
295
+ }
296
+ }
297
+ },
298
+ "GraphEdge": {
299
+ "$anchor": "graphEdge",
300
+ "title": "GraphEdge",
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": [
304
+ "endpoints",
305
+ "halves",
306
+ "complete"
307
+ ],
308
+ "properties": {
309
+ "endpoints": {
310
+ "type": "array",
311
+ "items": {
312
+ "type": "string",
313
+ "pattern": "^did:"
314
+ },
315
+ "minItems": 2,
316
+ "maxItems": 2,
317
+ "description": "The two endpoints, DID-sorted. Sorting gives the pair one identity whichever half was published first. Both entries are equal only for a self-issued credential."
318
+ },
319
+ "halves": {
320
+ "type": "array",
321
+ "items": {
322
+ "$ref": "#/$defs/GraphHalf"
323
+ },
324
+ "minItems": 1,
325
+ "description": "Every credential published between the endpoints, oldest first. One for a half-edge, two for the ordinary reciprocated edge, more where a party has re-issued."
326
+ },
327
+ "complete": {
328
+ "type": "boolean",
329
+ "description": "True when both endpoints have asserted about each other. The distinction a flat list cannot make: an edge asserted by one party is a claim, and an edge asserted by both is a relationship."
330
+ }
331
+ },
332
+ "description": "One edge between a **pair** of identifiers, carrying every half published between them.\n\n`0.1` called each credential an edge, which made a DTG edge inexpressible: the two directed halves between the same pair are one relationship, and a consumer given a flat list had to re-derive that pairing — sorting DIDs, grouping, and deciding for itself what `complete` means. Two implementations doing that independently will disagree at the margins, which is exactly the reasoning a schema exists to settle once."
333
+ },
334
+ "GraphHalf": {
335
+ "$anchor": "graphHalf",
336
+ "title": "GraphHalf",
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "description": "One published relationship credential: a **directed half** of an edge, asserted by `issuerDid` about `subjectDid`.\n\nBody-free on purpose — the graph shows the shape of the trust network, not credential contents. `id` is the row identifier a revoke takes.",
340
+ "required": [
341
+ "id",
342
+ "issuerDid",
343
+ "subjectDid",
344
+ "createdAt"
345
+ ],
346
+ "properties": {
347
+ "id": {
348
+ "type": "string",
349
+ "minLength": 1
350
+ },
351
+ "issuerDid": {
352
+ "type": "string",
353
+ "pattern": "^did:",
354
+ "description": "The asserting party."
355
+ },
356
+ "subjectDid": {
357
+ "type": "string",
358
+ "pattern": "^did:",
359
+ "description": "The party asserted about."
360
+ },
361
+ "createdAt": {
362
+ "type": "string",
363
+ "format": "date-time"
364
+ },
365
+ "personaDid": {
366
+ "type": [
367
+ "string",
368
+ "null"
369
+ ],
370
+ "pattern": "^did:|^$",
371
+ "description": "The persona this issuer has asserted on this half, when they have.\n\nThe one place deliberate correlation becomes visible: two pairwise halves carrying the same `personaDid` are the same party, said so by that party. A consumer that cannot read it cannot honour a correlation its subject chose to publish."
372
+ }
373
+ }
374
+ },
375
+ "Ext": {
376
+ "title": "Ext",
377
+ "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.",
378
+ "type": "object",
379
+ "minProperties": 1,
380
+ "additionalProperties": true,
381
+ "propertyNames": {
382
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
383
+ }
384
+ }
385
+ }
386
+ } as const;
387
+
388
+ /**
389
+ * SPEC.md §7.2 policy for the request variant, from this specification's
390
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
391
+ * per-specification and cannot be derived from the document alone, and
392
+ * item 2 needs the schema this carries.
393
+ */
394
+ export const SPEC = {
395
+ typeUri: TYPE_URI,
396
+ isBearer: false,
397
+ isProofRequired: false,
398
+ isRecipientRequired: true,
399
+ payloadSchema: PAYLOAD_SCHEMA,
400
+ } as const;
401
+
402
+ /**
403
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
404
+ * tracks the *issuer* party's requirement because a response swaps the
405
+ * parties (§7.3 item 5).
406
+ */
407
+ export const RESPONSE_SPEC = {
408
+ typeUri: RESPONSE_TYPE_URI,
409
+ isBearer: false,
410
+ isProofRequired: false,
411
+ isRecipientRequired: true,
412
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
413
+ } as const;