@openvtc/trust-tasks 0.16.4 → 0.16.6
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 +20 -0
- package/dist/_shared/components.d.ts +4 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +8 -8
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +12 -4
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +8 -8
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +12 -4
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +8 -8
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +12 -4
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +8 -8
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +12 -4
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/credentials/list/0.1/payload.d.ts +630 -0
- package/dist/vta/credentials/list/0.1/payload.d.ts.map +1 -0
- package/dist/vta/credentials/list/0.1/payload.js +322 -0
- package/dist/vta/credentials/list/0.1/payload.js.map +1 -0
- package/dist/vtc/members/credentials/0.1/payload.d.ts +379 -0
- package/dist/vtc/members/credentials/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/credentials/0.1/payload.js +195 -0
- package/dist/vtc/members/credentials/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +12 -4
- package/src/device/list/0.1/payload.ts +12 -4
- package/src/device/list/0.2/payload.ts +12 -4
- package/src/device/register/0.1/payload.ts +12 -4
- package/src/device/register/0.2/payload.ts +12 -4
- package/src/index.ts +2 -0
- package/src/vta/credentials/list/0.1/payload.ts +420 -0
- package/src/vtc/members/credentials/0.1/payload.ts +259 -0
|
@@ -241,9 +241,13 @@ export const PAYLOAD_SCHEMA = {
|
|
|
241
241
|
"policy-admin",
|
|
242
242
|
"device-admin",
|
|
243
243
|
"sign",
|
|
244
|
-
"key-mint"
|
|
244
|
+
"key-mint",
|
|
245
|
+
"sign-trust-task",
|
|
246
|
+
"credential-write",
|
|
247
|
+
"memory-read",
|
|
248
|
+
"memory-write"
|
|
245
249
|
],
|
|
246
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
250
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
247
251
|
},
|
|
248
252
|
"KeyCustody": {
|
|
249
253
|
"title": "KeyCustody",
|
|
@@ -573,9 +577,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
573
577
|
"policy-admin",
|
|
574
578
|
"device-admin",
|
|
575
579
|
"sign",
|
|
576
|
-
"key-mint"
|
|
580
|
+
"key-mint",
|
|
581
|
+
"sign-trust-task",
|
|
582
|
+
"credential-write",
|
|
583
|
+
"memory-read",
|
|
584
|
+
"memory-write"
|
|
577
585
|
],
|
|
578
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
586
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
579
587
|
},
|
|
580
588
|
"KeyCustody": {
|
|
581
589
|
"title": "KeyCustody",
|
|
@@ -241,9 +241,13 @@ export const PAYLOAD_SCHEMA = {
|
|
|
241
241
|
"policyAdmin",
|
|
242
242
|
"deviceAdmin",
|
|
243
243
|
"sign",
|
|
244
|
-
"keyMint"
|
|
244
|
+
"keyMint",
|
|
245
|
+
"signTrustTask",
|
|
246
|
+
"credentialWrite",
|
|
247
|
+
"memoryRead",
|
|
248
|
+
"memoryWrite"
|
|
245
249
|
],
|
|
246
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
250
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
247
251
|
},
|
|
248
252
|
"KeyCustody": {
|
|
249
253
|
"title": "KeyCustody",
|
|
@@ -573,9 +577,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
573
577
|
"policyAdmin",
|
|
574
578
|
"deviceAdmin",
|
|
575
579
|
"sign",
|
|
576
|
-
"keyMint"
|
|
580
|
+
"keyMint",
|
|
581
|
+
"signTrustTask",
|
|
582
|
+
"credentialWrite",
|
|
583
|
+
"memoryRead",
|
|
584
|
+
"memoryWrite"
|
|
577
585
|
],
|
|
578
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
586
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
579
587
|
},
|
|
580
588
|
"KeyCustody": {
|
|
581
589
|
"title": "KeyCustody",
|
|
@@ -209,9 +209,13 @@ export const PAYLOAD_SCHEMA = {
|
|
|
209
209
|
"policy-admin",
|
|
210
210
|
"device-admin",
|
|
211
211
|
"sign",
|
|
212
|
-
"key-mint"
|
|
212
|
+
"key-mint",
|
|
213
|
+
"sign-trust-task",
|
|
214
|
+
"credential-write",
|
|
215
|
+
"memory-read",
|
|
216
|
+
"memory-write"
|
|
213
217
|
],
|
|
214
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
218
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
215
219
|
},
|
|
216
220
|
"KeyCustody": {
|
|
217
221
|
"title": "KeyCustody",
|
|
@@ -531,9 +535,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
531
535
|
"policy-admin",
|
|
532
536
|
"device-admin",
|
|
533
537
|
"sign",
|
|
534
|
-
"key-mint"
|
|
538
|
+
"key-mint",
|
|
539
|
+
"sign-trust-task",
|
|
540
|
+
"credential-write",
|
|
541
|
+
"memory-read",
|
|
542
|
+
"memory-write"
|
|
535
543
|
],
|
|
536
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
544
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
537
545
|
},
|
|
538
546
|
"KeyCustody": {
|
|
539
547
|
"title": "KeyCustody",
|
|
@@ -209,9 +209,13 @@ export const PAYLOAD_SCHEMA = {
|
|
|
209
209
|
"policyAdmin",
|
|
210
210
|
"deviceAdmin",
|
|
211
211
|
"sign",
|
|
212
|
-
"keyMint"
|
|
212
|
+
"keyMint",
|
|
213
|
+
"signTrustTask",
|
|
214
|
+
"credentialWrite",
|
|
215
|
+
"memoryRead",
|
|
216
|
+
"memoryWrite"
|
|
213
217
|
],
|
|
214
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
218
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
215
219
|
},
|
|
216
220
|
"KeyCustody": {
|
|
217
221
|
"title": "KeyCustody",
|
|
@@ -531,9 +535,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
531
535
|
"policyAdmin",
|
|
532
536
|
"deviceAdmin",
|
|
533
537
|
"sign",
|
|
534
|
-
"keyMint"
|
|
538
|
+
"keyMint",
|
|
539
|
+
"signTrustTask",
|
|
540
|
+
"credentialWrite",
|
|
541
|
+
"memoryRead",
|
|
542
|
+
"memoryWrite"
|
|
535
543
|
],
|
|
536
|
-
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
|
|
544
|
+
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
537
545
|
},
|
|
538
546
|
"KeyCustody": {
|
|
539
547
|
"title": "KeyCustody",
|
package/src/index.ts
CHANGED
|
@@ -292,6 +292,7 @@ export * as VtaContextsUpdateDid_v1_0 from "./vta/contexts/update-did/1.0/payloa
|
|
|
292
292
|
export * as VtaContextsUpdate_v1_0 from "./vta/contexts/update/1.0/payload.js";
|
|
293
293
|
export * as VtaCredentialsIssue_v0_1 from "./vta/credentials/issue/0.1/payload.js";
|
|
294
294
|
export * as VtaCredentialsIssue_v0_2 from "./vta/credentials/issue/0.2/payload.js";
|
|
295
|
+
export * as VtaCredentialsList_v0_1 from "./vta/credentials/list/0.1/payload.js";
|
|
295
296
|
export * as VtaCredentialsRevoke_v0_1 from "./vta/credentials/revoke/0.1/payload.js";
|
|
296
297
|
export * as VtaDidTemplatesCreate_v1_0 from "./vta/did-templates/create/1.0/payload.js";
|
|
297
298
|
export * as VtaDidTemplatesCreate_v2_0 from "./vta/did-templates/create/2.0/payload.js";
|
|
@@ -391,6 +392,7 @@ export * as VtcJoinRequestsSubmitReceipt_v0_1 from "./vtc/join-requests/submit-r
|
|
|
391
392
|
export * as VtcJoinRequestsSubmit_v0_1 from "./vtc/join-requests/submit/0.1/payload.js";
|
|
392
393
|
export * as VtcJoinRequestsSubmit_v0_2 from "./vtc/join-requests/submit/0.2/payload.js";
|
|
393
394
|
export * as VtcMembersAdminRemove_v0_1 from "./vtc/members/admin-remove/0.1/payload.js";
|
|
395
|
+
export * as VtcMembersCredentials_v0_1 from "./vtc/members/credentials/0.1/payload.js";
|
|
394
396
|
export * as VtcMembersList_v0_1 from "./vtc/members/list/0.1/payload.js";
|
|
395
397
|
export * as VtcMembersPersonhoodAssert_v0_1 from "./vtc/members/personhood/assert/0.1/payload.js";
|
|
396
398
|
export * as VtcMembersPersonhoodChallenge_v0_1 from "./vtc/members/personhood/challenge/0.1/payload.js";
|
|
@@ -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;
|