@openvtc/trust-tasks 0.16.4 → 0.16.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.
@@ -0,0 +1,420 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/credentials/list/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { CredentialId, Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Derived at read time. `revoked` takes precedence over `expired`: a credential revoked before its window closed is revoked, and reporting it as merely expired would hide that somebody acted.
11
+ */
12
+ export type IssuedCredentialStatus = "active" | "expired" | "revoked";
13
+
14
+ /**
15
+ * Enumerate the credentials an agent has issued, as metadata. Every filter is optional and those present are AND-combined.
16
+ */
17
+ export interface VTACredentialsList {
18
+ /**
19
+ * Only credentials issued to this DID.
20
+ */
21
+ holder?: string;
22
+ /**
23
+ * Only credentials carrying this type tag beyond `VerifiableCredential`.
24
+ */
25
+ credentialType?: string;
26
+ /**
27
+ * Only credentials in this state. Derived by the agent at read time, never stored.
28
+ */
29
+ status?: "active" | "expired" | "revoked";
30
+ /**
31
+ * Maximum records to return. The agent MAY return fewer and caps this value.
32
+ */
33
+ pageSize?: number;
34
+ /**
35
+ * Continue a previous page. Opaque — consumers must not construct or parse one.
36
+ */
37
+ cursor?: string;
38
+ /**
39
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
40
+ */
41
+ ext?: Ext;
42
+ }
43
+ export interface VTACredentialsListResponsePayload {
44
+ /**
45
+ * One summary per matching credential. Empty when nothing matched — a successful answer, not an error.
46
+ */
47
+ credentials: IssuedCredentialSummary[];
48
+ /**
49
+ * The agent stopped early. A consumer must not read a truncated page as a complete account of what was issued.
50
+ */
51
+ truncated: boolean;
52
+ /**
53
+ * Pass to the next request to continue. Absent when the page is the last.
54
+ */
55
+ cursor?: string;
56
+ /**
57
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
58
+ */
59
+ ext?: Ext;
60
+ }
61
+ /**
62
+ * A body-free projection of an issuance record. Carries no claim content by construction — see the specification's rationale for why a list does not return credentials.
63
+ */
64
+ export interface IssuedCredentialSummary {
65
+ /**
66
+ * The id `vta/credentials/revoke` is keyed on.
67
+ */
68
+ credentialId: CredentialId;
69
+ /**
70
+ * Who the credential was issued to.
71
+ */
72
+ holder: string;
73
+ /**
74
+ * The type tag beyond `VerifiableCredential`, when the credential carries one.
75
+ */
76
+ credentialType?: string;
77
+ issuedAt: string;
78
+ expiresAt: string;
79
+ status: IssuedCredentialStatus;
80
+ /**
81
+ * Present iff `status` is `revoked`.
82
+ */
83
+ revokedAt?: string;
84
+ /**
85
+ * Free text recorded at revocation. Disclosed to every caller entitled to this list — see Security & Privacy.
86
+ */
87
+ revocationReason?: string;
88
+ }
89
+
90
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
91
+ export type { CredentialId, Ext };
92
+
93
+ /** Trust Task type URI. */
94
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/credentials/list/0.1" as const;
95
+
96
+ /** Stable alias for this specification's request payload shape. */
97
+ export type Payload = VTACredentialsList;
98
+
99
+ /** Trust Task response type URI (request type URI + "#response"). */
100
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/credentials/list/0.1#response" as const;
101
+
102
+ /** Stable alias for this specification's success-response payload shape. */
103
+ export type Response = VTACredentialsListResponsePayload;
104
+
105
+ /**
106
+ * This specification's payload schema, as a value.
107
+ *
108
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
109
+ * rather than only as a `.json` file because TypeScript types are erased
110
+ * at runtime: without a schema a consumer has nothing to validate, and
111
+ * every REQUIRED payload member is optional in practice. Cross-file
112
+ * `$ref`s are already inlined, so it needs no resolver.
113
+ */
114
+ export const PAYLOAD_SCHEMA = {
115
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
116
+ "$id": "https://trusttasks.org/spec/vta/credentials/list/0.1",
117
+ "title": "VTA Credentials — List",
118
+ "description": "Enumerate the credentials an agent has issued, as metadata. Every filter is optional and those present are AND-combined.",
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "properties": {
122
+ "holder": {
123
+ "$ref": "#/$defs/Did",
124
+ "description": "Only credentials issued to this DID."
125
+ },
126
+ "credentialType": {
127
+ "type": "string",
128
+ "minLength": 1,
129
+ "maxLength": 256,
130
+ "description": "Only credentials carrying this type tag beyond `VerifiableCredential`."
131
+ },
132
+ "status": {
133
+ "$ref": "#/$defs/IssuedCredentialStatus",
134
+ "description": "Only credentials in this state. Derived by the agent at read time, never stored."
135
+ },
136
+ "pageSize": {
137
+ "type": "integer",
138
+ "minimum": 1,
139
+ "maximum": 1000,
140
+ "description": "Maximum records to return. The agent MAY return fewer and caps this value."
141
+ },
142
+ "cursor": {
143
+ "type": "string",
144
+ "minLength": 1,
145
+ "maxLength": 4096,
146
+ "description": "Continue a previous page. Opaque — consumers must not construct or parse one."
147
+ },
148
+ "ext": {
149
+ "$ref": "#/$defs/Ext",
150
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
151
+ }
152
+ },
153
+ "$defs": {
154
+ "Response": {
155
+ "$anchor": "response",
156
+ "title": "VTA Credentials List — response payload",
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "credentials",
161
+ "truncated"
162
+ ],
163
+ "properties": {
164
+ "credentials": {
165
+ "type": "array",
166
+ "items": {
167
+ "$ref": "#/$defs/IssuedCredentialSummary"
168
+ },
169
+ "description": "One summary per matching credential. Empty when nothing matched — a successful answer, not an error."
170
+ },
171
+ "truncated": {
172
+ "type": "boolean",
173
+ "description": "The agent stopped early. A consumer must not read a truncated page as a complete account of what was issued."
174
+ },
175
+ "cursor": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 4096,
179
+ "description": "Pass to the next request to continue. Absent when the page is the last."
180
+ },
181
+ "ext": {
182
+ "$ref": "#/$defs/Ext",
183
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
184
+ }
185
+ }
186
+ },
187
+ "IssuedCredentialSummary": {
188
+ "title": "IssuedCredentialSummary",
189
+ "description": "A body-free projection of an issuance record. Carries no claim content by construction — see the specification's rationale for why a list does not return credentials.",
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": [
193
+ "credentialId",
194
+ "holder",
195
+ "issuedAt",
196
+ "expiresAt",
197
+ "status"
198
+ ],
199
+ "properties": {
200
+ "credentialId": {
201
+ "$ref": "#/$defs/CredentialId",
202
+ "description": "The id `vta/credentials/revoke` is keyed on."
203
+ },
204
+ "holder": {
205
+ "$ref": "#/$defs/Did",
206
+ "description": "Who the credential was issued to."
207
+ },
208
+ "credentialType": {
209
+ "type": "string",
210
+ "minLength": 1,
211
+ "maxLength": 256,
212
+ "description": "The type tag beyond `VerifiableCredential`, when the credential carries one."
213
+ },
214
+ "issuedAt": {
215
+ "type": "string",
216
+ "format": "date-time"
217
+ },
218
+ "expiresAt": {
219
+ "type": "string",
220
+ "format": "date-time"
221
+ },
222
+ "status": {
223
+ "$ref": "#/$defs/IssuedCredentialStatus"
224
+ },
225
+ "revokedAt": {
226
+ "type": "string",
227
+ "format": "date-time",
228
+ "description": "Present iff `status` is `revoked`."
229
+ },
230
+ "revocationReason": {
231
+ "type": "string",
232
+ "maxLength": 1024,
233
+ "description": "Free text recorded at revocation. Disclosed to every caller entitled to this list — see Security & Privacy."
234
+ }
235
+ }
236
+ },
237
+ "IssuedCredentialStatus": {
238
+ "type": "string",
239
+ "enum": [
240
+ "active",
241
+ "expired",
242
+ "revoked"
243
+ ],
244
+ "description": "Derived at read time. `revoked` takes precedence over `expired`: a credential revoked before its window closed is revoked, and reporting it as merely expired would hide that somebody acted."
245
+ },
246
+ "Did": {
247
+ "type": "string",
248
+ "pattern": "^did:[a-z0-9]+:.+$",
249
+ "maxLength": 2048
250
+ },
251
+ "CredentialId": {
252
+ "$anchor": "credentialId",
253
+ "title": "CredentialId",
254
+ "description": "Stable identifier for an issued credential — the handle for revocation and audit. Opaque to the holder: it MUST be echoed verbatim when revoking and MUST NOT be parsed.",
255
+ "type": "string",
256
+ "minLength": 1
257
+ },
258
+ "Ext": {
259
+ "title": "Ext",
260
+ "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.",
261
+ "type": "object",
262
+ "minProperties": 1,
263
+ "additionalProperties": true,
264
+ "propertyNames": {
265
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
266
+ }
267
+ }
268
+ }
269
+ } as const;
270
+
271
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
272
+ export const RESPONSE_PAYLOAD_SCHEMA = {
273
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
274
+ "$ref": "#/$defs/Response",
275
+ "$defs": {
276
+ "Response": {
277
+ "$anchor": "response",
278
+ "title": "VTA Credentials List — response payload",
279
+ "type": "object",
280
+ "additionalProperties": false,
281
+ "required": [
282
+ "credentials",
283
+ "truncated"
284
+ ],
285
+ "properties": {
286
+ "credentials": {
287
+ "type": "array",
288
+ "items": {
289
+ "$ref": "#/$defs/IssuedCredentialSummary"
290
+ },
291
+ "description": "One summary per matching credential. Empty when nothing matched — a successful answer, not an error."
292
+ },
293
+ "truncated": {
294
+ "type": "boolean",
295
+ "description": "The agent stopped early. A consumer must not read a truncated page as a complete account of what was issued."
296
+ },
297
+ "cursor": {
298
+ "type": "string",
299
+ "minLength": 1,
300
+ "maxLength": 4096,
301
+ "description": "Pass to the next request to continue. Absent when the page is the last."
302
+ },
303
+ "ext": {
304
+ "$ref": "#/$defs/Ext",
305
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
306
+ }
307
+ }
308
+ },
309
+ "IssuedCredentialSummary": {
310
+ "title": "IssuedCredentialSummary",
311
+ "description": "A body-free projection of an issuance record. Carries no claim content by construction — see the specification's rationale for why a list does not return credentials.",
312
+ "type": "object",
313
+ "additionalProperties": false,
314
+ "required": [
315
+ "credentialId",
316
+ "holder",
317
+ "issuedAt",
318
+ "expiresAt",
319
+ "status"
320
+ ],
321
+ "properties": {
322
+ "credentialId": {
323
+ "$ref": "#/$defs/CredentialId",
324
+ "description": "The id `vta/credentials/revoke` is keyed on."
325
+ },
326
+ "holder": {
327
+ "$ref": "#/$defs/Did",
328
+ "description": "Who the credential was issued to."
329
+ },
330
+ "credentialType": {
331
+ "type": "string",
332
+ "minLength": 1,
333
+ "maxLength": 256,
334
+ "description": "The type tag beyond `VerifiableCredential`, when the credential carries one."
335
+ },
336
+ "issuedAt": {
337
+ "type": "string",
338
+ "format": "date-time"
339
+ },
340
+ "expiresAt": {
341
+ "type": "string",
342
+ "format": "date-time"
343
+ },
344
+ "status": {
345
+ "$ref": "#/$defs/IssuedCredentialStatus"
346
+ },
347
+ "revokedAt": {
348
+ "type": "string",
349
+ "format": "date-time",
350
+ "description": "Present iff `status` is `revoked`."
351
+ },
352
+ "revocationReason": {
353
+ "type": "string",
354
+ "maxLength": 1024,
355
+ "description": "Free text recorded at revocation. Disclosed to every caller entitled to this list — see Security & Privacy."
356
+ }
357
+ }
358
+ },
359
+ "IssuedCredentialStatus": {
360
+ "type": "string",
361
+ "enum": [
362
+ "active",
363
+ "expired",
364
+ "revoked"
365
+ ],
366
+ "description": "Derived at read time. `revoked` takes precedence over `expired`: a credential revoked before its window closed is revoked, and reporting it as merely expired would hide that somebody acted."
367
+ },
368
+ "Did": {
369
+ "type": "string",
370
+ "pattern": "^did:[a-z0-9]+:.+$",
371
+ "maxLength": 2048
372
+ },
373
+ "CredentialId": {
374
+ "$anchor": "credentialId",
375
+ "title": "CredentialId",
376
+ "description": "Stable identifier for an issued credential — the handle for revocation and audit. Opaque to the holder: it MUST be echoed verbatim when revoking and MUST NOT be parsed.",
377
+ "type": "string",
378
+ "minLength": 1
379
+ },
380
+ "Ext": {
381
+ "title": "Ext",
382
+ "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.",
383
+ "type": "object",
384
+ "minProperties": 1,
385
+ "additionalProperties": true,
386
+ "propertyNames": {
387
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
388
+ }
389
+ }
390
+ }
391
+ } as const;
392
+
393
+ /**
394
+ * SPEC.md §7.2 policy for the request variant, from this specification's
395
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
396
+ * per-specification and cannot be derived from the document alone, and
397
+ * item 2 needs the schema this carries.
398
+ */
399
+ export const SPEC = {
400
+ typeUri: TYPE_URI,
401
+ isBearer: false,
402
+ isProofRequired: false,
403
+ isRecipientRequired: true,
404
+ isIssuedAtRequired: false,
405
+ payloadSchema: PAYLOAD_SCHEMA,
406
+ } as const;
407
+
408
+ /**
409
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
410
+ * tracks the *issuer* party's requirement because a response swaps the
411
+ * parties (§7.3 item 5).
412
+ */
413
+ export const RESPONSE_SPEC = {
414
+ typeUri: RESPONSE_TYPE_URI,
415
+ isBearer: false,
416
+ isProofRequired: false,
417
+ isRecipientRequired: true,
418
+ isIssuedAtRequired: false,
419
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
420
+ } as const;
@@ -0,0 +1,259 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/members/credentials/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Fetch the membership-pair credential bodies a community holds for one member.
11
+ */
12
+ export interface VTCMembersCredentials {
13
+ /**
14
+ * The member to read.
15
+ */
16
+ did: string;
17
+ /**
18
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
19
+ */
20
+ ext?: Ext;
21
+ }
22
+ /**
23
+ * The documents the community holds for this member. Every credential member is optional; absent means the community holds no such document, which is a real answer rather than a failure.
24
+ */
25
+ export interface VTCMembersCredentialsResponsePayload {
26
+ /**
27
+ * The member these documents belong to.
28
+ */
29
+ did: string;
30
+ /**
31
+ * The community-issued Verifiable Membership Credential — the grant. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2.
32
+ */
33
+ membershipCredential?: {};
34
+ /**
35
+ * The role Verifiable Endorsement Credential. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2.
36
+ */
37
+ roleCredential?: {};
38
+ /**
39
+ * The member-issued reciprocal VMC — the acknowledgement that completes the edge. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2.
40
+ */
41
+ memberVmc?: {};
42
+ /**
43
+ * When the acknowledgement arrived. Paired with `memberVmc`; a maintainer must not send one without the other.
44
+ */
45
+ memberVmcReceivedAt?: string;
46
+ /**
47
+ * Whether the acknowledgement's digest was verified against the grant. REQUIRED so that 'not verified' is stated rather than inferred from silence. Declares no `default` on purpose — a declared default is materialised by the generated bindings and breaks round-trip idempotence for every existing document.
48
+ */
49
+ memberVmcBound: boolean;
50
+ /**
51
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
52
+ */
53
+ ext?: Ext;
54
+ }
55
+
56
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
57
+ export type { Ext };
58
+
59
+ /** Trust Task type URI. */
60
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/credentials/0.1" as const;
61
+
62
+ /** Stable alias for this specification's request payload shape. */
63
+ export type Payload = VTCMembersCredentials;
64
+
65
+ /** Trust Task response type URI (request type URI + "#response"). */
66
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/members/credentials/0.1#response" as const;
67
+
68
+ /** Stable alias for this specification's success-response payload shape. */
69
+ export type Response = VTCMembersCredentialsResponsePayload;
70
+
71
+ /**
72
+ * This specification's payload schema, as a value.
73
+ *
74
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
75
+ * rather than only as a `.json` file because TypeScript types are erased
76
+ * at runtime: without a schema a consumer has nothing to validate, and
77
+ * every REQUIRED payload member is optional in practice. Cross-file
78
+ * `$ref`s are already inlined, so it needs no resolver.
79
+ */
80
+ export const PAYLOAD_SCHEMA = {
81
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
82
+ "$id": "https://trusttasks.org/spec/vtc/members/credentials/0.1",
83
+ "title": "VTC Members — Credentials",
84
+ "description": "Fetch the membership-pair credential bodies a community holds for one member.",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "did"
89
+ ],
90
+ "properties": {
91
+ "did": {
92
+ "$ref": "#/$defs/Did",
93
+ "description": "The member to read."
94
+ },
95
+ "ext": {
96
+ "$ref": "#/$defs/Ext",
97
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
98
+ }
99
+ },
100
+ "$defs": {
101
+ "Response": {
102
+ "$anchor": "response",
103
+ "title": "VTC Members Credentials — response payload",
104
+ "description": "The documents the community holds for this member. Every credential member is optional; absent means the community holds no such document, which is a real answer rather than a failure.",
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "did",
109
+ "memberVmcBound"
110
+ ],
111
+ "properties": {
112
+ "did": {
113
+ "$ref": "#/$defs/Did",
114
+ "description": "The member these documents belong to."
115
+ },
116
+ "membershipCredential": {
117
+ "type": "object",
118
+ "minProperties": 1,
119
+ "description": "The community-issued Verifiable Membership Credential — the grant. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
120
+ },
121
+ "roleCredential": {
122
+ "type": "object",
123
+ "minProperties": 1,
124
+ "description": "The role Verifiable Endorsement Credential. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
125
+ },
126
+ "memberVmc": {
127
+ "type": "object",
128
+ "minProperties": 1,
129
+ "description": "The member-issued reciprocal VMC — the acknowledgement that completes the edge. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
130
+ },
131
+ "memberVmcReceivedAt": {
132
+ "type": "string",
133
+ "format": "date-time",
134
+ "description": "When the acknowledgement arrived. Paired with `memberVmc`; a maintainer must not send one without the other."
135
+ },
136
+ "memberVmcBound": {
137
+ "type": "boolean",
138
+ "description": "Whether the acknowledgement's digest was verified against the grant. REQUIRED so that 'not verified' is stated rather than inferred from silence. Declares no `default` on purpose — a declared default is materialised by the generated bindings and breaks round-trip idempotence for every existing document."
139
+ },
140
+ "ext": {
141
+ "$ref": "#/$defs/Ext",
142
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
143
+ }
144
+ }
145
+ },
146
+ "Did": {
147
+ "type": "string",
148
+ "pattern": "^did:[a-z0-9]+:.+$",
149
+ "maxLength": 2048
150
+ },
151
+ "Ext": {
152
+ "title": "Ext",
153
+ "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.",
154
+ "type": "object",
155
+ "minProperties": 1,
156
+ "additionalProperties": true,
157
+ "propertyNames": {
158
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
159
+ }
160
+ }
161
+ }
162
+ } as const;
163
+
164
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
165
+ export const RESPONSE_PAYLOAD_SCHEMA = {
166
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
167
+ "$ref": "#/$defs/Response",
168
+ "$defs": {
169
+ "Response": {
170
+ "$anchor": "response",
171
+ "title": "VTC Members Credentials — response payload",
172
+ "description": "The documents the community holds for this member. Every credential member is optional; absent means the community holds no such document, which is a real answer rather than a failure.",
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "did",
177
+ "memberVmcBound"
178
+ ],
179
+ "properties": {
180
+ "did": {
181
+ "$ref": "#/$defs/Did",
182
+ "description": "The member these documents belong to."
183
+ },
184
+ "membershipCredential": {
185
+ "type": "object",
186
+ "minProperties": 1,
187
+ "description": "The community-issued Verifiable Membership Credential — the grant. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
188
+ },
189
+ "roleCredential": {
190
+ "type": "object",
191
+ "minProperties": 1,
192
+ "description": "The role Verifiable Endorsement Credential. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
193
+ },
194
+ "memberVmc": {
195
+ "type": "object",
196
+ "minProperties": 1,
197
+ "description": "The member-issued reciprocal VMC — the acknowledgement that completes the edge. A verifiable credential, carried verbatim and opaque to this schema. Maintainers must not re-serialise it — the bytes carry a proof over themselves. Matches the `vrcJsonld` idiom in vtc/relationships/list/0.2."
198
+ },
199
+ "memberVmcReceivedAt": {
200
+ "type": "string",
201
+ "format": "date-time",
202
+ "description": "When the acknowledgement arrived. Paired with `memberVmc`; a maintainer must not send one without the other."
203
+ },
204
+ "memberVmcBound": {
205
+ "type": "boolean",
206
+ "description": "Whether the acknowledgement's digest was verified against the grant. REQUIRED so that 'not verified' is stated rather than inferred from silence. Declares no `default` on purpose — a declared default is materialised by the generated bindings and breaks round-trip idempotence for every existing document."
207
+ },
208
+ "ext": {
209
+ "$ref": "#/$defs/Ext",
210
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
211
+ }
212
+ }
213
+ },
214
+ "Did": {
215
+ "type": "string",
216
+ "pattern": "^did:[a-z0-9]+:.+$",
217
+ "maxLength": 2048
218
+ },
219
+ "Ext": {
220
+ "title": "Ext",
221
+ "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.",
222
+ "type": "object",
223
+ "minProperties": 1,
224
+ "additionalProperties": true,
225
+ "propertyNames": {
226
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
227
+ }
228
+ }
229
+ }
230
+ } as const;
231
+
232
+ /**
233
+ * SPEC.md §7.2 policy for the request variant, from this specification's
234
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
235
+ * per-specification and cannot be derived from the document alone, and
236
+ * item 2 needs the schema this carries.
237
+ */
238
+ export const SPEC = {
239
+ typeUri: TYPE_URI,
240
+ isBearer: false,
241
+ isProofRequired: true,
242
+ isRecipientRequired: true,
243
+ isIssuedAtRequired: true,
244
+ payloadSchema: PAYLOAD_SCHEMA,
245
+ } as const;
246
+
247
+ /**
248
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
249
+ * tracks the *issuer* party's requirement because a response swaps the
250
+ * parties (§7.3 item 5).
251
+ */
252
+ export const RESPONSE_SPEC = {
253
+ typeUri: RESPONSE_TYPE_URI,
254
+ isBearer: false,
255
+ isProofRequired: true,
256
+ isRecipientRequired: true,
257
+ isIssuedAtRequired: true,
258
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
259
+ } as const;