@openvtc/trust-tasks 0.28.15 → 0.28.16

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 (52) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/index.d.ts +15 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +15 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/vta/pcs/voter/read/0.1/payload.d.ts +4 -4
  7. package/dist/vta/pcs/voter/read/0.1/payload.js +1 -1
  8. package/dist/vta/pcs/voter/read/0.2/payload.d.ts +4 -4
  9. package/dist/vta/pcs/voter/read/0.2/payload.js +1 -1
  10. package/dist/vta/pcs/voter/read/0.3/payload.d.ts +4 -4
  11. package/dist/vta/pcs/voter/read/0.3/payload.js +1 -1
  12. package/dist/vta/pcs/voter/read/0.4/payload.d.ts +4 -4
  13. package/dist/vta/pcs/voter/read/0.4/payload.js +1 -1
  14. package/dist/vta/pcs/voter/read/0.5/payload.d.ts +4 -4
  15. package/dist/vta/pcs/voter/read/0.5/payload.js +1 -1
  16. package/dist/vta/pcs/voter/read/0.6/payload.d.ts +14 -2
  17. package/dist/vta/pcs/voter/read/0.6/payload.d.ts.map +1 -1
  18. package/dist/vta/pcs/voter/read/0.6/payload.js +1 -1
  19. package/dist/vta/pcs/voter/read/0.6/payload.js.map +1 -1
  20. package/dist/vta/pcs/voter/read/0.7/payload.d.ts +561 -0
  21. package/dist/vta/pcs/voter/read/0.7/payload.d.ts.map +1 -0
  22. package/dist/vta/pcs/voter/read/0.7/payload.js +315 -0
  23. package/dist/vta/pcs/voter/read/0.7/payload.js.map +1 -0
  24. package/dist/vta/pcs/voter/receipts/list/0.1/payload.d.ts +359 -0
  25. package/dist/vta/pcs/voter/receipts/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/vta/pcs/voter/receipts/list/0.1/payload.js +203 -0
  27. package/dist/vta/pcs/voter/receipts/list/0.1/payload.js.map +1 -0
  28. package/dist/vtc/boards/facilitators/add/0.1/payload.d.ts +351 -0
  29. package/dist/vtc/boards/facilitators/add/0.1/payload.d.ts.map +1 -0
  30. package/dist/vtc/boards/facilitators/add/0.1/payload.js +198 -0
  31. package/dist/vtc/boards/facilitators/add/0.1/payload.js.map +1 -0
  32. package/dist/vtc/boards/facilitators/list/0.1/payload.d.ts +448 -0
  33. package/dist/vtc/boards/facilitators/list/0.1/payload.d.ts.map +1 -0
  34. package/dist/vtc/boards/facilitators/list/0.1/payload.js +245 -0
  35. package/dist/vtc/boards/facilitators/list/0.1/payload.js.map +1 -0
  36. package/dist/vtc/boards/facilitators/remove/0.1/payload.d.ts +351 -0
  37. package/dist/vtc/boards/facilitators/remove/0.1/payload.d.ts.map +1 -0
  38. package/dist/vtc/boards/facilitators/remove/0.1/payload.js +198 -0
  39. package/dist/vtc/boards/facilitators/remove/0.1/payload.js.map +1 -0
  40. package/package.json +1 -1
  41. package/src/index.ts +15 -0
  42. package/src/vta/pcs/voter/read/0.1/payload.ts +5 -5
  43. package/src/vta/pcs/voter/read/0.2/payload.ts +5 -5
  44. package/src/vta/pcs/voter/read/0.3/payload.ts +5 -5
  45. package/src/vta/pcs/voter/read/0.4/payload.ts +5 -5
  46. package/src/vta/pcs/voter/read/0.5/payload.ts +5 -5
  47. package/src/vta/pcs/voter/read/0.6/payload.ts +15 -3
  48. package/src/vta/pcs/voter/read/0.7/payload.ts +404 -0
  49. package/src/vta/pcs/voter/receipts/list/0.1/payload.ts +255 -0
  50. package/src/vtc/boards/facilitators/add/0.1/payload.ts +246 -0
  51. package/src/vtc/boards/facilitators/list/0.1/payload.ts +306 -0
  52. package/src/vtc/boards/facilitators/remove/0.1/payload.ts +246 -0
