@openvtc/trust-tasks 0.27.0 → 0.27.1

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 (58) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/_shared/components.d.ts +15 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/voting/_shared/0.1/voting.d.ts +1 -1
  9. package/dist/voting/_shared/0.1/voting.d.ts.map +1 -1
  10. package/dist/voting/board/read/0.1/payload.d.ts +58 -2
  11. package/dist/voting/board/read/0.1/payload.d.ts.map +1 -1
  12. package/dist/voting/board/read/0.1/payload.js +36 -0
  13. package/dist/voting/board/read/0.1/payload.js.map +1 -1
  14. package/dist/voting/trustees/authorize/0.1/payload.d.ts +617 -0
  15. package/dist/voting/trustees/authorize/0.1/payload.d.ts.map +1 -0
  16. package/dist/voting/trustees/authorize/0.1/payload.js +386 -0
  17. package/dist/voting/trustees/authorize/0.1/payload.js.map +1 -0
  18. package/dist/voting/trustees/status/0.1/payload.d.ts +106 -2
  19. package/dist/voting/trustees/status/0.1/payload.d.ts.map +1 -1
  20. package/dist/voting/trustees/status/0.1/payload.js +48 -0
  21. package/dist/voting/trustees/status/0.1/payload.js.map +1 -1
  22. package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts +1832 -0
  23. package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts.map +1 -0
  24. package/dist/vta/pcs/trustee/deal/0.2/payload.js +1077 -0
  25. package/dist/vta/pcs/trustee/deal/0.2/payload.js.map +1 -0
  26. package/dist/vta/pcs/trustee/decrypt/0.2/payload.d.ts +758 -0
  27. package/dist/vta/pcs/trustee/decrypt/0.2/payload.d.ts.map +1 -0
  28. package/dist/vta/pcs/trustee/decrypt/0.2/payload.js +423 -0
  29. package/dist/vta/pcs/trustee/decrypt/0.2/payload.js.map +1 -0
  30. package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts +1867 -0
  31. package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts.map +1 -0
  32. package/dist/vta/pcs/trustee/justify/0.2/payload.js +1095 -0
  33. package/dist/vta/pcs/trustee/justify/0.2/payload.js.map +1 -0
  34. package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts +1912 -0
  35. package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts.map +1 -0
  36. package/dist/vta/pcs/trustee/keys/0.2/payload.js +1115 -0
  37. package/dist/vta/pcs/trustee/keys/0.2/payload.js.map +1 -0
  38. package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts +2228 -0
  39. package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts.map +1 -0
  40. package/dist/vta/pcs/vote-encrypted/0.2/payload.js +1300 -0
  41. package/dist/vta/pcs/vote-encrypted/0.2/payload.js.map +1 -0
  42. package/dist/vtc/elections/show/0.1/payload.d.ts +86 -2
  43. package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -1
  44. package/dist/vtc/elections/show/0.1/payload.js +40 -0
  45. package/dist/vtc/elections/show/0.1/payload.js.map +1 -1
  46. package/package.json +1 -1
  47. package/src/_shared/components.ts +16 -1
  48. package/src/index.ts +6 -0
  49. package/src/voting/_shared/0.1/voting.ts +1 -1
  50. package/src/voting/board/read/0.1/payload.ts +38 -2
  51. package/src/voting/trustees/authorize/0.1/payload.ts +434 -0
  52. package/src/voting/trustees/status/0.1/payload.ts +58 -2
  53. package/src/vta/pcs/trustee/deal/0.2/payload.ts +1148 -0
  54. package/src/vta/pcs/trustee/decrypt/0.2/payload.ts +500 -0
  55. package/src/vta/pcs/trustee/justify/0.2/payload.ts +1167 -0
  56. package/src/vta/pcs/trustee/keys/0.2/payload.ts +1194 -0
  57. package/src/vta/pcs/vote-encrypted/0.2/payload.ts +1369 -0
  58. package/src/vtc/elections/show/0.1/payload.ts +46 -2
