@openvtc/trust-tasks 0.26.10 → 0.26.12

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 (84) hide show
  1. package/CHANGELOG.md +351 -0
  2. package/dist/_shared/components.d.ts +18 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +14 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +14 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/keys/act/0.2/payload.d.ts +546 -0
  9. package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -0
  10. package/dist/rooms/keys/act/0.2/payload.js +305 -0
  11. package/dist/rooms/keys/act/0.2/payload.js.map +1 -0
  12. package/dist/rooms/keys/act/0.3/payload.d.ts +546 -0
  13. package/dist/rooms/keys/act/0.3/payload.d.ts.map +1 -0
  14. package/dist/rooms/keys/act/0.3/payload.js +305 -0
  15. package/dist/rooms/keys/act/0.3/payload.js.map +1 -0
  16. package/dist/rooms/keys/file-key/0.2/payload.d.ts +306 -0
  17. package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -0
  18. package/dist/rooms/keys/file-key/0.2/payload.js +167 -0
  19. package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -0
  20. package/dist/rooms/keys/open/0.2/payload.d.ts +323 -0
  21. package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -0
  22. package/dist/rooms/keys/open/0.2/payload.js +171 -0
  23. package/dist/rooms/keys/open/0.2/payload.js.map +1 -0
  24. package/dist/rooms/owner/group/add/0.2/payload.d.ts +417 -0
  25. package/dist/rooms/owner/group/add/0.2/payload.d.ts.map +1 -0
  26. package/dist/rooms/owner/group/add/0.2/payload.js +218 -0
  27. package/dist/rooms/owner/group/add/0.2/payload.js.map +1 -0
  28. package/dist/vta/_shared/0.6/witness-party.d.ts +16 -0
  29. package/dist/vta/_shared/0.6/witness-party.d.ts.map +1 -0
  30. package/dist/vta/_shared/0.6/witness-party.js +6 -0
  31. package/dist/vta/_shared/0.6/witness-party.js.map +1 -0
  32. package/dist/vta/witness/accept/0.2/payload.d.ts +499 -0
  33. package/dist/vta/witness/accept/0.2/payload.d.ts.map +1 -0
  34. package/dist/vta/witness/accept/0.2/payload.js +278 -0
  35. package/dist/vta/witness/accept/0.2/payload.js.map +1 -0
  36. package/dist/vta/witness/open/0.2/payload.d.ts +500 -0
  37. package/dist/vta/witness/open/0.2/payload.d.ts.map +1 -0
  38. package/dist/vta/witness/open/0.2/payload.js +259 -0
  39. package/dist/vta/witness/open/0.2/payload.js.map +1 -0
  40. package/dist/vta/witness/present/0.2/payload.d.ts +303 -0
  41. package/dist/vta/witness/present/0.2/payload.d.ts.map +1 -0
  42. package/dist/vta/witness/present/0.2/payload.js +170 -0
  43. package/dist/vta/witness/present/0.2/payload.js.map +1 -0
  44. package/dist/vtc/members/personhood/assert/0.2/payload.d.ts +536 -0
  45. package/dist/vtc/members/personhood/assert/0.2/payload.d.ts.map +1 -0
  46. package/dist/vtc/members/personhood/assert/0.2/payload.js +228 -0
  47. package/dist/vtc/members/personhood/assert/0.2/payload.js.map +1 -0
  48. package/dist/vtc/members/registry-consent/0.1/payload.d.ts +311 -0
  49. package/dist/vtc/members/registry-consent/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/members/registry-consent/0.1/payload.js +183 -0
  51. package/dist/vtc/members/registry-consent/0.1/payload.js.map +1 -0
  52. package/dist/vtc/members/update/0.1/payload.d.ts +3 -3
  53. package/dist/vtc/members/update/0.1/payload.js +1 -1
  54. package/dist/vtc/members/update/0.1/payload.js.map +1 -1
  55. package/dist/witness/_shared/0.1/outcome-evidence.d.ts +16 -0
  56. package/dist/witness/_shared/0.1/outcome-evidence.d.ts.map +1 -0
  57. package/dist/witness/_shared/0.1/outcome-evidence.js +6 -0
  58. package/dist/witness/_shared/0.1/outcome-evidence.js.map +1 -0
  59. package/dist/witness/session/0.2/payload.d.ts +274 -0
  60. package/dist/witness/session/0.2/payload.d.ts.map +1 -0
  61. package/dist/witness/session/0.2/payload.js +152 -0
  62. package/dist/witness/session/0.2/payload.js.map +1 -0
  63. package/dist/witness/session/submit/0.2/payload.d.ts +295 -0
  64. package/dist/witness/session/submit/0.2/payload.d.ts.map +1 -0
  65. package/dist/witness/session/submit/0.2/payload.js +166 -0
  66. package/dist/witness/session/submit/0.2/payload.js.map +1 -0
  67. package/package.json +1 -1
  68. package/src/_shared/components.ts +17 -0
  69. package/src/index.ts +14 -0
  70. package/src/rooms/keys/act/0.2/payload.ts +380 -0
  71. package/src/rooms/keys/act/0.3/payload.ts +380 -0
  72. package/src/rooms/keys/file-key/0.2/payload.ts +224 -0
  73. package/src/rooms/keys/open/0.2/payload.ts +237 -0
  74. package/src/rooms/owner/group/add/0.2/payload.ts +288 -0
  75. package/src/vta/_shared/0.6/witness-party.ts +17 -0
  76. package/src/vta/witness/accept/0.2/payload.ts +330 -0
  77. package/src/vta/witness/open/0.2/payload.ts +336 -0
  78. package/src/vta/witness/present/0.2/payload.ts +210 -0
  79. package/src/vtc/members/personhood/assert/0.2/payload.ts +421 -0
  80. package/src/vtc/members/registry-consent/0.1/payload.ts +231 -0
  81. package/src/vtc/members/update/0.1/payload.ts +2 -2
  82. package/src/witness/_shared/0.1/outcome-evidence.ts +17 -0
  83. package/src/witness/session/0.2/payload.ts +197 -0
  84. package/src/witness/session/submit/0.2/payload.ts +212 -0
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/witness/present/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { CarriedDocument, Ext, SessionId } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A client hands its VTA the witness's answer to the session it opened; the VTA verifies that the answer is the witness's own, builds the presentations bound to its challenge and domain, and returns the witness/session/submit document, signed as the relationship DID, for the client to send.
11
+ */
12
+ export interface VTAWitnessPresentPayload {
13
+ sessionId: SessionId;
14
+ /**
15
+ * The witness/session/0.2 #response the witness returned, exactly as received, under the witness's proof.
16
+ */
17
+ response: CarriedDocument;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * The witness/session/submit document to send.
22
+ */
23
+ export interface VTAWitnessPresentResponsePayload {
24
+ sessionId: SessionId;
25
+ /**
26
+ * The witness/session/submit/0.2 document, on the session's thread, issued and signed by relationshipDid and addressed to the witness, carrying the relationship presentation in `vp` and, under the member link, the member presentation in `memberPresentation`. For the client to send from relationshipDid unaltered.
27
+ */
28
+ document: CarriedDocument;
29
+ ext?: Ext;
30
+ }
31
+
32
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
33
+ export type { CarriedDocument, Ext, SessionId };
34
+
35
+ /** Trust Task type URI. */
36
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/witness/present/0.2" as const;
37
+
38
+ /** Stable alias for this specification's request payload shape. */
39
+ export type Payload = VTAWitnessPresentPayload;
40
+
41
+ /** Trust Task response type URI (request type URI + "#response"). */
42
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/witness/present/0.2#response" as const;
43
+
44
+ /** Stable alias for this specification's success-response payload shape. */
45
+ export type Response = VTAWitnessPresentResponsePayload;
46
+
47
+ /**
48
+ * This specification's payload schema, as a value.
49
+ *
50
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
51
+ * rather than only as a `.json` file because TypeScript types are erased
52
+ * at runtime: without a schema a consumer has nothing to validate, and
53
+ * every REQUIRED payload member is optional in practice. Cross-file
54
+ * `$ref`s are already inlined, so it needs no resolver.
55
+ */
56
+ export const PAYLOAD_SCHEMA = {
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "$id": "https://trusttasks.org/spec/vta/witness/present/0.2",
59
+ "title": "VTA Witness — Present — payload",
60
+ "description": "A client hands its VTA the witness's answer to the session it opened; the VTA verifies that the answer is the witness's own, builds the presentations bound to its challenge and domain, and returns the witness/session/submit document, signed as the relationship DID, for the client to send.",
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": [
64
+ "sessionId",
65
+ "response"
66
+ ],
67
+ "properties": {
68
+ "sessionId": {
69
+ "$ref": "#/$defs/SessionId"
70
+ },
71
+ "response": {
72
+ "$ref": "#/$defs/CarriedDocument",
73
+ "description": "The witness/session/0.2 #response the witness returned, exactly as received, under the witness's proof."
74
+ },
75
+ "ext": {
76
+ "$ref": "#/$defs/Ext"
77
+ }
78
+ },
79
+ "$defs": {
80
+ "Response": {
81
+ "$anchor": "response",
82
+ "title": "VTA Witness — Present — response payload",
83
+ "description": "The witness/session/submit document to send.",
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "sessionId",
88
+ "document"
89
+ ],
90
+ "properties": {
91
+ "sessionId": {
92
+ "$ref": "#/$defs/SessionId"
93
+ },
94
+ "document": {
95
+ "$ref": "#/$defs/CarriedDocument",
96
+ "description": "The witness/session/submit/0.2 document, on the session's thread, issued and signed by relationshipDid and addressed to the witness, carrying the relationship presentation in `vp` and, under the member link, the member presentation in `memberPresentation`. For the client to send from relationshipDid unaltered."
97
+ },
98
+ "ext": {
99
+ "$ref": "#/$defs/Ext"
100
+ }
101
+ }
102
+ },
103
+ "Ext": {
104
+ "title": "Ext",
105
+ "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.",
106
+ "type": "object",
107
+ "minProperties": 1,
108
+ "additionalProperties": true,
109
+ "propertyNames": {
110
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
111
+ }
112
+ },
113
+ "CarriedDocument": {
114
+ "title": "CarriedDocument",
115
+ "description": "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried between the VTA and the witness by the client: one the VTA built and signed for the client to send, or one the witness returned for the client to hand back. Typed as an open object so every member survives a round trip: carried exactly as built or received, never re-serialised, because its proof is over itself. Its envelope is checked by the VTA against the session record (CONVENTIONS.md §3), not by this schema.",
116
+ "type": "object",
117
+ "minProperties": 1
118
+ },
119
+ "SessionId": {
120
+ "title": "SessionId",
121
+ "description": "The id of the witness/session document the VTA built in vta/witness/open: the session's name, the thread every document of the session is on, and the value the VWC carries as taskContext. The VTA keys its state for the session by it.",
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "maxLength": 256
125
+ }
126
+ }
127
+ } as const;
128
+
129
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
130
+ export const RESPONSE_PAYLOAD_SCHEMA = {
131
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
132
+ "$ref": "#/$defs/Response",
133
+ "$defs": {
134
+ "Response": {
135
+ "$anchor": "response",
136
+ "title": "VTA Witness — Present — response payload",
137
+ "description": "The witness/session/submit document to send.",
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "sessionId",
142
+ "document"
143
+ ],
144
+ "properties": {
145
+ "sessionId": {
146
+ "$ref": "#/$defs/SessionId"
147
+ },
148
+ "document": {
149
+ "$ref": "#/$defs/CarriedDocument",
150
+ "description": "The witness/session/submit/0.2 document, on the session's thread, issued and signed by relationshipDid and addressed to the witness, carrying the relationship presentation in `vp` and, under the member link, the member presentation in `memberPresentation`. For the client to send from relationshipDid unaltered."
151
+ },
152
+ "ext": {
153
+ "$ref": "#/$defs/Ext"
154
+ }
155
+ }
156
+ },
157
+ "Ext": {
158
+ "title": "Ext",
159
+ "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.",
160
+ "type": "object",
161
+ "minProperties": 1,
162
+ "additionalProperties": true,
163
+ "propertyNames": {
164
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
165
+ }
166
+ },
167
+ "CarriedDocument": {
168
+ "title": "CarriedDocument",
169
+ "description": "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried between the VTA and the witness by the client: one the VTA built and signed for the client to send, or one the witness returned for the client to hand back. Typed as an open object so every member survives a round trip: carried exactly as built or received, never re-serialised, because its proof is over itself. Its envelope is checked by the VTA against the session record (CONVENTIONS.md §3), not by this schema.",
170
+ "type": "object",
171
+ "minProperties": 1
172
+ },
173
+ "SessionId": {
174
+ "title": "SessionId",
175
+ "description": "The id of the witness/session document the VTA built in vta/witness/open: the session's name, the thread every document of the session is on, and the value the VWC carries as taskContext. The VTA keys its state for the session by it.",
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 256
179
+ }
180
+ }
181
+ } as const;
182
+
183
+ /**
184
+ * SPEC.md §7.2 policy for the request variant, from this specification's
185
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
186
+ * per-specification and cannot be derived from the document alone, and
187
+ * item 2 needs the schema this carries.
188
+ */
189
+ export const SPEC = {
190
+ typeUri: TYPE_URI,
191
+ isBearer: false,
192
+ isProofRequired: true,
193
+ isRecipientRequired: true,
194
+ isIssuedAtRequired: true,
195
+ payloadSchema: PAYLOAD_SCHEMA,
196
+ } as const;
197
+
198
+ /**
199
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
200
+ * tracks the *issuer* party's requirement because a response swaps the
201
+ * parties (§7.3 item 5).
202
+ */
203
+ export const RESPONSE_SPEC = {
204
+ typeUri: RESPONSE_TYPE_URI,
205
+ isBearer: false,
206
+ isProofRequired: false,
207
+ isRecipientRequired: true,
208
+ isIssuedAtRequired: true,
209
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
210
+ } as const;
@@ -0,0 +1,421 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/members/personhood/assert/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { EvidenceDocument, Ext, OutcomeEvidence } from "../../../../../_shared/components.js";
7
+
8
+
9
+ export interface VTCMembersPersonhoodAssertPayload {
10
+ /**
11
+ * The member asserting personhood; MUST equal the presentation's holder.
12
+ */
13
+ did: string;
14
+ /**
15
+ * A W3C Verifiable Presentation (opaque here). Its holder MUST match did, its proof.challenge MUST be the paired challengeId, and it MUST carry at least one credential satisfying the community's active personhood policy. A Verifiable Witness Credential in it counts only with paired outcomeEvidence.
16
+ */
17
+ presentation: {};
18
+ /**
19
+ * OPTIONAL. The outcome evidence of the witnessing sessions that the Verifiable Witness Credentials in presentation cite: one entry per VWC the member wants counted, each the witness/session document the VWC's taskContext names and the witness/session/submit #response that delivered it, exactly as stored, never re-serialised. A VWC with no paired entry counts for nothing; an entry pairing with no VWC in presentation is ignored.
20
+ *
21
+ * @minItems 1
22
+ * @maxItems 16
23
+ */
24
+ outcomeEvidence?:
25
+ | [OutcomeEvidence]
26
+ | [OutcomeEvidence, OutcomeEvidence]
27
+ | [OutcomeEvidence, OutcomeEvidence, OutcomeEvidence]
28
+ | [OutcomeEvidence, OutcomeEvidence, OutcomeEvidence, OutcomeEvidence]
29
+ | [OutcomeEvidence, OutcomeEvidence, OutcomeEvidence, OutcomeEvidence, OutcomeEvidence]
30
+ | [OutcomeEvidence, OutcomeEvidence, OutcomeEvidence, OutcomeEvidence, OutcomeEvidence, OutcomeEvidence]
31
+ | [
32
+ OutcomeEvidence,
33
+ OutcomeEvidence,
34
+ OutcomeEvidence,
35
+ OutcomeEvidence,
36
+ OutcomeEvidence,
37
+ OutcomeEvidence,
38
+ OutcomeEvidence
39
+ ]
40
+ | [
41
+ OutcomeEvidence,
42
+ OutcomeEvidence,
43
+ OutcomeEvidence,
44
+ OutcomeEvidence,
45
+ OutcomeEvidence,
46
+ OutcomeEvidence,
47
+ OutcomeEvidence,
48
+ OutcomeEvidence
49
+ ]
50
+ | [
51
+ OutcomeEvidence,
52
+ OutcomeEvidence,
53
+ OutcomeEvidence,
54
+ OutcomeEvidence,
55
+ OutcomeEvidence,
56
+ OutcomeEvidence,
57
+ OutcomeEvidence,
58
+ OutcomeEvidence,
59
+ OutcomeEvidence
60
+ ]
61
+ | [
62
+ OutcomeEvidence,
63
+ OutcomeEvidence,
64
+ OutcomeEvidence,
65
+ OutcomeEvidence,
66
+ OutcomeEvidence,
67
+ OutcomeEvidence,
68
+ OutcomeEvidence,
69
+ OutcomeEvidence,
70
+ OutcomeEvidence,
71
+ OutcomeEvidence
72
+ ]
73
+ | [
74
+ OutcomeEvidence,
75
+ OutcomeEvidence,
76
+ OutcomeEvidence,
77
+ OutcomeEvidence,
78
+ OutcomeEvidence,
79
+ OutcomeEvidence,
80
+ OutcomeEvidence,
81
+ OutcomeEvidence,
82
+ OutcomeEvidence,
83
+ OutcomeEvidence,
84
+ OutcomeEvidence
85
+ ]
86
+ | [
87
+ OutcomeEvidence,
88
+ OutcomeEvidence,
89
+ OutcomeEvidence,
90
+ OutcomeEvidence,
91
+ OutcomeEvidence,
92
+ OutcomeEvidence,
93
+ OutcomeEvidence,
94
+ OutcomeEvidence,
95
+ OutcomeEvidence,
96
+ OutcomeEvidence,
97
+ OutcomeEvidence,
98
+ OutcomeEvidence
99
+ ]
100
+ | [
101
+ OutcomeEvidence,
102
+ OutcomeEvidence,
103
+ OutcomeEvidence,
104
+ OutcomeEvidence,
105
+ OutcomeEvidence,
106
+ OutcomeEvidence,
107
+ OutcomeEvidence,
108
+ OutcomeEvidence,
109
+ OutcomeEvidence,
110
+ OutcomeEvidence,
111
+ OutcomeEvidence,
112
+ OutcomeEvidence,
113
+ OutcomeEvidence
114
+ ]
115
+ | [
116
+ OutcomeEvidence,
117
+ OutcomeEvidence,
118
+ OutcomeEvidence,
119
+ OutcomeEvidence,
120
+ OutcomeEvidence,
121
+ OutcomeEvidence,
122
+ OutcomeEvidence,
123
+ OutcomeEvidence,
124
+ OutcomeEvidence,
125
+ OutcomeEvidence,
126
+ OutcomeEvidence,
127
+ OutcomeEvidence,
128
+ OutcomeEvidence,
129
+ OutcomeEvidence
130
+ ]
131
+ | [
132
+ OutcomeEvidence,
133
+ OutcomeEvidence,
134
+ OutcomeEvidence,
135
+ OutcomeEvidence,
136
+ OutcomeEvidence,
137
+ OutcomeEvidence,
138
+ OutcomeEvidence,
139
+ OutcomeEvidence,
140
+ OutcomeEvidence,
141
+ OutcomeEvidence,
142
+ OutcomeEvidence,
143
+ OutcomeEvidence,
144
+ OutcomeEvidence,
145
+ OutcomeEvidence,
146
+ OutcomeEvidence
147
+ ]
148
+ | [
149
+ OutcomeEvidence,
150
+ OutcomeEvidence,
151
+ OutcomeEvidence,
152
+ OutcomeEvidence,
153
+ OutcomeEvidence,
154
+ OutcomeEvidence,
155
+ OutcomeEvidence,
156
+ OutcomeEvidence,
157
+ OutcomeEvidence,
158
+ OutcomeEvidence,
159
+ OutcomeEvidence,
160
+ OutcomeEvidence,
161
+ OutcomeEvidence,
162
+ OutcomeEvidence,
163
+ OutcomeEvidence,
164
+ OutcomeEvidence
165
+ ];
166
+ ext?: Ext;
167
+ }
168
+ export interface VTCMembersPersonhoodAssertResponsePayload {
169
+ did: string;
170
+ /**
171
+ * Always true on success — the flag flipped or stayed asserted.
172
+ */
173
+ personhood: true;
174
+ /**
175
+ * Re-issued membership credential carrying the asserted personhood (opaque here).
176
+ */
177
+ vmc: {};
178
+ /**
179
+ * Re-issued role credential (opaque here): a Verifiable Authority Credential (`type` including `AuthorityCredential`) issued by the community with `issuerScope` `public`, whose `credentialSubject.authority` is `{ scope: <community DID>, actions: ["role:<name>"] }` — the shape vtc/vetting/vetters/grant/0.1 issues.
180
+ */
181
+ roleVac: {};
182
+ ext?: Ext;
183
+ }
184
+
185
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
186
+ export type { EvidenceDocument, Ext, OutcomeEvidence };
187
+
188
+ /** Trust Task type URI. */
189
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/personhood/assert/0.2" as const;
190
+
191
+ /** Stable alias for this specification's request payload shape. */
192
+ export type Payload = VTCMembersPersonhoodAssertPayload;
193
+
194
+ /** Trust Task response type URI (request type URI + "#response"). */
195
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/members/personhood/assert/0.2#response" as const;
196
+
197
+ /** Stable alias for this specification's success-response payload shape. */
198
+ export type Response = VTCMembersPersonhoodAssertResponsePayload;
199
+
200
+ /**
201
+ * This specification's payload schema, as a value.
202
+ *
203
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
204
+ * rather than only as a `.json` file because TypeScript types are erased
205
+ * at runtime: without a schema a consumer has nothing to validate, and
206
+ * every REQUIRED payload member is optional in practice. Cross-file
207
+ * `$ref`s are already inlined, so it needs no resolver.
208
+ */
209
+ export const PAYLOAD_SCHEMA = {
210
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
211
+ "$id": "https://trusttasks.org/spec/vtc/members/personhood/assert/0.2",
212
+ "title": "VTC Members Personhood-Assert — payload",
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "required": [
216
+ "did",
217
+ "presentation"
218
+ ],
219
+ "properties": {
220
+ "did": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "description": "The member asserting personhood; MUST equal the presentation's holder."
224
+ },
225
+ "presentation": {
226
+ "type": "object",
227
+ "description": "A W3C Verifiable Presentation (opaque here). Its holder MUST match did, its proof.challenge MUST be the paired challengeId, and it MUST carry at least one credential satisfying the community's active personhood policy. A Verifiable Witness Credential in it counts only with paired outcomeEvidence."
228
+ },
229
+ "outcomeEvidence": {
230
+ "type": "array",
231
+ "minItems": 1,
232
+ "maxItems": 16,
233
+ "items": {
234
+ "$ref": "#/$defs/OutcomeEvidence"
235
+ },
236
+ "description": "OPTIONAL. The outcome evidence of the witnessing sessions that the Verifiable Witness Credentials in presentation cite: one entry per VWC the member wants counted, each the witness/session document the VWC's taskContext names and the witness/session/submit #response that delivered it, exactly as stored, never re-serialised. A VWC with no paired entry counts for nothing; an entry pairing with no VWC in presentation is ignored."
237
+ },
238
+ "ext": {
239
+ "$ref": "#/$defs/Ext"
240
+ }
241
+ },
242
+ "$defs": {
243
+ "Response": {
244
+ "$anchor": "response",
245
+ "title": "VTC Members Personhood-Assert — response payload",
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "did",
250
+ "personhood",
251
+ "vmc",
252
+ "roleVac"
253
+ ],
254
+ "properties": {
255
+ "did": {
256
+ "type": "string",
257
+ "minLength": 1
258
+ },
259
+ "personhood": {
260
+ "type": "boolean",
261
+ "const": true,
262
+ "description": "Always true on success — the flag flipped or stayed asserted."
263
+ },
264
+ "vmc": {
265
+ "type": "object",
266
+ "description": "Re-issued membership credential carrying the asserted personhood (opaque here)."
267
+ },
268
+ "roleVac": {
269
+ "type": "object",
270
+ "description": "Re-issued role credential (opaque here): a Verifiable Authority Credential (`type` including `AuthorityCredential`) issued by the community with `issuerScope` `public`, whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }` — the shape vtc/vetting/vetters/grant/0.1 issues."
271
+ },
272
+ "ext": {
273
+ "$ref": "#/$defs/Ext"
274
+ }
275
+ }
276
+ },
277
+ "Ext": {
278
+ "title": "Ext",
279
+ "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.",
280
+ "type": "object",
281
+ "minProperties": 1,
282
+ "additionalProperties": true,
283
+ "propertyNames": {
284
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
285
+ }
286
+ },
287
+ "OutcomeEvidence": {
288
+ "title": "OutcomeEvidence",
289
+ "description": "One witnessing session's outcome evidence. `session` is the initiating witness/session document; `outcome` is the terminal witness/session/submit #response that the initiating document's own specification declares as its outcome evidence, under the witness's proof, delivering the VWC and its vwcDigestMultibase. A consumer pairs them with a presented VWC by SPEC §4.9.4's four checks and the witnessing checks of witness/session/submit (This response is the outcome evidence).",
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": [
293
+ "session",
294
+ "outcome"
295
+ ],
296
+ "properties": {
297
+ "session": {
298
+ "$ref": "#/$defs/EvidenceDocument",
299
+ "description": "The witness/session document that opened the session. The VWC's taskContext is its id and its taskDigestMultibase is computed over it (SPEC §4.9.3)."
300
+ },
301
+ "outcome": {
302
+ "$ref": "#/$defs/EvidenceDocument",
303
+ "description": "The witness/session/submit #response that closed the session, under the witness's proof. It carries the VWC and its vwcDigestMultibase."
304
+ }
305
+ }
306
+ },
307
+ "EvidenceDocument": {
308
+ "title": "EvidenceDocument",
309
+ "description": "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried exactly as it was sent or received, never re-serialised: a task digest and a proof are taken over its members, and a re-serialised copy reproduces neither reliably. Typed as an open object so every member survives; the checks that give it meaning belong to the task that reads it.",
310
+ "type": "object",
311
+ "minProperties": 1
312
+ }
313
+ }
314
+ } as const;
315
+
316
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
317
+ export const RESPONSE_PAYLOAD_SCHEMA = {
318
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
319
+ "$ref": "#/$defs/Response",
320
+ "$defs": {
321
+ "Response": {
322
+ "$anchor": "response",
323
+ "title": "VTC Members Personhood-Assert — response payload",
324
+ "type": "object",
325
+ "additionalProperties": false,
326
+ "required": [
327
+ "did",
328
+ "personhood",
329
+ "vmc",
330
+ "roleVac"
331
+ ],
332
+ "properties": {
333
+ "did": {
334
+ "type": "string",
335
+ "minLength": 1
336
+ },
337
+ "personhood": {
338
+ "type": "boolean",
339
+ "const": true,
340
+ "description": "Always true on success — the flag flipped or stayed asserted."
341
+ },
342
+ "vmc": {
343
+ "type": "object",
344
+ "description": "Re-issued membership credential carrying the asserted personhood (opaque here)."
345
+ },
346
+ "roleVac": {
347
+ "type": "object",
348
+ "description": "Re-issued role credential (opaque here): a Verifiable Authority Credential (`type` including `AuthorityCredential`) issued by the community with `issuerScope` `public`, whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }` — the shape vtc/vetting/vetters/grant/0.1 issues."
349
+ },
350
+ "ext": {
351
+ "$ref": "#/$defs/Ext"
352
+ }
353
+ }
354
+ },
355
+ "Ext": {
356
+ "title": "Ext",
357
+ "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.",
358
+ "type": "object",
359
+ "minProperties": 1,
360
+ "additionalProperties": true,
361
+ "propertyNames": {
362
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
363
+ }
364
+ },
365
+ "OutcomeEvidence": {
366
+ "title": "OutcomeEvidence",
367
+ "description": "One witnessing session's outcome evidence. `session` is the initiating witness/session document; `outcome` is the terminal witness/session/submit #response that the initiating document's own specification declares as its outcome evidence, under the witness's proof, delivering the VWC and its vwcDigestMultibase. A consumer pairs them with a presented VWC by SPEC §4.9.4's four checks and the witnessing checks of witness/session/submit (This response is the outcome evidence).",
368
+ "type": "object",
369
+ "additionalProperties": false,
370
+ "required": [
371
+ "session",
372
+ "outcome"
373
+ ],
374
+ "properties": {
375
+ "session": {
376
+ "$ref": "#/$defs/EvidenceDocument",
377
+ "description": "The witness/session document that opened the session. The VWC's taskContext is its id and its taskDigestMultibase is computed over it (SPEC §4.9.3)."
378
+ },
379
+ "outcome": {
380
+ "$ref": "#/$defs/EvidenceDocument",
381
+ "description": "The witness/session/submit #response that closed the session, under the witness's proof. It carries the VWC and its vwcDigestMultibase."
382
+ }
383
+ }
384
+ },
385
+ "EvidenceDocument": {
386
+ "title": "EvidenceDocument",
387
+ "description": "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried exactly as it was sent or received, never re-serialised: a task digest and a proof are taken over its members, and a re-serialised copy reproduces neither reliably. Typed as an open object so every member survives; the checks that give it meaning belong to the task that reads it.",
388
+ "type": "object",
389
+ "minProperties": 1
390
+ }
391
+ }
392
+ } as const;
393
+
394
+ /**
395
+ * SPEC.md §7.2 policy for the request variant, from this specification's
396
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
397
+ * per-specification and cannot be derived from the document alone, and
398
+ * item 2 needs the schema this carries.
399
+ */
400
+ export const SPEC = {
401
+ typeUri: TYPE_URI,
402
+ isBearer: false,
403
+ isProofRequired: true,
404
+ isRecipientRequired: true,
405
+ isIssuedAtRequired: true,
406
+ payloadSchema: PAYLOAD_SCHEMA,
407
+ } as const;
408
+
409
+ /**
410
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
411
+ * tracks the *issuer* party's requirement because a response swaps the
412
+ * parties (§7.3 item 5).
413
+ */
414
+ export const RESPONSE_SPEC = {
415
+ typeUri: RESPONSE_TYPE_URI,
416
+ isBearer: false,
417
+ isProofRequired: true,
418
+ isRecipientRequired: true,
419
+ isIssuedAtRequired: true,
420
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
421
+ } as const;