@@ -0,0 +1,359 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/voter/receipts/list/0.1/payload.schema.json
4
+ */
5
+ import type { ElectionId, Ext } from "../../../../../../_shared/components.js";
6
+ /**
7
+ * A voter's client asks its VTA for the receipts it keeps for one election, whole and exactly as received, so that after voting closes the client can fetch each cast's inclusion proof from the ballot box and hand it, with the head the community kept at close, to vta/pcs/voter/receipt (VTI-VOT-053). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTAPCSVoterReceiptsListPayload {
10
+ /**
11
+ * The context the voter belongs to.
12
+ */
13
+ contextId: string;
14
+ /**
15
+ * The community's DID.
16
+ */
17
+ community: string;
18
+ electionId: ElectionId;
19
+ ext?: Ext;
20
+ }
21
+ /**
22
+ * The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.
23
+ */
24
+ export interface VTAPCSVoterReceiptsListResponsePayload {
25
+ electionId: ElectionId;
26
+ /**
27
+ * The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof.
28
+ */
29
+ ballotBox: string;
30
+ /**
31
+ * Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.
32
+ *
33
+ * @maxItems 64
34
+ */
35
+ receipts: {}[];
36
+ ext?: Ext;
37
+ }
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { ElectionId, Ext };
40
+ /** Trust Task type URI. */
41
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1";
42
+ /**
43
+ * The earlier version of this specification that this one declares it
44
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
45
+ * `null`. Only the direct declaration — follow the chain with
46
+ * `extendsChain` / `readForSpec`.
47
+ */
48
+ export declare const EXTENDS: string | null;
49
+ /**
50
+ * Why this version is deprecated, or `null` while it is current. A
51
+ * superseded or retired version is still supported, and is withdrawn from
52
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
53
+ * Versions").
54
+ */
55
+ export declare const DEPRECATION: string | null;
56
+ /** Stable alias for this specification's request payload shape. */
57
+ export type Payload = VTAPCSVoterReceiptsListPayload;
58
+ /** Trust Task response type URI (request type URI + "#response"). */
59
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response";
60
+ /** Stable alias for this specification's success-response payload shape. */
61
+ export type Response = VTAPCSVoterReceiptsListResponsePayload;
62
+ /**
63
+ * This specification's payload schema, as a value.
64
+ *
65
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
66
+ * rather than only as a `.json` file because TypeScript types are erased
67
+ * at runtime: without a schema a consumer has nothing to validate, and
68
+ * every REQUIRED payload member is optional in practice. Cross-file
69
+ * `$ref`s are already inlined, so it needs no resolver.
70
+ */
71
+ export declare const PAYLOAD_SCHEMA: {
72
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
73
+ readonly $id: "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1";
74
+ readonly title: "VTA PCS — Voter Receipts — List — payload";
75
+ readonly description: "A voter's client asks its VTA for the receipts it keeps for one election, whole and exactly as received, so that after voting closes the client can fetch each cast's inclusion proof from the ballot box and hand it, with the head the community kept at close, to vta/pcs/voter/receipt (VTI-VOT-053). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
76
+ readonly type: "object";
77
+ readonly additionalProperties: false;
78
+ readonly required: readonly ["contextId", "community", "electionId"];
79
+ readonly properties: {
80
+ readonly contextId: {
81
+ readonly type: "string";
82
+ readonly minLength: 1;
83
+ readonly maxLength: 256;
84
+ readonly description: "The context the voter belongs to.";
85
+ };
86
+ readonly community: {
87
+ readonly type: "string";
88
+ readonly minLength: 1;
89
+ readonly maxLength: 2048;
90
+ readonly description: "The community's DID.";
91
+ };
92
+ readonly electionId: {
93
+ readonly $ref: "#/$defs/ElectionId";
94
+ };
95
+ readonly ext: {
96
+ readonly $ref: "#/$defs/Ext";
97
+ };
98
+ };
99
+ readonly $defs: {
100
+ readonly Response: {
101
+ readonly $anchor: "response";
102
+ readonly title: "VTA PCS — Voter Receipts — List — response payload";
103
+ readonly description: "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.";
104
+ readonly type: "object";
105
+ readonly additionalProperties: false;
106
+ readonly required: readonly ["electionId", "ballotBox", "receipts"];
107
+ readonly properties: {
108
+ readonly electionId: {
109
+ readonly $ref: "#/$defs/ElectionId";
110
+ };
111
+ readonly ballotBox: {
112
+ readonly type: "string";
113
+ readonly minLength: 1;
114
+ readonly maxLength: 2048;
115
+ readonly pattern: "^did:";
116
+ readonly description: "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof.";
117
+ };
118
+ readonly receipts: {
119
+ readonly type: "array";
120
+ readonly maxItems: 64;
121
+ readonly description: "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.";
122
+ readonly items: {
123
+ readonly type: "object";
124
+ };
125
+ };
126
+ readonly ext: {
127
+ readonly $ref: "#/$defs/Ext";
128
+ };
129
+ };
130
+ };
131
+ readonly Ext: {
132
+ readonly title: "Ext";
133
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
134
+ readonly type: "object";
135
+ readonly minProperties: 1;
136
+ readonly additionalProperties: true;
137
+ readonly propertyNames: {
138
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
139
+ };
140
+ };
141
+ readonly ElectionId: {
142
+ readonly title: "ElectionId";
143
+ readonly description: "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.";
144
+ readonly type: "string";
145
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
146
+ };
147
+ };
148
+ };
149
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
150
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
151
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
152
+ readonly $ref: "#/$defs/Response";
153
+ readonly $defs: {
154
+ readonly Response: {
155
+ readonly $anchor: "response";
156
+ readonly title: "VTA PCS — Voter Receipts — List — response payload";
157
+ readonly description: "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.";
158
+ readonly type: "object";
159
+ readonly additionalProperties: false;
160
+ readonly required: readonly ["electionId", "ballotBox", "receipts"];
161
+ readonly properties: {
162
+ readonly electionId: {
163
+ readonly $ref: "#/$defs/ElectionId";
164
+ };
165
+ readonly ballotBox: {
166
+ readonly type: "string";
167
+ readonly minLength: 1;
168
+ readonly maxLength: 2048;
169
+ readonly pattern: "^did:";
170
+ readonly description: "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof.";
171
+ };
172
+ readonly receipts: {
173
+ readonly type: "array";
174
+ readonly maxItems: 64;
175
+ readonly description: "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.";
176
+ readonly items: {
177
+ readonly type: "object";
178
+ };
179
+ };
180
+ readonly ext: {
181
+ readonly $ref: "#/$defs/Ext";
182
+ };
183
+ };
184
+ };
185
+ readonly Ext: {
186
+ readonly title: "Ext";
187
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
188
+ readonly type: "object";
189
+ readonly minProperties: 1;
190
+ readonly additionalProperties: true;
191
+ readonly propertyNames: {
192
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
193
+ };
194
+ };
195
+ readonly ElectionId: {
196
+ readonly title: "ElectionId";
197
+ readonly description: "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.";
198
+ readonly type: "string";
199
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
200
+ };
201
+ };
202
+ };
203
+ /**
204
+ * SPEC.md §7.2 policy for the request variant, from this specification's
205
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
206
+ * per-specification and cannot be derived from the document alone, and
207
+ * item 2 needs the schema this carries.
208
+ */
209
+ export declare const SPEC: {
210
+ readonly typeUri: "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1";
211
+ readonly isBearer: false;
212
+ readonly isProofRequired: true;
213
+ readonly isRecipientRequired: true;
214
+ readonly isIssuedAtRequired: false;
215
+ readonly payloadSchema: {
216
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
217
+ readonly $id: "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1";
218
+ readonly title: "VTA PCS — Voter Receipts — List — payload";
219
+ readonly description: "A voter's client asks its VTA for the receipts it keeps for one election, whole and exactly as received, so that after voting closes the client can fetch each cast's inclusion proof from the ballot box and hand it, with the head the community kept at close, to vta/pcs/voter/receipt (VTI-VOT-053). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
220
+ readonly type: "object";
221
+ readonly additionalProperties: false;
222
+ readonly required: readonly ["contextId", "community", "electionId"];
223
+ readonly properties: {
224
+ readonly contextId: {
225
+ readonly type: "string";
226
+ readonly minLength: 1;
227
+ readonly maxLength: 256;
228
+ readonly description: "The context the voter belongs to.";
229
+ };
230
+ readonly community: {
231
+ readonly type: "string";
232
+ readonly minLength: 1;
233
+ readonly maxLength: 2048;
234
+ readonly description: "The community's DID.";
235
+ };
236
+ readonly electionId: {
237
+ readonly $ref: "#/$defs/ElectionId";
238
+ };
239
+ readonly ext: {
240
+ readonly $ref: "#/$defs/Ext";
241
+ };
242
+ };
243
+ readonly $defs: {
244
+ readonly Response: {
245
+ readonly $anchor: "response";
246
+ readonly title: "VTA PCS — Voter Receipts — List — response payload";
247
+ readonly description: "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.";
248
+ readonly type: "object";
249
+ readonly additionalProperties: false;
250
+ readonly required: readonly ["electionId", "ballotBox", "receipts"];
251
+ readonly properties: {
252
+ readonly electionId: {
253
+ readonly $ref: "#/$defs/ElectionId";
254
+ };
255
+ readonly ballotBox: {
256
+ readonly type: "string";
257
+ readonly minLength: 1;
258
+ readonly maxLength: 2048;
259
+ readonly pattern: "^did:";
260
+ readonly description: "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof.";
261
+ };
262
+ readonly receipts: {
263
+ readonly type: "array";
264
+ readonly maxItems: 64;
265
+ readonly description: "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.";
266
+ readonly items: {
267
+ readonly type: "object";
268
+ };
269
+ };
270
+ readonly ext: {
271
+ readonly $ref: "#/$defs/Ext";
272
+ };
273
+ };
274
+ };
275
+ readonly Ext: {
276
+ readonly title: "Ext";
277
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
278
+ readonly type: "object";
279
+ readonly minProperties: 1;
280
+ readonly additionalProperties: true;
281
+ readonly propertyNames: {
282
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
283
+ };
284
+ };
285
+ readonly ElectionId: {
286
+ readonly title: "ElectionId";
287
+ readonly description: "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.";
288
+ readonly type: "string";
289
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
290
+ };
291
+ };
292
+ };
293
+ };
294
+ /**
295
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
296
+ * tracks the *issuer* party's requirement because a response swaps the
297
+ * parties (§7.3 item 5).
298
+ */
299
+ export declare const RESPONSE_SPEC: {
300
+ readonly typeUri: "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response";
301
+ readonly isBearer: false;
302
+ readonly isProofRequired: false;
303
+ readonly isRecipientRequired: true;
304
+ readonly isIssuedAtRequired: false;
305
+ readonly payloadSchema: {
306
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
307
+ readonly $ref: "#/$defs/Response";
308
+ readonly $defs: {
309
+ readonly Response: {
310
+ readonly $anchor: "response";
311
+ readonly title: "VTA PCS — Voter Receipts — List — response payload";
312
+ readonly description: "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.";
313
+ readonly type: "object";
314
+ readonly additionalProperties: false;
315
+ readonly required: readonly ["electionId", "ballotBox", "receipts"];
316
+ readonly properties: {
317
+ readonly electionId: {
318
+ readonly $ref: "#/$defs/ElectionId";
319
+ };
320
+ readonly ballotBox: {
321
+ readonly type: "string";
322
+ readonly minLength: 1;
323
+ readonly maxLength: 2048;
324
+ readonly pattern: "^did:";
325
+ readonly description: "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof.";
326
+ };
327
+ readonly receipts: {
328
+ readonly type: "array";
329
+ readonly maxItems: 64;
330
+ readonly description: "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.";
331
+ readonly items: {
332
+ readonly type: "object";
333
+ };
334
+ };
335
+ readonly ext: {
336
+ readonly $ref: "#/$defs/Ext";
337
+ };
338
+ };
339
+ };
340
+ readonly Ext: {
341
+ readonly title: "Ext";
342
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
343
+ readonly type: "object";
344
+ readonly minProperties: 1;
345
+ readonly additionalProperties: true;
346
+ readonly propertyNames: {
347
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
348
+ };
349
+ };
350
+ readonly ElectionId: {
351
+ readonly title: "ElectionId";
352
+ readonly description: "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.";
353
+ readonly type: "string";
354
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
355
+ };
356
+ };
357
+ };
358
+ };
359
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../../src/vta/pcs/voter/receipts/list/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,yCAAyC,CAAC;AAG/E;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EA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;;CAOhB,CAAC"}
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/voter/receipts/list/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1";
7
+ /**
8
+ * The earlier version of this specification that this one declares it
9
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
10
+ * `null`. Only the direct declaration — follow the chain with
11
+ * `extendsChain` / `readForSpec`.
12
+ */
13
+ export const EXTENDS = null;
14
+ /**
15
+ * Why this version is deprecated, or `null` while it is current. A
16
+ * superseded or retired version is still supported, and is withdrawn from
17
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
18
+ * Versions").
19
+ */
20
+ export const DEPRECATION = null;
21
+ /** Trust Task response type URI (request type URI + "#response"). */
22
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response";
23
+ /**
24
+ * This specification's payload schema, as a value.
25
+ *
26
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
27
+ * rather than only as a `.json` file because TypeScript types are erased
28
+ * at runtime: without a schema a consumer has nothing to validate, and
29
+ * every REQUIRED payload member is optional in practice. Cross-file
30
+ * `$ref`s are already inlined, so it needs no resolver.
31
+ */
32
+ export const PAYLOAD_SCHEMA = {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "$id": "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1",
35
+ "title": "VTA PCS — Voter Receipts — List — payload",
36
+ "description": "A voter's client asks its VTA for the receipts it keeps for one election, whole and exactly as received, so that after voting closes the client can fetch each cast's inclusion proof from the ballot box and hand it, with the head the community kept at close, to vta/pcs/voter/receipt (VTI-VOT-053). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": [
40
+ "contextId",
41
+ "community",
42
+ "electionId"
43
+ ],
44
+ "properties": {
45
+ "contextId": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "maxLength": 256,
49
+ "description": "The context the voter belongs to."
50
+ },
51
+ "community": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "maxLength": 2048,
55
+ "description": "The community's DID."
56
+ },
57
+ "electionId": {
58
+ "$ref": "#/$defs/ElectionId"
59
+ },
60
+ "ext": {
61
+ "$ref": "#/$defs/Ext"
62
+ }
63
+ },
64
+ "$defs": {
65
+ "Response": {
66
+ "$anchor": "response",
67
+ "title": "VTA PCS — Voter Receipts — List — response payload",
68
+ "description": "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.",
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": [
72
+ "electionId",
73
+ "ballotBox",
74
+ "receipts"
75
+ ],
76
+ "properties": {
77
+ "electionId": {
78
+ "$ref": "#/$defs/ElectionId"
79
+ },
80
+ "ballotBox": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 2048,
84
+ "pattern": "^did:",
85
+ "description": "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof."
86
+ },
87
+ "receipts": {
88
+ "type": "array",
89
+ "maxItems": 64,
90
+ "description": "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.",
91
+ "items": {
92
+ "type": "object"
93
+ }
94
+ },
95
+ "ext": {
96
+ "$ref": "#/$defs/Ext"
97
+ }
98
+ }
99
+ },
100
+ "Ext": {
101
+ "title": "Ext",
102
+ "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.",
103
+ "type": "object",
104
+ "minProperties": 1,
105
+ "additionalProperties": true,
106
+ "propertyNames": {
107
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
108
+ }
109
+ },
110
+ "ElectionId": {
111
+ "title": "ElectionId",
112
+ "description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
113
+ "type": "string",
114
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
115
+ }
116
+ }
117
+ };
118
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
119
+ export const RESPONSE_PAYLOAD_SCHEMA = {
120
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
121
+ "$ref": "#/$defs/Response",
122
+ "$defs": {
123
+ "Response": {
124
+ "$anchor": "response",
125
+ "title": "VTA PCS — Voter Receipts — List — response payload",
126
+ "description": "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.",
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": [
130
+ "electionId",
131
+ "ballotBox",
132
+ "receipts"
133
+ ],
134
+ "properties": {
135
+ "electionId": {
136
+ "$ref": "#/$defs/ElectionId"
137
+ },
138
+ "ballotBox": {
139
+ "type": "string",
140
+ "minLength": 1,
141
+ "maxLength": 2048,
142
+ "pattern": "^did:",
143
+ "description": "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof."
144
+ },
145
+ "receipts": {
146
+ "type": "array",
147
+ "maxItems": 64,
148
+ "description": "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.",
149
+ "items": {
150
+ "type": "object"
151
+ }
152
+ },
153
+ "ext": {
154
+ "$ref": "#/$defs/Ext"
155
+ }
156
+ }
157
+ },
158
+ "Ext": {
159
+ "title": "Ext",
160
+ "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.",
161
+ "type": "object",
162
+ "minProperties": 1,
163
+ "additionalProperties": true,
164
+ "propertyNames": {
165
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
166
+ }
167
+ },
168
+ "ElectionId": {
169
+ "title": "ElectionId",
170
+ "description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
171
+ "type": "string",
172
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
173
+ }
174
+ }
175
+ };
176
+ /**
177
+ * SPEC.md §7.2 policy for the request variant, from this specification's
178
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
179
+ * per-specification and cannot be derived from the document alone, and
180
+ * item 2 needs the schema this carries.
181
+ */
182
+ export const SPEC = {
183
+ typeUri: TYPE_URI,
184
+ isBearer: false,
185
+ isProofRequired: true,
186
+ isRecipientRequired: true,
187
+ isIssuedAtRequired: false,
188
+ payloadSchema: PAYLOAD_SCHEMA,
189
+ };
190
+ /**
191
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
192
+ * tracks the *issuer* party's requirement because a response swaps the
193
+ * parties (§7.3 item 5).
194
+ */
195
+ export const RESPONSE_SPEC = {
196
+ typeUri: RESPONSE_TYPE_URI,
197
+ isBearer: false,
198
+ isProofRequired: false,
199
+ isRecipientRequired: true,
200
+ isIssuedAtRequired: false,
201
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
202
+ };
203
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../../src/vta/pc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