@openvtc/trust-tasks 0.25.1 → 0.25.2

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 (115) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/_shared/components.d.ts +304 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +14 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +14 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/vetting/_shared/0.1/hidden-vetting.d.ts +16 -0
  25. package/dist/vetting/_shared/0.1/hidden-vetting.d.ts.map +1 -0
  26. package/dist/vetting/_shared/0.1/hidden-vetting.js +6 -0
  27. package/dist/vetting/_shared/0.1/hidden-vetting.js.map +1 -0
  28. package/dist/vetting/attestation/0.1/payload.d.ts +94 -146
  29. package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -1
  30. package/dist/vetting/attestation/0.1/payload.js +43 -43
  31. package/dist/vetting/attestation/0.1/payload.js.map +1 -1
  32. package/dist/vta/_shared/0.4/pcs-engine.d.ts +16 -0
  33. package/dist/vta/_shared/0.4/pcs-engine.d.ts.map +1 -0
  34. package/dist/vta/_shared/0.4/pcs-engine.js +6 -0
  35. package/dist/vta/_shared/0.4/pcs-engine.js.map +1 -0
  36. package/dist/vta/pcs/applications/create/0.1/payload.d.ts +1215 -0
  37. package/dist/vta/pcs/applications/create/0.1/payload.d.ts.map +1 -0
  38. package/dist/vta/pcs/applications/create/0.1/payload.js +724 -0
  39. package/dist/vta/pcs/applications/create/0.1/payload.js.map +1 -0
  40. package/dist/vta/pcs/applications/delete/0.1/payload.d.ts +253 -0
  41. package/dist/vta/pcs/applications/delete/0.1/payload.d.ts.map +1 -0
  42. package/dist/vta/pcs/applications/delete/0.1/payload.js +146 -0
  43. package/dist/vta/pcs/applications/delete/0.1/payload.js.map +1 -0
  44. package/dist/vta/pcs/applications/show/0.1/payload.d.ts +733 -0
  45. package/dist/vta/pcs/applications/show/0.1/payload.d.ts.map +1 -0
  46. package/dist/vta/pcs/applications/show/0.1/payload.js +450 -0
  47. package/dist/vta/pcs/applications/show/0.1/payload.js.map +1 -0
  48. package/dist/vta/pcs/attest/0.1/payload.d.ts +1456 -0
  49. package/dist/vta/pcs/attest/0.1/payload.d.ts.map +1 -0
  50. package/dist/vta/pcs/attest/0.1/payload.js +876 -0
  51. package/dist/vta/pcs/attest/0.1/payload.js.map +1 -0
  52. package/dist/vta/pcs/prove/0.1/payload.d.ts +1348 -0
  53. package/dist/vta/pcs/prove/0.1/payload.d.ts.map +1 -0
  54. package/dist/vta/pcs/prove/0.1/payload.js +804 -0
  55. package/dist/vta/pcs/prove/0.1/payload.js.map +1 -0
  56. package/dist/vta/pcs/root-accept/0.1/payload.d.ts +1100 -0
  57. package/dist/vta/pcs/root-accept/0.1/payload.d.ts.map +1 -0
  58. package/dist/vta/pcs/root-accept/0.1/payload.js +634 -0
  59. package/dist/vta/pcs/root-accept/0.1/payload.js.map +1 -0
  60. package/dist/vta/pcs/root-request/0.1/payload.d.ts +880 -0
  61. package/dist/vta/pcs/root-request/0.1/payload.d.ts.map +1 -0
  62. package/dist/vta/pcs/root-request/0.1/payload.js +496 -0
  63. package/dist/vta/pcs/root-request/0.1/payload.js.map +1 -0
  64. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts +612 -0
  65. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts.map +1 -0
  66. package/dist/vta/pcs/tokens/abandon/0.1/payload.js +355 -0
  67. package/dist/vta/pcs/tokens/abandon/0.1/payload.js.map +1 -0
  68. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts +1149 -0
  69. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts.map +1 -0
  70. package/dist/vta/pcs/tokens/accept/0.1/payload.js +657 -0
  71. package/dist/vta/pcs/tokens/accept/0.1/payload.js.map +1 -0
  72. package/dist/vta/pcs/tokens/request/0.1/payload.d.ts +908 -0
  73. package/dist/vta/pcs/tokens/request/0.1/payload.d.ts.map +1 -0
  74. package/dist/vta/pcs/tokens/request/0.1/payload.js +508 -0
  75. package/dist/vta/pcs/tokens/request/0.1/payload.js.map +1 -0
  76. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts +1423 -0
  77. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts.map +1 -0
  78. package/dist/vta/pcs/verify-attestation/0.1/payload.js +850 -0
  79. package/dist/vta/pcs/verify-attestation/0.1/payload.js.map +1 -0
  80. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts +605 -0
  81. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts.map +1 -0
  82. package/dist/vta/pcs/vetter/show/0.1/payload.js +351 -0
  83. package/dist/vta/pcs/vetter/show/0.1/payload.js.map +1 -0
  84. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts +403 -486
  85. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts.map +1 -1
  86. package/dist/vtc/vetting/hidden/publish/0.1/payload.js +240 -240
  87. package/dist/vtc/vetting/hidden/publish/0.1/payload.js.map +1 -1
  88. package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts +482 -565
  89. package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts.map +1 -1
  90. package/dist/vtc/vetting/hidden/show/0.1/payload.js +294 -294
  91. package/dist/vtc/vetting/hidden/show/0.1/payload.js.map +1 -1
  92. package/package.json +1 -1
  93. package/src/_shared/components.ts +308 -2
  94. package/src/device/list/0.1/payload.ts +6 -2
  95. package/src/device/list/0.2/payload.ts +6 -2
  96. package/src/device/register/0.1/payload.ts +6 -2
  97. package/src/device/register/0.2/payload.ts +6 -2
  98. package/src/index.ts +14 -0
  99. package/src/vetting/_shared/0.1/hidden-vetting.ts +17 -0
  100. package/src/vetting/attestation/0.1/payload.ts +49 -101
  101. package/src/vta/_shared/0.4/pcs-engine.ts +17 -0
  102. package/src/vta/pcs/applications/create/0.1/payload.ts +768 -0
  103. package/src/vta/pcs/applications/delete/0.1/payload.ts +182 -0
  104. package/src/vta/pcs/applications/show/0.1/payload.ts +482 -0
  105. package/src/vta/pcs/attest/0.1/payload.ts +943 -0
  106. package/src/vta/pcs/prove/0.1/payload.ts +845 -0
  107. package/src/vta/pcs/root-accept/0.1/payload.ts +681 -0
  108. package/src/vta/pcs/root-request/0.1/payload.ts +559 -0
  109. package/src/vta/pcs/tokens/abandon/0.1/payload.ts +392 -0
  110. package/src/vta/pcs/tokens/accept/0.1/payload.ts +713 -0
  111. package/src/vta/pcs/tokens/request/0.1/payload.ts +581 -0
  112. package/src/vta/pcs/verify-attestation/0.1/payload.ts +888 -0
  113. package/src/vta/pcs/vetter/show/0.1/payload.ts +387 -0
  114. package/src/vtc/vetting/hidden/publish/0.1/payload.ts +247 -331
  115. package/src/vtc/vetting/hidden/show/0.1/payload.ts +295 -379