@@ -0,0 +1,758 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/trustee/decrypt/0.2/payload.schema.json
4
+ */
5
+ import type { DecryptionTarget, ElectionId, Ext, SignedRequest } from "../../../../../_shared/components.js";
6
+ /**
7
+ * The trustee's VTA makes its partial decryption of each target, with proofs, and returns the voting/trustees/decrypt request signed as the trustee.
8
+ */
9
+ export interface VTAPCSTrusteeDecryptPayload {
10
+ /**
11
+ * The VTA context the trustee's keys live in.
12
+ */
13
+ contextId: string;
14
+ /**
15
+ * The community's DID.
16
+ */
17
+ community: string;
18
+ electionId: ElectionId;
19
+ /**
20
+ * The trustee's DID: a persona this VTA holds, named in the manifest's `trustees.dids`.
21
+ */
22
+ trustee: string;
23
+ /**
24
+ * The targets voting/trustees/status lists.
25
+ *
26
+ * @minItems 1
27
+ * @maxItems 100000
28
+ */
29
+ targets: [DecryptionTarget, ...DecryptionTarget[]];
30
+ /**
31
+ * The community's voting/trustees/authorize request, as voting/trustees/status carries it.
32
+ */
33
+ authorization: SignedRequest;
34
+ ext?: Ext;
35
+ }
36
+ export interface VTAPCSTrusteeDecryptResponsePayload {
37
+ document: DecryptDocument;
38
+ ext?: Ext;
39
+ }
40
+ /**
41
+ * The voting/trustees/decrypt request, signed as the trustee.
42
+ */
43
+ export interface DecryptDocument {
44
+ id: string;
45
+ type: "https://trusttasks.org/spec/voting/trustees/decrypt/0.1";
46
+ /**
47
+ * The signer.
48
+ */
49
+ issuer: string;
50
+ /**
51
+ * The ballot box.
52
+ */
53
+ recipient: string;
54
+ issuedAt: string;
55
+ expiresAt?: string;
56
+ /**
57
+ * That task's request payload.
58
+ */
59
+ payload: {};
60
+ /**
61
+ * A Data Integrity proof by an `authentication` key of `issuer`.
62
+ */
63
+ proof: {};
64
+ }
65
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
66
+ export type { DecryptionTarget, ElectionId, Ext, SignedRequest };
67
+ /** Trust Task type URI. */
68
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/pcs/trustee/decrypt/0.2";
69
+ /** Stable alias for this specification's request payload shape. */
70
+ export type Payload = VTAPCSTrusteeDecryptPayload;
71
+ /** Trust Task response type URI (request type URI + "#response"). */
72
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/pcs/trustee/decrypt/0.2#response";
73
+ /** Stable alias for this specification's success-response payload shape. */
74
+ export type Response = VTAPCSTrusteeDecryptResponsePayload;
75
+ /**
76
+ * This specification's payload schema, as a value.
77
+ *
78
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
79
+ * rather than only as a `.json` file because TypeScript types are erased
80
+ * at runtime: without a schema a consumer has nothing to validate, and
81
+ * every REQUIRED payload member is optional in practice. Cross-file
82
+ * `$ref`s are already inlined, so it needs no resolver.
83
+ */
84
+ export declare const PAYLOAD_SCHEMA: {
85
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
86
+ readonly $id: "https://trusttasks.org/spec/vta/pcs/trustee/decrypt/0.2";
87
+ readonly title: "VTA PCS — Trustee Decrypt — payload";
88
+ readonly description: "The trustee's VTA makes its partial decryption of each target, with proofs, and returns the voting/trustees/decrypt request signed as the trustee.";
89
+ readonly type: "object";
90
+ readonly additionalProperties: false;
91
+ readonly required: readonly ["contextId", "community", "electionId", "trustee", "targets", "authorization"];
92
+ readonly properties: {
93
+ readonly contextId: {
94
+ readonly type: "string";
95
+ readonly minLength: 1;
96
+ readonly maxLength: 256;
97
+ readonly description: "The VTA context the trustee's keys live in.";
98
+ };
99
+ readonly community: {
100
+ readonly type: "string";
101
+ readonly minLength: 1;
102
+ readonly maxLength: 2048;
103
+ readonly description: "The community's DID.";
104
+ };
105
+ readonly electionId: {
106
+ readonly $ref: "#/$defs/ElectionId";
107
+ };
108
+ readonly trustee: {
109
+ readonly type: "string";
110
+ readonly minLength: 1;
111
+ readonly maxLength: 2048;
112
+ readonly description: "The trustee's DID: a persona this VTA holds, named in the manifest's `trustees.dids`.";
113
+ };
114
+ readonly targets: {
115
+ readonly type: "array";
116
+ readonly minItems: 1;
117
+ readonly maxItems: 100000;
118
+ readonly items: {
119
+ readonly $ref: "#/$defs/DecryptionTarget";
120
+ };
121
+ readonly description: "The targets voting/trustees/status lists.";
122
+ };
123
+ readonly authorization: {
124
+ readonly $ref: "#/$defs/SignedRequest";
125
+ readonly description: "The community's voting/trustees/authorize request, as voting/trustees/status carries it.";
126
+ };
127
+ readonly ext: {
128
+ readonly $ref: "#/$defs/Ext";
129
+ };
130
+ };
131
+ readonly $defs: {
132
+ readonly Response: {
133
+ readonly $anchor: "response";
134
+ readonly title: "VTA PCS — Trustee Decrypt — response payload";
135
+ readonly type: "object";
136
+ readonly additionalProperties: false;
137
+ readonly required: readonly ["document"];
138
+ readonly properties: {
139
+ readonly document: {
140
+ readonly title: "DecryptDocument";
141
+ readonly description: "The voting/trustees/decrypt request, signed as the trustee.";
142
+ readonly type: "object";
143
+ readonly required: readonly ["id", "type", "issuer", "recipient", "issuedAt", "payload", "proof"];
144
+ readonly properties: {
145
+ readonly id: {
146
+ readonly type: "string";
147
+ readonly pattern: "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
148
+ };
149
+ readonly type: {
150
+ readonly const: "https://trusttasks.org/spec/voting/trustees/decrypt/0.1";
151
+ };
152
+ readonly issuer: {
153
+ readonly type: "string";
154
+ readonly minLength: 1;
155
+ readonly maxLength: 2048;
156
+ readonly description: "The signer.";
157
+ };
158
+ readonly recipient: {
159
+ readonly type: "string";
160
+ readonly minLength: 1;
161
+ readonly maxLength: 2048;
162
+ readonly description: "The ballot box.";
163
+ };
164
+ readonly issuedAt: {
165
+ readonly type: "string";
166
+ readonly format: "date-time";
167
+ };
168
+ readonly expiresAt: {
169
+ readonly type: "string";
170
+ readonly format: "date-time";
171
+ };
172
+ readonly payload: {
173
+ readonly type: "object";
174
+ readonly description: "That task's request payload.";
175
+ };
176
+ readonly proof: {
177
+ readonly type: "object";
178
+ readonly description: "A Data Integrity proof by an `authentication` key of `issuer`.";
179
+ };
180
+ };
181
+ };
182
+ readonly ext: {
183
+ readonly $ref: "#/$defs/Ext";
184
+ };
185
+ };
186
+ };
187
+ readonly Ext: {
188
+ readonly title: "Ext";
189
+ 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.";
190
+ readonly type: "object";
191
+ readonly minProperties: 1;
192
+ readonly additionalProperties: true;
193
+ readonly propertyNames: {
194
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
195
+ };
196
+ };
197
+ readonly SignedRequest: {
198
+ readonly title: "SignedRequest";
199
+ readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
200
+ readonly type: "object";
201
+ readonly minProperties: 1;
202
+ };
203
+ readonly DecryptionTarget: {
204
+ readonly title: "DecryptionTarget";
205
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
206
+ readonly type: "object";
207
+ readonly additionalProperties: false;
208
+ readonly required: readonly ["ciphertext"];
209
+ readonly properties: {
210
+ readonly leafIndex: {
211
+ readonly type: "integer";
212
+ readonly minimum: 0;
213
+ readonly description: "A sealed cast's board leaf.";
214
+ };
215
+ readonly question: {
216
+ readonly $ref: "#/$defs/Key";
217
+ };
218
+ readonly option: {
219
+ readonly $ref: "#/$defs/Key";
220
+ };
221
+ readonly ciphertext: {
222
+ readonly $ref: "#/$defs/ElGamalCiphertext";
223
+ };
224
+ };
225
+ readonly oneOf: readonly [{
226
+ readonly required: readonly ["leafIndex"];
227
+ }, {
228
+ readonly required: readonly ["question", "option"];
229
+ }];
230
+ };
231
+ readonly ElGamalCiphertext: {
232
+ readonly title: "ElGamalCiphertext";
233
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
234
+ readonly type: "object";
235
+ readonly additionalProperties: false;
236
+ readonly required: readonly ["a", "b"];
237
+ readonly properties: {
238
+ readonly a: {
239
+ readonly $ref: "#/$defs/GroupElement";
240
+ };
241
+ readonly b: {
242
+ readonly $ref: "#/$defs/GroupElement";
243
+ };
244
+ };
245
+ };
246
+ readonly GroupElement: {
247
+ readonly title: "GroupElement";
248
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
249
+ readonly type: "string";
250
+ readonly minLength: 2;
251
+ readonly maxLength: 64;
252
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
253
+ };
254
+ readonly Key: {
255
+ readonly title: "Key";
256
+ readonly description: "A question or option key, unique within its manifest or question.";
257
+ readonly type: "string";
258
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
259
+ };
260
+ readonly ElectionId: {
261
+ readonly title: "ElectionId";
262
+ 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.";
263
+ readonly type: "string";
264
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
265
+ };
266
+ };
267
+ };
268
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
269
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
270
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
271
+ readonly $ref: "#/$defs/Response";
272
+ readonly $defs: {
273
+ readonly Response: {
274
+ readonly $anchor: "response";
275
+ readonly title: "VTA PCS — Trustee Decrypt — response payload";
276
+ readonly type: "object";
277
+ readonly additionalProperties: false;
278
+ readonly required: readonly ["document"];
279
+ readonly properties: {
280
+ readonly document: {
281
+ readonly title: "DecryptDocument";
282
+ readonly description: "The voting/trustees/decrypt request, signed as the trustee.";
283
+ readonly type: "object";
284
+ readonly required: readonly ["id", "type", "issuer", "recipient", "issuedAt", "payload", "proof"];
285
+ readonly properties: {
286
+ readonly id: {
287
+ readonly type: "string";
288
+ readonly pattern: "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
289
+ };
290
+ readonly type: {
291
+ readonly const: "https://trusttasks.org/spec/voting/trustees/decrypt/0.1";
292
+ };
293
+ readonly issuer: {
294
+ readonly type: "string";
295
+ readonly minLength: 1;
296
+ readonly maxLength: 2048;
297
+ readonly description: "The signer.";
298
+ };
299
+ readonly recipient: {
300
+ readonly type: "string";
301
+ readonly minLength: 1;
302
+ readonly maxLength: 2048;
303
+ readonly description: "The ballot box.";
304
+ };
305
+ readonly issuedAt: {
306
+ readonly type: "string";
307
+ readonly format: "date-time";
308
+ };
309
+ readonly expiresAt: {
310
+ readonly type: "string";
311
+ readonly format: "date-time";
312
+ };
313
+ readonly payload: {
314
+ readonly type: "object";
315
+ readonly description: "That task's request payload.";
316
+ };
317
+ readonly proof: {
318
+ readonly type: "object";
319
+ readonly description: "A Data Integrity proof by an `authentication` key of `issuer`.";
320
+ };
321
+ };
322
+ };
323
+ readonly ext: {
324
+ readonly $ref: "#/$defs/Ext";
325
+ };
326
+ };
327
+ };
328
+ readonly Ext: {
329
+ readonly title: "Ext";
330
+ 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.";
331
+ readonly type: "object";
332
+ readonly minProperties: 1;
333
+ readonly additionalProperties: true;
334
+ readonly propertyNames: {
335
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
336
+ };
337
+ };
338
+ readonly SignedRequest: {
339
+ readonly title: "SignedRequest";
340
+ readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
341
+ readonly type: "object";
342
+ readonly minProperties: 1;
343
+ };
344
+ readonly DecryptionTarget: {
345
+ readonly title: "DecryptionTarget";
346
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
347
+ readonly type: "object";
348
+ readonly additionalProperties: false;
349
+ readonly required: readonly ["ciphertext"];
350
+ readonly properties: {
351
+ readonly leafIndex: {
352
+ readonly type: "integer";
353
+ readonly minimum: 0;
354
+ readonly description: "A sealed cast's board leaf.";
355
+ };
356
+ readonly question: {
357
+ readonly $ref: "#/$defs/Key";
358
+ };
359
+ readonly option: {
360
+ readonly $ref: "#/$defs/Key";
361
+ };
362
+ readonly ciphertext: {
363
+ readonly $ref: "#/$defs/ElGamalCiphertext";
364
+ };
365
+ };
366
+ readonly oneOf: readonly [{
367
+ readonly required: readonly ["leafIndex"];
368
+ }, {
369
+ readonly required: readonly ["question", "option"];
370
+ }];
371
+ };
372
+ readonly ElGamalCiphertext: {
373
+ readonly title: "ElGamalCiphertext";
374
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
375
+ readonly type: "object";
376
+ readonly additionalProperties: false;
377
+ readonly required: readonly ["a", "b"];
378
+ readonly properties: {
379
+ readonly a: {
380
+ readonly $ref: "#/$defs/GroupElement";
381
+ };
382
+ readonly b: {
383
+ readonly $ref: "#/$defs/GroupElement";
384
+ };
385
+ };
386
+ };
387
+ readonly GroupElement: {
388
+ readonly title: "GroupElement";
389
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
390
+ readonly type: "string";
391
+ readonly minLength: 2;
392
+ readonly maxLength: 64;
393
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
394
+ };
395
+ readonly Key: {
396
+ readonly title: "Key";
397
+ readonly description: "A question or option key, unique within its manifest or question.";
398
+ readonly type: "string";
399
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
400
+ };
401
+ readonly ElectionId: {
402
+ readonly title: "ElectionId";
403
+ 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.";
404
+ readonly type: "string";
405
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
406
+ };
407
+ };
408
+ };
409
+ /**
410
+ * SPEC.md §7.2 policy for the request variant, from this specification's
411
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
412
+ * per-specification and cannot be derived from the document alone, and
413
+ * item 2 needs the schema this carries.
414
+ */
415
+ export declare const SPEC: {
416
+ readonly typeUri: "https://trusttasks.org/spec/vta/pcs/trustee/decrypt/0.2";
417
+ readonly isBearer: false;
418
+ readonly isProofRequired: true;
419
+ readonly isRecipientRequired: true;
420
+ readonly isIssuedAtRequired: true;
421
+ readonly payloadSchema: {
422
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
423
+ readonly $id: "https://trusttasks.org/spec/vta/pcs/trustee/decrypt/0.2";
424
+ readonly title: "VTA PCS — Trustee Decrypt — payload";
425
+ readonly description: "The trustee's VTA makes its partial decryption of each target, with proofs, and returns the voting/trustees/decrypt request signed as the trustee.";
426
+ readonly type: "object";
427
+ readonly additionalProperties: false;
428
+ readonly required: readonly ["contextId", "community", "electionId", "trustee", "targets", "authorization"];
429
+ readonly properties: {
430
+ readonly contextId: {
431
+ readonly type: "string";
432
+ readonly minLength: 1;
433
+ readonly maxLength: 256;
434
+ readonly description: "The VTA context the trustee's keys live in.";
435
+ };
436
+ readonly community: {
437
+ readonly type: "string";
438
+ readonly minLength: 1;
439
+ readonly maxLength: 2048;
440
+ readonly description: "The community's DID.";
441
+ };
442
+ readonly electionId: {
443
+ readonly $ref: "#/$defs/ElectionId";
444
+ };
445
+ readonly trustee: {
446
+ readonly type: "string";
447
+ readonly minLength: 1;
448
+ readonly maxLength: 2048;
449
+ readonly description: "The trustee's DID: a persona this VTA holds, named in the manifest's `trustees.dids`.";
450
+ };
451
+ readonly targets: {
452
+ readonly type: "array";
453
+ readonly minItems: 1;
454
+ readonly maxItems: 100000;
455
+ readonly items: {
456
+ readonly $ref: "#/$defs/DecryptionTarget";
457
+ };
458
+ readonly description: "The targets voting/trustees/status lists.";
459
+ };
460
+ readonly authorization: {
461
+ readonly $ref: "#/$defs/SignedRequest";
462
+ readonly description: "The community's voting/trustees/authorize request, as voting/trustees/status carries it.";
463
+ };
464
+ readonly ext: {
465
+ readonly $ref: "#/$defs/Ext";
466
+ };
467
+ };
468
+ readonly $defs: {
469
+ readonly Response: {
470
+ readonly $anchor: "response";
471
+ readonly title: "VTA PCS — Trustee Decrypt — response payload";
472
+ readonly type: "object";
473
+ readonly additionalProperties: false;
474
+ readonly required: readonly ["document"];
475
+ readonly properties: {
476
+ readonly document: {
477
+ readonly title: "DecryptDocument";
478
+ readonly description: "The voting/trustees/decrypt request, signed as the trustee.";
479
+ readonly type: "object";
480
+ readonly required: readonly ["id", "type", "issuer", "recipient", "issuedAt", "payload", "proof"];
481
+ readonly properties: {
482
+ readonly id: {
483
+ readonly type: "string";
484
+ readonly pattern: "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
485
+ };
486
+ readonly type: {
487
+ readonly const: "https://trusttasks.org/spec/voting/trustees/decrypt/0.1";
488
+ };
489
+ readonly issuer: {
490
+ readonly type: "string";
491
+ readonly minLength: 1;
492
+ readonly maxLength: 2048;
493
+ readonly description: "The signer.";
494
+ };
495
+ readonly recipient: {
496
+ readonly type: "string";
497
+ readonly minLength: 1;
498
+ readonly maxLength: 2048;
499
+ readonly description: "The ballot box.";
500
+ };
501
+ readonly issuedAt: {
502
+ readonly type: "string";
503
+ readonly format: "date-time";
504
+ };
505
+ readonly expiresAt: {
506
+ readonly type: "string";
507
+ readonly format: "date-time";
508
+ };
509
+ readonly payload: {
510
+ readonly type: "object";
511
+ readonly description: "That task's request payload.";
512
+ };
513
+ readonly proof: {
514
+ readonly type: "object";
515
+ readonly description: "A Data Integrity proof by an `authentication` key of `issuer`.";
516
+ };
517
+ };
518
+ };
519
+ readonly ext: {
520
+ readonly $ref: "#/$defs/Ext";
521
+ };
522
+ };
523
+ };
524
+ readonly Ext: {
525
+ readonly title: "Ext";
526
+ 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.";
527
+ readonly type: "object";
528
+ readonly minProperties: 1;
529
+ readonly additionalProperties: true;
530
+ readonly propertyNames: {
531
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
532
+ };
533
+ };
534
+ readonly SignedRequest: {
535
+ readonly title: "SignedRequest";
536
+ readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
537
+ readonly type: "object";
538
+ readonly minProperties: 1;
539
+ };
540
+ readonly DecryptionTarget: {
541
+ readonly title: "DecryptionTarget";
542
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
543
+ readonly type: "object";
544
+ readonly additionalProperties: false;
545
+ readonly required: readonly ["ciphertext"];
546
+ readonly properties: {
547
+ readonly leafIndex: {
548
+ readonly type: "integer";
549
+ readonly minimum: 0;
550
+ readonly description: "A sealed cast's board leaf.";
551
+ };
552
+ readonly question: {
553
+ readonly $ref: "#/$defs/Key";
554
+ };
555
+ readonly option: {
556
+ readonly $ref: "#/$defs/Key";
557
+ };
558
+ readonly ciphertext: {
559
+ readonly $ref: "#/$defs/ElGamalCiphertext";
560
+ };
561
+ };
562
+ readonly oneOf: readonly [{
563
+ readonly required: readonly ["leafIndex"];
564
+ }, {
565
+ readonly required: readonly ["question", "option"];
566
+ }];
567
+ };
568
+ readonly ElGamalCiphertext: {
569
+ readonly title: "ElGamalCiphertext";
570
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
571
+ readonly type: "object";
572
+ readonly additionalProperties: false;
573
+ readonly required: readonly ["a", "b"];
574
+ readonly properties: {
575
+ readonly a: {
576
+ readonly $ref: "#/$defs/GroupElement";
577
+ };
578
+ readonly b: {
579
+ readonly $ref: "#/$defs/GroupElement";
580
+ };
581
+ };
582
+ };
583
+ readonly GroupElement: {
584
+ readonly title: "GroupElement";
585
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
586
+ readonly type: "string";
587
+ readonly minLength: 2;
588
+ readonly maxLength: 64;
589
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
590
+ };
591
+ readonly Key: {
592
+ readonly title: "Key";
593
+ readonly description: "A question or option key, unique within its manifest or question.";
594
+ readonly type: "string";
595
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
596
+ };
597
+ readonly ElectionId: {
598
+ readonly title: "ElectionId";
599
+ 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.";
600
+ readonly type: "string";
601
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
602
+ };
603
+ };
604
+ };
605
+ };
606
+ /**
607
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
608
+ * tracks the *issuer* party's requirement because a response swaps the
609
+ * parties (§7.3 item 5).
610
+ */
611
+ export declare const RESPONSE_SPEC: {
612
+ readonly typeUri: "https://trusttasks.org/spec/vta/pcs/trustee/decrypt/0.2#response";
613
+ readonly isBearer: false;
614
+ readonly isProofRequired: false;
615
+ readonly isRecipientRequired: true;
616
+ readonly isIssuedAtRequired: true;
617
+ readonly payloadSchema: {
618
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
619
+ readonly $ref: "#/$defs/Response";
620
+ readonly $defs: {
621
+ readonly Response: {
622
+ readonly $anchor: "response";
623
+ readonly title: "VTA PCS — Trustee Decrypt — response payload";
624
+ readonly type: "object";
625
+ readonly additionalProperties: false;
626
+ readonly required: readonly ["document"];
627
+ readonly properties: {
628
+ readonly document: {
629
+ readonly title: "DecryptDocument";
630
+ readonly description: "The voting/trustees/decrypt request, signed as the trustee.";
631
+ readonly type: "object";
632
+ readonly required: readonly ["id", "type", "issuer", "recipient", "issuedAt", "payload", "proof"];
633
+ readonly properties: {
634
+ readonly id: {
635
+ readonly type: "string";
636
+ readonly pattern: "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
637
+ };
638
+ readonly type: {
639
+ readonly const: "https://trusttasks.org/spec/voting/trustees/decrypt/0.1";
640
+ };
641
+ readonly issuer: {
642
+ readonly type: "string";
643
+ readonly minLength: 1;
644
+ readonly maxLength: 2048;
645
+ readonly description: "The signer.";
646
+ };
647
+ readonly recipient: {
648
+ readonly type: "string";
649
+ readonly minLength: 1;
650
+ readonly maxLength: 2048;
651
+ readonly description: "The ballot box.";
652
+ };
653
+ readonly issuedAt: {
654
+ readonly type: "string";
655
+ readonly format: "date-time";
656
+ };
657
+ readonly expiresAt: {
658
+ readonly type: "string";
659
+ readonly format: "date-time";
660
+ };
661
+ readonly payload: {
662
+ readonly type: "object";
663
+ readonly description: "That task's request payload.";
664
+ };
665
+ readonly proof: {
666
+ readonly type: "object";
667
+ readonly description: "A Data Integrity proof by an `authentication` key of `issuer`.";
668
+ };
669
+ };
670
+ };
671
+ readonly ext: {
672
+ readonly $ref: "#/$defs/Ext";
673
+ };
674
+ };
675
+ };
676
+ readonly Ext: {
677
+ readonly title: "Ext";
678
+ 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.";
679
+ readonly type: "object";
680
+ readonly minProperties: 1;
681
+ readonly additionalProperties: true;
682
+ readonly propertyNames: {
683
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
684
+ };
685
+ };
686
+ readonly SignedRequest: {
687
+ readonly title: "SignedRequest";
688
+ readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
689
+ readonly type: "object";
690
+ readonly minProperties: 1;
691
+ };
692
+ readonly DecryptionTarget: {
693
+ readonly title: "DecryptionTarget";
694
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
695
+ readonly type: "object";
696
+ readonly additionalProperties: false;
697
+ readonly required: readonly ["ciphertext"];
698
+ readonly properties: {
699
+ readonly leafIndex: {
700
+ readonly type: "integer";
701
+ readonly minimum: 0;
702
+ readonly description: "A sealed cast's board leaf.";
703
+ };
704
+ readonly question: {
705
+ readonly $ref: "#/$defs/Key";
706
+ };
707
+ readonly option: {
708
+ readonly $ref: "#/$defs/Key";
709
+ };
710
+ readonly ciphertext: {
711
+ readonly $ref: "#/$defs/ElGamalCiphertext";
712
+ };
713
+ };
714
+ readonly oneOf: readonly [{
715
+ readonly required: readonly ["leafIndex"];
716
+ }, {
717
+ readonly required: readonly ["question", "option"];
718
+ }];
719
+ };
720
+ readonly ElGamalCiphertext: {
721
+ readonly title: "ElGamalCiphertext";
722
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
723
+ readonly type: "object";
724
+ readonly additionalProperties: false;
725
+ readonly required: readonly ["a", "b"];
726
+ readonly properties: {
727
+ readonly a: {
728
+ readonly $ref: "#/$defs/GroupElement";
729
+ };
730
+ readonly b: {
731
+ readonly $ref: "#/$defs/GroupElement";
732
+ };
733
+ };
734
+ };
735
+ readonly GroupElement: {
736
+ readonly title: "GroupElement";
737
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
738
+ readonly type: "string";
739
+ readonly minLength: 2;
740
+ readonly maxLength: 64;
741
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
742
+ };
743
+ readonly Key: {
744
+ readonly title: "Key";
745
+ readonly description: "A question or option key, unique within its manifest or question.";
746
+ readonly type: "string";
747
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
748
+ };
749
+ readonly ElectionId: {
750
+ readonly title: "ElectionId";
751
+ 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.";
752
+ readonly type: "string";
753
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
754
+ };
755
+ };
756
+ };
757
+ };
758
+ //# sourceMappingURL=payload.d.ts.map