@openvtc/trust-tasks 0.12.13 → 0.12.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/relationships/graph/0.2/payload.d.ts +619 -0
- package/dist/vtc/relationships/graph/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/graph/0.2/payload.js +328 -0
- package/dist/vtc/relationships/graph/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/vtc/relationships/graph/0.2/payload.ts +413 -0
|
@@ -0,0 +1,619 @@
|
|
|
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
|
+
export interface VTCRelationshipsGraphPayload {
|
|
6
|
+
ext?: Ext;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 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.
|
|
10
|
+
*/
|
|
11
|
+
export interface Ext {
|
|
12
|
+
[k: string]: unknown | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface VTCRelationshipsGraphResponsePayload {
|
|
15
|
+
/**
|
|
16
|
+
* One per distinct DID appearing in a live edge. No isolated nodes.
|
|
17
|
+
*/
|
|
18
|
+
nodes: GraphNode[];
|
|
19
|
+
/**
|
|
20
|
+
* One per **pair** of identifiers with at least one live credential between them, not one per credential.
|
|
21
|
+
*/
|
|
22
|
+
edges: GraphEdge[];
|
|
23
|
+
ext?: Ext;
|
|
24
|
+
}
|
|
25
|
+
export interface GraphNode {
|
|
26
|
+
/**
|
|
27
|
+
* A DID participating in at least one live relationship.
|
|
28
|
+
*/
|
|
29
|
+
did: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One edge between a **pair** of identifiers, carrying every half published between them.
|
|
33
|
+
*
|
|
34
|
+
* `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.
|
|
35
|
+
*/
|
|
36
|
+
export interface GraphEdge {
|
|
37
|
+
/**
|
|
38
|
+
* 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.
|
|
39
|
+
*
|
|
40
|
+
* @minItems 2
|
|
41
|
+
* @maxItems 2
|
|
42
|
+
*/
|
|
43
|
+
endpoints: [string, string];
|
|
44
|
+
/**
|
|
45
|
+
* 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.
|
|
46
|
+
*
|
|
47
|
+
* @minItems 1
|
|
48
|
+
*/
|
|
49
|
+
halves: [GraphHalf, ...GraphHalf[]];
|
|
50
|
+
/**
|
|
51
|
+
* 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.
|
|
52
|
+
*/
|
|
53
|
+
complete: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* One published relationship credential: a **directed half** of an edge, asserted by `issuerDid` about `subjectDid`.
|
|
57
|
+
*
|
|
58
|
+
* Body-free on purpose — the graph shows the shape of the trust network, not credential contents. `id` is the row identifier a revoke takes.
|
|
59
|
+
*/
|
|
60
|
+
export interface GraphHalf {
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* The asserting party.
|
|
64
|
+
*/
|
|
65
|
+
issuerDid: string;
|
|
66
|
+
/**
|
|
67
|
+
* The party asserted about.
|
|
68
|
+
*/
|
|
69
|
+
subjectDid: string;
|
|
70
|
+
createdAt: string;
|
|
71
|
+
/**
|
|
72
|
+
* The persona this issuer has asserted on this half, when they have.
|
|
73
|
+
*
|
|
74
|
+
* 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.
|
|
75
|
+
*/
|
|
76
|
+
personaDid?: string | null;
|
|
77
|
+
}
|
|
78
|
+
/** Trust Task type URI. */
|
|
79
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/relationships/graph/0.2";
|
|
80
|
+
/** Stable alias for this specification's request payload shape. */
|
|
81
|
+
export type Payload = VTCRelationshipsGraphPayload;
|
|
82
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
83
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/relationships/graph/0.2#response";
|
|
84
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
85
|
+
export type Response = VTCRelationshipsGraphResponsePayload;
|
|
86
|
+
/**
|
|
87
|
+
* This specification's payload schema, as a value.
|
|
88
|
+
*
|
|
89
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
90
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
91
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
92
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
93
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
94
|
+
*/
|
|
95
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
96
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
97
|
+
readonly $id: "https://trusttasks.org/spec/vtc/relationships/graph/0.2";
|
|
98
|
+
readonly title: "VTC Relationships Graph — payload";
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly additionalProperties: false;
|
|
101
|
+
readonly properties: {
|
|
102
|
+
readonly ext: {
|
|
103
|
+
readonly $ref: "#/$defs/Ext";
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
readonly $defs: {
|
|
107
|
+
readonly Response: {
|
|
108
|
+
readonly $anchor: "response";
|
|
109
|
+
readonly title: "VTC Relationships Graph — response payload";
|
|
110
|
+
readonly type: "object";
|
|
111
|
+
readonly additionalProperties: false;
|
|
112
|
+
readonly required: readonly ["nodes", "edges"];
|
|
113
|
+
readonly properties: {
|
|
114
|
+
readonly nodes: {
|
|
115
|
+
readonly type: "array";
|
|
116
|
+
readonly items: {
|
|
117
|
+
readonly $ref: "#/$defs/GraphNode";
|
|
118
|
+
};
|
|
119
|
+
readonly description: "One per distinct DID appearing in a live edge. No isolated nodes.";
|
|
120
|
+
};
|
|
121
|
+
readonly edges: {
|
|
122
|
+
readonly type: "array";
|
|
123
|
+
readonly items: {
|
|
124
|
+
readonly $ref: "#/$defs/GraphEdge";
|
|
125
|
+
};
|
|
126
|
+
readonly description: "One per **pair** of identifiers with at least one live credential between them, not one per credential.";
|
|
127
|
+
};
|
|
128
|
+
readonly ext: {
|
|
129
|
+
readonly $ref: "#/$defs/Ext";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly GraphNode: {
|
|
134
|
+
readonly $anchor: "graphNode";
|
|
135
|
+
readonly title: "GraphNode";
|
|
136
|
+
readonly type: "object";
|
|
137
|
+
readonly additionalProperties: false;
|
|
138
|
+
readonly required: readonly ["did"];
|
|
139
|
+
readonly properties: {
|
|
140
|
+
readonly did: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
readonly minLength: 1;
|
|
143
|
+
readonly description: "A DID participating in at least one live relationship.";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly GraphEdge: {
|
|
148
|
+
readonly $anchor: "graphEdge";
|
|
149
|
+
readonly title: "GraphEdge";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["endpoints", "halves", "complete"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly endpoints: {
|
|
155
|
+
readonly type: "array";
|
|
156
|
+
readonly items: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly pattern: "^did:";
|
|
159
|
+
};
|
|
160
|
+
readonly minItems: 2;
|
|
161
|
+
readonly maxItems: 2;
|
|
162
|
+
readonly 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.";
|
|
163
|
+
};
|
|
164
|
+
readonly halves: {
|
|
165
|
+
readonly type: "array";
|
|
166
|
+
readonly items: {
|
|
167
|
+
readonly $ref: "#/$defs/GraphHalf";
|
|
168
|
+
};
|
|
169
|
+
readonly minItems: 1;
|
|
170
|
+
readonly 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.";
|
|
171
|
+
};
|
|
172
|
+
readonly complete: {
|
|
173
|
+
readonly type: "boolean";
|
|
174
|
+
readonly 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.";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly 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.";
|
|
178
|
+
};
|
|
179
|
+
readonly GraphHalf: {
|
|
180
|
+
readonly $anchor: "graphHalf";
|
|
181
|
+
readonly title: "GraphHalf";
|
|
182
|
+
readonly type: "object";
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
readonly 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.";
|
|
185
|
+
readonly required: readonly ["id", "issuerDid", "subjectDid", "createdAt"];
|
|
186
|
+
readonly properties: {
|
|
187
|
+
readonly id: {
|
|
188
|
+
readonly type: "string";
|
|
189
|
+
readonly minLength: 1;
|
|
190
|
+
};
|
|
191
|
+
readonly issuerDid: {
|
|
192
|
+
readonly type: "string";
|
|
193
|
+
readonly pattern: "^did:";
|
|
194
|
+
readonly description: "The asserting party.";
|
|
195
|
+
};
|
|
196
|
+
readonly subjectDid: {
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
readonly pattern: "^did:";
|
|
199
|
+
readonly description: "The party asserted about.";
|
|
200
|
+
};
|
|
201
|
+
readonly createdAt: {
|
|
202
|
+
readonly type: "string";
|
|
203
|
+
readonly format: "date-time";
|
|
204
|
+
};
|
|
205
|
+
readonly personaDid: {
|
|
206
|
+
readonly type: readonly ["string", "null"];
|
|
207
|
+
readonly pattern: "^did:|^$";
|
|
208
|
+
readonly 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.";
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly Ext: {
|
|
213
|
+
readonly title: "Ext";
|
|
214
|
+
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.";
|
|
215
|
+
readonly type: "object";
|
|
216
|
+
readonly minProperties: 1;
|
|
217
|
+
readonly additionalProperties: true;
|
|
218
|
+
readonly propertyNames: {
|
|
219
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
225
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
226
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
227
|
+
readonly $ref: "#/$defs/Response";
|
|
228
|
+
readonly $defs: {
|
|
229
|
+
readonly Response: {
|
|
230
|
+
readonly $anchor: "response";
|
|
231
|
+
readonly title: "VTC Relationships Graph — response payload";
|
|
232
|
+
readonly type: "object";
|
|
233
|
+
readonly additionalProperties: false;
|
|
234
|
+
readonly required: readonly ["nodes", "edges"];
|
|
235
|
+
readonly properties: {
|
|
236
|
+
readonly nodes: {
|
|
237
|
+
readonly type: "array";
|
|
238
|
+
readonly items: {
|
|
239
|
+
readonly $ref: "#/$defs/GraphNode";
|
|
240
|
+
};
|
|
241
|
+
readonly description: "One per distinct DID appearing in a live edge. No isolated nodes.";
|
|
242
|
+
};
|
|
243
|
+
readonly edges: {
|
|
244
|
+
readonly type: "array";
|
|
245
|
+
readonly items: {
|
|
246
|
+
readonly $ref: "#/$defs/GraphEdge";
|
|
247
|
+
};
|
|
248
|
+
readonly description: "One per **pair** of identifiers with at least one live credential between them, not one per credential.";
|
|
249
|
+
};
|
|
250
|
+
readonly ext: {
|
|
251
|
+
readonly $ref: "#/$defs/Ext";
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
readonly GraphNode: {
|
|
256
|
+
readonly $anchor: "graphNode";
|
|
257
|
+
readonly title: "GraphNode";
|
|
258
|
+
readonly type: "object";
|
|
259
|
+
readonly additionalProperties: false;
|
|
260
|
+
readonly required: readonly ["did"];
|
|
261
|
+
readonly properties: {
|
|
262
|
+
readonly did: {
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
readonly minLength: 1;
|
|
265
|
+
readonly description: "A DID participating in at least one live relationship.";
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
readonly GraphEdge: {
|
|
270
|
+
readonly $anchor: "graphEdge";
|
|
271
|
+
readonly title: "GraphEdge";
|
|
272
|
+
readonly type: "object";
|
|
273
|
+
readonly additionalProperties: false;
|
|
274
|
+
readonly required: readonly ["endpoints", "halves", "complete"];
|
|
275
|
+
readonly properties: {
|
|
276
|
+
readonly endpoints: {
|
|
277
|
+
readonly type: "array";
|
|
278
|
+
readonly items: {
|
|
279
|
+
readonly type: "string";
|
|
280
|
+
readonly pattern: "^did:";
|
|
281
|
+
};
|
|
282
|
+
readonly minItems: 2;
|
|
283
|
+
readonly maxItems: 2;
|
|
284
|
+
readonly 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.";
|
|
285
|
+
};
|
|
286
|
+
readonly halves: {
|
|
287
|
+
readonly type: "array";
|
|
288
|
+
readonly items: {
|
|
289
|
+
readonly $ref: "#/$defs/GraphHalf";
|
|
290
|
+
};
|
|
291
|
+
readonly minItems: 1;
|
|
292
|
+
readonly 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.";
|
|
293
|
+
};
|
|
294
|
+
readonly complete: {
|
|
295
|
+
readonly type: "boolean";
|
|
296
|
+
readonly 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.";
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
readonly 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.";
|
|
300
|
+
};
|
|
301
|
+
readonly GraphHalf: {
|
|
302
|
+
readonly $anchor: "graphHalf";
|
|
303
|
+
readonly title: "GraphHalf";
|
|
304
|
+
readonly type: "object";
|
|
305
|
+
readonly additionalProperties: false;
|
|
306
|
+
readonly 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.";
|
|
307
|
+
readonly required: readonly ["id", "issuerDid", "subjectDid", "createdAt"];
|
|
308
|
+
readonly properties: {
|
|
309
|
+
readonly id: {
|
|
310
|
+
readonly type: "string";
|
|
311
|
+
readonly minLength: 1;
|
|
312
|
+
};
|
|
313
|
+
readonly issuerDid: {
|
|
314
|
+
readonly type: "string";
|
|
315
|
+
readonly pattern: "^did:";
|
|
316
|
+
readonly description: "The asserting party.";
|
|
317
|
+
};
|
|
318
|
+
readonly subjectDid: {
|
|
319
|
+
readonly type: "string";
|
|
320
|
+
readonly pattern: "^did:";
|
|
321
|
+
readonly description: "The party asserted about.";
|
|
322
|
+
};
|
|
323
|
+
readonly createdAt: {
|
|
324
|
+
readonly type: "string";
|
|
325
|
+
readonly format: "date-time";
|
|
326
|
+
};
|
|
327
|
+
readonly personaDid: {
|
|
328
|
+
readonly type: readonly ["string", "null"];
|
|
329
|
+
readonly pattern: "^did:|^$";
|
|
330
|
+
readonly 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.";
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
readonly Ext: {
|
|
335
|
+
readonly title: "Ext";
|
|
336
|
+
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.";
|
|
337
|
+
readonly type: "object";
|
|
338
|
+
readonly minProperties: 1;
|
|
339
|
+
readonly additionalProperties: true;
|
|
340
|
+
readonly propertyNames: {
|
|
341
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
348
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
349
|
+
* per-specification and cannot be derived from the document alone, and
|
|
350
|
+
* item 2 needs the schema this carries.
|
|
351
|
+
*/
|
|
352
|
+
export declare const SPEC: {
|
|
353
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/relationships/graph/0.2";
|
|
354
|
+
readonly isBearer: false;
|
|
355
|
+
readonly isProofRequired: false;
|
|
356
|
+
readonly isRecipientRequired: true;
|
|
357
|
+
readonly payloadSchema: {
|
|
358
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
359
|
+
readonly $id: "https://trusttasks.org/spec/vtc/relationships/graph/0.2";
|
|
360
|
+
readonly title: "VTC Relationships Graph — payload";
|
|
361
|
+
readonly type: "object";
|
|
362
|
+
readonly additionalProperties: false;
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly ext: {
|
|
365
|
+
readonly $ref: "#/$defs/Ext";
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly $defs: {
|
|
369
|
+
readonly Response: {
|
|
370
|
+
readonly $anchor: "response";
|
|
371
|
+
readonly title: "VTC Relationships Graph — response payload";
|
|
372
|
+
readonly type: "object";
|
|
373
|
+
readonly additionalProperties: false;
|
|
374
|
+
readonly required: readonly ["nodes", "edges"];
|
|
375
|
+
readonly properties: {
|
|
376
|
+
readonly nodes: {
|
|
377
|
+
readonly type: "array";
|
|
378
|
+
readonly items: {
|
|
379
|
+
readonly $ref: "#/$defs/GraphNode";
|
|
380
|
+
};
|
|
381
|
+
readonly description: "One per distinct DID appearing in a live edge. No isolated nodes.";
|
|
382
|
+
};
|
|
383
|
+
readonly edges: {
|
|
384
|
+
readonly type: "array";
|
|
385
|
+
readonly items: {
|
|
386
|
+
readonly $ref: "#/$defs/GraphEdge";
|
|
387
|
+
};
|
|
388
|
+
readonly description: "One per **pair** of identifiers with at least one live credential between them, not one per credential.";
|
|
389
|
+
};
|
|
390
|
+
readonly ext: {
|
|
391
|
+
readonly $ref: "#/$defs/Ext";
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
readonly GraphNode: {
|
|
396
|
+
readonly $anchor: "graphNode";
|
|
397
|
+
readonly title: "GraphNode";
|
|
398
|
+
readonly type: "object";
|
|
399
|
+
readonly additionalProperties: false;
|
|
400
|
+
readonly required: readonly ["did"];
|
|
401
|
+
readonly properties: {
|
|
402
|
+
readonly did: {
|
|
403
|
+
readonly type: "string";
|
|
404
|
+
readonly minLength: 1;
|
|
405
|
+
readonly description: "A DID participating in at least one live relationship.";
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly GraphEdge: {
|
|
410
|
+
readonly $anchor: "graphEdge";
|
|
411
|
+
readonly title: "GraphEdge";
|
|
412
|
+
readonly type: "object";
|
|
413
|
+
readonly additionalProperties: false;
|
|
414
|
+
readonly required: readonly ["endpoints", "halves", "complete"];
|
|
415
|
+
readonly properties: {
|
|
416
|
+
readonly endpoints: {
|
|
417
|
+
readonly type: "array";
|
|
418
|
+
readonly items: {
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
readonly pattern: "^did:";
|
|
421
|
+
};
|
|
422
|
+
readonly minItems: 2;
|
|
423
|
+
readonly maxItems: 2;
|
|
424
|
+
readonly 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.";
|
|
425
|
+
};
|
|
426
|
+
readonly halves: {
|
|
427
|
+
readonly type: "array";
|
|
428
|
+
readonly items: {
|
|
429
|
+
readonly $ref: "#/$defs/GraphHalf";
|
|
430
|
+
};
|
|
431
|
+
readonly minItems: 1;
|
|
432
|
+
readonly 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.";
|
|
433
|
+
};
|
|
434
|
+
readonly complete: {
|
|
435
|
+
readonly type: "boolean";
|
|
436
|
+
readonly 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.";
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
readonly 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.";
|
|
440
|
+
};
|
|
441
|
+
readonly GraphHalf: {
|
|
442
|
+
readonly $anchor: "graphHalf";
|
|
443
|
+
readonly title: "GraphHalf";
|
|
444
|
+
readonly type: "object";
|
|
445
|
+
readonly additionalProperties: false;
|
|
446
|
+
readonly 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.";
|
|
447
|
+
readonly required: readonly ["id", "issuerDid", "subjectDid", "createdAt"];
|
|
448
|
+
readonly properties: {
|
|
449
|
+
readonly id: {
|
|
450
|
+
readonly type: "string";
|
|
451
|
+
readonly minLength: 1;
|
|
452
|
+
};
|
|
453
|
+
readonly issuerDid: {
|
|
454
|
+
readonly type: "string";
|
|
455
|
+
readonly pattern: "^did:";
|
|
456
|
+
readonly description: "The asserting party.";
|
|
457
|
+
};
|
|
458
|
+
readonly subjectDid: {
|
|
459
|
+
readonly type: "string";
|
|
460
|
+
readonly pattern: "^did:";
|
|
461
|
+
readonly description: "The party asserted about.";
|
|
462
|
+
};
|
|
463
|
+
readonly createdAt: {
|
|
464
|
+
readonly type: "string";
|
|
465
|
+
readonly format: "date-time";
|
|
466
|
+
};
|
|
467
|
+
readonly personaDid: {
|
|
468
|
+
readonly type: readonly ["string", "null"];
|
|
469
|
+
readonly pattern: "^did:|^$";
|
|
470
|
+
readonly 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.";
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
readonly Ext: {
|
|
475
|
+
readonly title: "Ext";
|
|
476
|
+
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.";
|
|
477
|
+
readonly type: "object";
|
|
478
|
+
readonly minProperties: 1;
|
|
479
|
+
readonly additionalProperties: true;
|
|
480
|
+
readonly propertyNames: {
|
|
481
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
489
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
490
|
+
* parties (§7.3 item 5).
|
|
491
|
+
*/
|
|
492
|
+
export declare const RESPONSE_SPEC: {
|
|
493
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/relationships/graph/0.2#response";
|
|
494
|
+
readonly isBearer: false;
|
|
495
|
+
readonly isProofRequired: false;
|
|
496
|
+
readonly isRecipientRequired: true;
|
|
497
|
+
readonly payloadSchema: {
|
|
498
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
499
|
+
readonly $ref: "#/$defs/Response";
|
|
500
|
+
readonly $defs: {
|
|
501
|
+
readonly Response: {
|
|
502
|
+
readonly $anchor: "response";
|
|
503
|
+
readonly title: "VTC Relationships Graph — response payload";
|
|
504
|
+
readonly type: "object";
|
|
505
|
+
readonly additionalProperties: false;
|
|
506
|
+
readonly required: readonly ["nodes", "edges"];
|
|
507
|
+
readonly properties: {
|
|
508
|
+
readonly nodes: {
|
|
509
|
+
readonly type: "array";
|
|
510
|
+
readonly items: {
|
|
511
|
+
readonly $ref: "#/$defs/GraphNode";
|
|
512
|
+
};
|
|
513
|
+
readonly description: "One per distinct DID appearing in a live edge. No isolated nodes.";
|
|
514
|
+
};
|
|
515
|
+
readonly edges: {
|
|
516
|
+
readonly type: "array";
|
|
517
|
+
readonly items: {
|
|
518
|
+
readonly $ref: "#/$defs/GraphEdge";
|
|
519
|
+
};
|
|
520
|
+
readonly description: "One per **pair** of identifiers with at least one live credential between them, not one per credential.";
|
|
521
|
+
};
|
|
522
|
+
readonly ext: {
|
|
523
|
+
readonly $ref: "#/$defs/Ext";
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
readonly GraphNode: {
|
|
528
|
+
readonly $anchor: "graphNode";
|
|
529
|
+
readonly title: "GraphNode";
|
|
530
|
+
readonly type: "object";
|
|
531
|
+
readonly additionalProperties: false;
|
|
532
|
+
readonly required: readonly ["did"];
|
|
533
|
+
readonly properties: {
|
|
534
|
+
readonly did: {
|
|
535
|
+
readonly type: "string";
|
|
536
|
+
readonly minLength: 1;
|
|
537
|
+
readonly description: "A DID participating in at least one live relationship.";
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
readonly GraphEdge: {
|
|
542
|
+
readonly $anchor: "graphEdge";
|
|
543
|
+
readonly title: "GraphEdge";
|
|
544
|
+
readonly type: "object";
|
|
545
|
+
readonly additionalProperties: false;
|
|
546
|
+
readonly required: readonly ["endpoints", "halves", "complete"];
|
|
547
|
+
readonly properties: {
|
|
548
|
+
readonly endpoints: {
|
|
549
|
+
readonly type: "array";
|
|
550
|
+
readonly items: {
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly pattern: "^did:";
|
|
553
|
+
};
|
|
554
|
+
readonly minItems: 2;
|
|
555
|
+
readonly maxItems: 2;
|
|
556
|
+
readonly 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.";
|
|
557
|
+
};
|
|
558
|
+
readonly halves: {
|
|
559
|
+
readonly type: "array";
|
|
560
|
+
readonly items: {
|
|
561
|
+
readonly $ref: "#/$defs/GraphHalf";
|
|
562
|
+
};
|
|
563
|
+
readonly minItems: 1;
|
|
564
|
+
readonly 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.";
|
|
565
|
+
};
|
|
566
|
+
readonly complete: {
|
|
567
|
+
readonly type: "boolean";
|
|
568
|
+
readonly 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.";
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
readonly 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.";
|
|
572
|
+
};
|
|
573
|
+
readonly GraphHalf: {
|
|
574
|
+
readonly $anchor: "graphHalf";
|
|
575
|
+
readonly title: "GraphHalf";
|
|
576
|
+
readonly type: "object";
|
|
577
|
+
readonly additionalProperties: false;
|
|
578
|
+
readonly 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.";
|
|
579
|
+
readonly required: readonly ["id", "issuerDid", "subjectDid", "createdAt"];
|
|
580
|
+
readonly properties: {
|
|
581
|
+
readonly id: {
|
|
582
|
+
readonly type: "string";
|
|
583
|
+
readonly minLength: 1;
|
|
584
|
+
};
|
|
585
|
+
readonly issuerDid: {
|
|
586
|
+
readonly type: "string";
|
|
587
|
+
readonly pattern: "^did:";
|
|
588
|
+
readonly description: "The asserting party.";
|
|
589
|
+
};
|
|
590
|
+
readonly subjectDid: {
|
|
591
|
+
readonly type: "string";
|
|
592
|
+
readonly pattern: "^did:";
|
|
593
|
+
readonly description: "The party asserted about.";
|
|
594
|
+
};
|
|
595
|
+
readonly createdAt: {
|
|
596
|
+
readonly type: "string";
|
|
597
|
+
readonly format: "date-time";
|
|
598
|
+
};
|
|
599
|
+
readonly personaDid: {
|
|
600
|
+
readonly type: readonly ["string", "null"];
|
|
601
|
+
readonly pattern: "^did:|^$";
|
|
602
|
+
readonly 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.";
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
readonly Ext: {
|
|
607
|
+
readonly title: "Ext";
|
|
608
|
+
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.";
|
|
609
|
+
readonly type: "object";
|
|
610
|
+
readonly minProperties: 1;
|
|
611
|
+
readonly additionalProperties: true;
|
|
612
|
+
readonly propertyNames: {
|
|
613
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/relationships/graph/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,4BAA4B;IAC3C,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AACD;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B;;;;OAIG;IACH,MAAM,EAAE,CAAC,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACpC;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AACD;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,yDAAkE,CAAC;AAE3F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAEnD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,kEAA2E,CAAC;AAE7G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyI1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
|