@@ -0,0 +1,182 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/applications/delete/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A client tells its VTA to forget a hidden-vetting application: its PCS key and every attestation it holds are destroyed.
11
+ */
12
+ export interface VTAPCSApplicationsDeletePayload {
13
+ /**
14
+ * The handle vta/pcs/applications/create returned.
15
+ */
16
+ applicationId: string;
17
+ ext?: Ext;
18
+ }
19
+ export interface VTAPCSApplicationsDeleteResponsePayload {
20
+ applicationId: string;
21
+ /**
22
+ * Always true: a refusal is a trust-task-error, not a false here.
23
+ */
24
+ deleted: true;
25
+ ext?: Ext;
26
+ }
27
+
28
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
29
+ export type { Ext };
30
+
31
+ /** Trust Task type URI. */
32
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/applications/delete/0.1" as const;
33
+
34
+ /** Stable alias for this specification's request payload shape. */
35
+ export type Payload = VTAPCSApplicationsDeletePayload;
36
+
37
+ /** Trust Task response type URI (request type URI + "#response"). */
38
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/applications/delete/0.1#response" as const;
39
+
40
+ /** Stable alias for this specification's success-response payload shape. */
41
+ export type Response = VTAPCSApplicationsDeleteResponsePayload;
42
+
43
+ /**
44
+ * This specification's payload schema, as a value.
45
+ *
46
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
47
+ * rather than only as a `.json` file because TypeScript types are erased
48
+ * at runtime: without a schema a consumer has nothing to validate, and
49
+ * every REQUIRED payload member is optional in practice. Cross-file
50
+ * `$ref`s are already inlined, so it needs no resolver.
51
+ */
52
+ export const PAYLOAD_SCHEMA = {
53
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
54
+ "$id": "https://trusttasks.org/spec/vta/pcs/applications/delete/0.1",
55
+ "title": "VTA PCS — Applications — Delete — payload",
56
+ "description": "A client tells its VTA to forget a hidden-vetting application: its PCS key and every attestation it holds are destroyed.",
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": [
60
+ "applicationId"
61
+ ],
62
+ "properties": {
63
+ "applicationId": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "maxLength": 128,
67
+ "description": "The handle vta/pcs/applications/create returned."
68
+ },
69
+ "ext": {
70
+ "$ref": "#/$defs/Ext"
71
+ }
72
+ },
73
+ "$defs": {
74
+ "Response": {
75
+ "$anchor": "response",
76
+ "title": "VTA PCS — Applications — Delete — response payload",
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": [
80
+ "applicationId",
81
+ "deleted"
82
+ ],
83
+ "properties": {
84
+ "applicationId": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "maxLength": 128
88
+ },
89
+ "deleted": {
90
+ "type": "boolean",
91
+ "const": true,
92
+ "description": "Always true: a refusal is a trust-task-error, not a false here."
93
+ },
94
+ "ext": {
95
+ "$ref": "#/$defs/Ext"
96
+ }
97
+ }
98
+ },
99
+ "Ext": {
100
+ "title": "Ext",
101
+ "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.",
102
+ "type": "object",
103
+ "minProperties": 1,
104
+ "additionalProperties": true,
105
+ "propertyNames": {
106
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
107
+ }
108
+ }
109
+ }
110
+ } as const;
111
+
112
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
113
+ export const RESPONSE_PAYLOAD_SCHEMA = {
114
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
115
+ "$ref": "#/$defs/Response",
116
+ "$defs": {
117
+ "Response": {
118
+ "$anchor": "response",
119
+ "title": "VTA PCS — Applications — Delete — response payload",
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": [
123
+ "applicationId",
124
+ "deleted"
125
+ ],
126
+ "properties": {
127
+ "applicationId": {
128
+ "type": "string",
129
+ "minLength": 1,
130
+ "maxLength": 128
131
+ },
132
+ "deleted": {
133
+ "type": "boolean",
134
+ "const": true,
135
+ "description": "Always true: a refusal is a trust-task-error, not a false here."
136
+ },
137
+ "ext": {
138
+ "$ref": "#/$defs/Ext"
139
+ }
140
+ }
141
+ },
142
+ "Ext": {
143
+ "title": "Ext",
144
+ "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.",
145
+ "type": "object",
146
+ "minProperties": 1,
147
+ "additionalProperties": true,
148
+ "propertyNames": {
149
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
150
+ }
151
+ }
152
+ }
153
+ } as const;
154
+
155
+ /**
156
+ * SPEC.md §7.2 policy for the request variant, from this specification's
157
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
158
+ * per-specification and cannot be derived from the document alone, and
159
+ * item 2 needs the schema this carries.
160
+ */
161
+ export const SPEC = {
162
+ typeUri: TYPE_URI,
163
+ isBearer: false,
164
+ isProofRequired: true,
165
+ isRecipientRequired: true,
166
+ isIssuedAtRequired: true,
167
+ payloadSchema: PAYLOAD_SCHEMA,
168
+ } as const;
169
+
170
+ /**
171
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
172
+ * tracks the *issuer* party's requirement because a response swaps the
173
+ * parties (§7.3 item 5).
174
+ */
175
+ export const RESPONSE_SPEC = {
176
+ typeUri: RESPONSE_TYPE_URI,
177
+ isBearer: false,
178
+ isProofRequired: false,
179
+ isRecipientRequired: true,
180
+ isIssuedAtRequired: true,
181
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
182
+ } as const;
@@ -0,0 +1,482 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/applications/show/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { ApplicationSummary, Ext, Multibase, StatementMeta } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A client reads one of its hidden-vetting applications back from its VTA: its PCS identifier and the metadata of the attestations it holds, never its key.
11
+ */
12
+ export interface VTAPCSApplicationsShowPayload {
13
+ /**
14
+ * The handle vta/pcs/applications/create returned.
15
+ */
16
+ applicationId: string;
17
+ ext?: Ext;
18
+ }
19
+ export interface VTAPCSApplicationsShowResponsePayload {
20
+ application: ApplicationSummary;
21
+ ext?: Ext;
22
+ }
23
+
24
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
25
+ export type { ApplicationSummary, Ext, Multibase, StatementMeta };
26
+
27
+ /** Trust Task type URI. */
28
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/applications/show/0.1" as const;
29
+
30
+ /** Stable alias for this specification's request payload shape. */
31
+ export type Payload = VTAPCSApplicationsShowPayload;
32
+
33
+ /** Trust Task response type URI (request type URI + "#response"). */
34
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/applications/show/0.1#response" as const;
35
+
36
+ /** Stable alias for this specification's success-response payload shape. */
37
+ export type Response = VTAPCSApplicationsShowResponsePayload;
38
+
39
+ /**
40
+ * This specification's payload schema, as a value.
41
+ *
42
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
43
+ * rather than only as a `.json` file because TypeScript types are erased
44
+ * at runtime: without a schema a consumer has nothing to validate, and
45
+ * every REQUIRED payload member is optional in practice. Cross-file
46
+ * `$ref`s are already inlined, so it needs no resolver.
47
+ */
48
+ export const PAYLOAD_SCHEMA = {
49
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
50
+ "$id": "https://trusttasks.org/spec/vta/pcs/applications/show/0.1",
51
+ "title": "VTA PCS — Applications — Show — payload",
52
+ "description": "A client reads one of its hidden-vetting applications back from its VTA: its PCS identifier and the metadata of the attestations it holds, never its key.",
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "applicationId"
57
+ ],
58
+ "properties": {
59
+ "applicationId": {
60
+ "type": "string",
61
+ "minLength": 1,
62
+ "maxLength": 128,
63
+ "description": "The handle vta/pcs/applications/create returned."
64
+ },
65
+ "ext": {
66
+ "$ref": "#/$defs/Ext"
67
+ }
68
+ },
69
+ "$defs": {
70
+ "Response": {
71
+ "$anchor": "response",
72
+ "title": "VTA PCS — Applications — Show — response payload",
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "application"
77
+ ],
78
+ "properties": {
79
+ "application": {
80
+ "$ref": "#/$defs/ApplicationSummary"
81
+ },
82
+ "ext": {
83
+ "$ref": "#/$defs/Ext"
84
+ }
85
+ }
86
+ },
87
+ "Ext": {
88
+ "title": "Ext",
89
+ "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.",
90
+ "type": "object",
91
+ "minProperties": 1,
92
+ "additionalProperties": true,
93
+ "propertyNames": {
94
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
95
+ }
96
+ },
97
+ "ApplicationSummary": {
98
+ "title": "ApplicationSummary",
99
+ "description": "An applicant engine as the VTA holds it, without its key.",
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": [
103
+ "applicationId",
104
+ "contextId",
105
+ "community",
106
+ "joinDid",
107
+ "suite",
108
+ "id",
109
+ "attestations",
110
+ "createdAt"
111
+ ],
112
+ "properties": {
113
+ "applicationId": {
114
+ "type": "string",
115
+ "minLength": 1,
116
+ "maxLength": 128,
117
+ "description": "The VTA's handle for this application. Opaque; never sent to the community."
118
+ },
119
+ "contextId": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "description": "The context the application's key is derived in."
123
+ },
124
+ "community": {
125
+ "type": "string",
126
+ "minLength": 1,
127
+ "description": "The community's DID."
128
+ },
129
+ "joinDid": {
130
+ "type": "string",
131
+ "minLength": 1,
132
+ "description": "The DID the application joins as."
133
+ },
134
+ "suite": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "maxLength": 64
138
+ },
139
+ "id": {
140
+ "$ref": "#/$defs/Multibase",
141
+ "description": "The applicant's PCS identifier: what a vetter attests to, carried in a vetting/request's `ext`."
142
+ },
143
+ "attestations": {
144
+ "type": "array",
145
+ "description": "The metadata of each attestation held, in the order received. Metadata names no vetter.",
146
+ "items": {
147
+ "$ref": "#/$defs/StatementMeta"
148
+ }
149
+ },
150
+ "createdAt": {
151
+ "type": "string",
152
+ "format": "date-time"
153
+ }
154
+ }
155
+ },
156
+ "Multibase": {
157
+ "title": "Multibase",
158
+ "description": "A binary value, multibase base58btc over the suite's canonical encoding.",
159
+ "type": "string",
160
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
161
+ },
162
+ "StatementMeta": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "community",
167
+ "requirementsDigest",
168
+ "method",
169
+ "claimsVerified",
170
+ "livenessConfirmed",
171
+ "declaredRelationship",
172
+ "identityCommitment",
173
+ "cardDigestMultibase",
174
+ "validFrom",
175
+ "validUntil",
176
+ "tokenLabel",
177
+ "tokenSerial"
178
+ ],
179
+ "description": "What a Vetting Statement would have said, minus its issuer.",
180
+ "properties": {
181
+ "community": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "description": "The community this attestation is for. An attestation is not portable between communities."
185
+ },
186
+ "requirementsDigest": {
187
+ "type": "string",
188
+ "minLength": 1,
189
+ "description": "The digest of the criterion's requirements as the vetter read them."
190
+ },
191
+ "method": {
192
+ "type": "string",
193
+ "enum": [
194
+ "inPerson",
195
+ "video",
196
+ "priorAcquaintance"
197
+ ],
198
+ "description": "How the vetter met the applicant."
199
+ },
200
+ "claimsVerified": {
201
+ "type": "array",
202
+ "minItems": 1,
203
+ "items": {
204
+ "type": "string",
205
+ "minLength": 1
206
+ },
207
+ "description": "The claim types the vetter checked."
208
+ },
209
+ "livenessConfirmed": {
210
+ "type": "boolean",
211
+ "description": "Whether the vetter confirmed a live person."
212
+ },
213
+ "declaredRelationship": {
214
+ "type": "string",
215
+ "enum": [
216
+ "none",
217
+ "family",
218
+ "sameEmployer",
219
+ "closeFriend",
220
+ "other"
221
+ ],
222
+ "description": "The relationship the vetter declared, which the community's independence rules count."
223
+ },
224
+ "identityCommitment": {
225
+ "type": "string",
226
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
227
+ "description": "The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them."
228
+ },
229
+ "cardDigestMultibase": {
230
+ "type": "string",
231
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
232
+ "description": "Digest of that card, as the vetter verified it."
233
+ },
234
+ "validFrom": {
235
+ "type": "string",
236
+ "format": "date",
237
+ "description": "A DATE, never a timestamp: an exact time would let a community line an attestation up with a vetter's activity, which undoes the proof without touching it."
238
+ },
239
+ "validUntil": {
240
+ "type": "string",
241
+ "format": "date",
242
+ "description": "A date, for the same reason."
243
+ },
244
+ "tokenLabel": {
245
+ "type": "string",
246
+ "minLength": 1,
247
+ "maxLength": 128,
248
+ "description": "The token label spent, repeated inside the bound facts so it cannot be swapped in transit."
249
+ },
250
+ "tokenSerial": {
251
+ "type": "string",
252
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
253
+ "description": "The token serial spent, likewise bound."
254
+ }
255
+ }
256
+ }
257
+ }
258
+ } as const;
259
+
260
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
261
+ export const RESPONSE_PAYLOAD_SCHEMA = {
262
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
263
+ "$ref": "#/$defs/Response",
264
+ "$defs": {
265
+ "Response": {
266
+ "$anchor": "response",
267
+ "title": "VTA PCS — Applications — Show — response payload",
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": [
271
+ "application"
272
+ ],
273
+ "properties": {
274
+ "application": {
275
+ "$ref": "#/$defs/ApplicationSummary"
276
+ },
277
+ "ext": {
278
+ "$ref": "#/$defs/Ext"
279
+ }
280
+ }
281
+ },
282
+ "Ext": {
283
+ "title": "Ext",
284
+ "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.",
285
+ "type": "object",
286
+ "minProperties": 1,
287
+ "additionalProperties": true,
288
+ "propertyNames": {
289
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
290
+ }
291
+ },
292
+ "ApplicationSummary": {
293
+ "title": "ApplicationSummary",
294
+ "description": "An applicant engine as the VTA holds it, without its key.",
295
+ "type": "object",
296
+ "additionalProperties": false,
297
+ "required": [
298
+ "applicationId",
299
+ "contextId",
300
+ "community",
301
+ "joinDid",
302
+ "suite",
303
+ "id",
304
+ "attestations",
305
+ "createdAt"
306
+ ],
307
+ "properties": {
308
+ "applicationId": {
309
+ "type": "string",
310
+ "minLength": 1,
311
+ "maxLength": 128,
312
+ "description": "The VTA's handle for this application. Opaque; never sent to the community."
313
+ },
314
+ "contextId": {
315
+ "type": "string",
316
+ "minLength": 1,
317
+ "description": "The context the application's key is derived in."
318
+ },
319
+ "community": {
320
+ "type": "string",
321
+ "minLength": 1,
322
+ "description": "The community's DID."
323
+ },
324
+ "joinDid": {
325
+ "type": "string",
326
+ "minLength": 1,
327
+ "description": "The DID the application joins as."
328
+ },
329
+ "suite": {
330
+ "type": "string",
331
+ "minLength": 1,
332
+ "maxLength": 64
333
+ },
334
+ "id": {
335
+ "$ref": "#/$defs/Multibase",
336
+ "description": "The applicant's PCS identifier: what a vetter attests to, carried in a vetting/request's `ext`."
337
+ },
338
+ "attestations": {
339
+ "type": "array",
340
+ "description": "The metadata of each attestation held, in the order received. Metadata names no vetter.",
341
+ "items": {
342
+ "$ref": "#/$defs/StatementMeta"
343
+ }
344
+ },
345
+ "createdAt": {
346
+ "type": "string",
347
+ "format": "date-time"
348
+ }
349
+ }
350
+ },
351
+ "Multibase": {
352
+ "title": "Multibase",
353
+ "description": "A binary value, multibase base58btc over the suite's canonical encoding.",
354
+ "type": "string",
355
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
356
+ },
357
+ "StatementMeta": {
358
+ "type": "object",
359
+ "additionalProperties": false,
360
+ "required": [
361
+ "community",
362
+ "requirementsDigest",
363
+ "method",
364
+ "claimsVerified",
365
+ "livenessConfirmed",
366
+ "declaredRelationship",
367
+ "identityCommitment",
368
+ "cardDigestMultibase",
369
+ "validFrom",
370
+ "validUntil",
371
+ "tokenLabel",
372
+ "tokenSerial"
373
+ ],
374
+ "description": "What a Vetting Statement would have said, minus its issuer.",
375
+ "properties": {
376
+ "community": {
377
+ "type": "string",
378
+ "minLength": 1,
379
+ "description": "The community this attestation is for. An attestation is not portable between communities."
380
+ },
381
+ "requirementsDigest": {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "description": "The digest of the criterion's requirements as the vetter read them."
385
+ },
386
+ "method": {
387
+ "type": "string",
388
+ "enum": [
389
+ "inPerson",
390
+ "video",
391
+ "priorAcquaintance"
392
+ ],
393
+ "description": "How the vetter met the applicant."
394
+ },
395
+ "claimsVerified": {
396
+ "type": "array",
397
+ "minItems": 1,
398
+ "items": {
399
+ "type": "string",
400
+ "minLength": 1
401
+ },
402
+ "description": "The claim types the vetter checked."
403
+ },
404
+ "livenessConfirmed": {
405
+ "type": "boolean",
406
+ "description": "Whether the vetter confirmed a live person."
407
+ },
408
+ "declaredRelationship": {
409
+ "type": "string",
410
+ "enum": [
411
+ "none",
412
+ "family",
413
+ "sameEmployer",
414
+ "closeFriend",
415
+ "other"
416
+ ],
417
+ "description": "The relationship the vetter declared, which the community's independence rules count."
418
+ },
419
+ "identityCommitment": {
420
+ "type": "string",
421
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
422
+ "description": "The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them."
423
+ },
424
+ "cardDigestMultibase": {
425
+ "type": "string",
426
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
427
+ "description": "Digest of that card, as the vetter verified it."
428
+ },
429
+ "validFrom": {
430
+ "type": "string",
431
+ "format": "date",
432
+ "description": "A DATE, never a timestamp: an exact time would let a community line an attestation up with a vetter's activity, which undoes the proof without touching it."
433
+ },
434
+ "validUntil": {
435
+ "type": "string",
436
+ "format": "date",
437
+ "description": "A date, for the same reason."
438
+ },
439
+ "tokenLabel": {
440
+ "type": "string",
441
+ "minLength": 1,
442
+ "maxLength": 128,
443
+ "description": "The token label spent, repeated inside the bound facts so it cannot be swapped in transit."
444
+ },
445
+ "tokenSerial": {
446
+ "type": "string",
447
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
448
+ "description": "The token serial spent, likewise bound."
449
+ }
450
+ }
451
+ }
452
+ }
453
+ } as const;
454
+
455
+ /**
456
+ * SPEC.md §7.2 policy for the request variant, from this specification's
457
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
458
+ * per-specification and cannot be derived from the document alone, and
459
+ * item 2 needs the schema this carries.
460
+ */
461
+ export const SPEC = {
462
+ typeUri: TYPE_URI,
463
+ isBearer: false,
464
+ isProofRequired: false,
465
+ isRecipientRequired: true,
466
+ isIssuedAtRequired: false,
467
+ payloadSchema: PAYLOAD_SCHEMA,
468
+ } as const;
469
+
470
+ /**
471
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
472
+ * tracks the *issuer* party's requirement because a response swaps the
473
+ * parties (§7.3 item 5).
474
+ */
475
+ export const RESPONSE_SPEC = {
476
+ typeUri: RESPONSE_TYPE_URI,
477
+ isBearer: false,
478
+ isProofRequired: false,
479
+ isRecipientRequired: true,
480
+ isIssuedAtRequired: false,
481
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
482
+ } as const;