@openvtc/trust-tasks 0.26.25 → 0.26.27

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 (133) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/dist/_shared/components.d.ts +207 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +4 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +4 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +4 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +4 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +14 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +14 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/voting/_shared/0.1/voting.d.ts +1 -1
  25. package/dist/voting/_shared/0.1/voting.d.ts.map +1 -1
  26. package/dist/voting/ballot/cast-encrypted/0.1/payload.d.ts +1166 -0
  27. package/dist/voting/ballot/cast-encrypted/0.1/payload.d.ts.map +1 -0
  28. package/dist/voting/ballot/cast-encrypted/0.1/payload.js +690 -0
  29. package/dist/voting/ballot/cast-encrypted/0.1/payload.js.map +1 -0
  30. package/dist/voting/board/read/0.1/payload.d.ts +2555 -719
  31. package/dist/voting/board/read/0.1/payload.d.ts.map +1 -1
  32. package/dist/voting/board/read/0.1/payload.js +1517 -391
  33. package/dist/voting/board/read/0.1/payload.js.map +1 -1
  34. package/dist/voting/election/register/0.1/payload.d.ts +4 -4
  35. package/dist/voting/election/register/0.1/payload.js +2 -2
  36. package/dist/voting/election/register/0.1/payload.js.map +1 -1
  37. package/dist/voting/election/show/0.1/payload.d.ts +4 -4
  38. package/dist/voting/election/show/0.1/payload.js +2 -2
  39. package/dist/voting/election/show/0.1/payload.js.map +1 -1
  40. package/dist/voting/trustees/confirm/0.1/payload.d.ts +620 -0
  41. package/dist/voting/trustees/confirm/0.1/payload.d.ts.map +1 -0
  42. package/dist/voting/trustees/confirm/0.1/payload.js +388 -0
  43. package/dist/voting/trustees/confirm/0.1/payload.js.map +1 -0
  44. package/dist/voting/trustees/deal/0.1/payload.d.ts +1032 -0
  45. package/dist/voting/trustees/deal/0.1/payload.d.ts.map +1 -0
  46. package/dist/voting/trustees/deal/0.1/payload.js +630 -0
  47. package/dist/voting/trustees/deal/0.1/payload.js.map +1 -0
  48. package/dist/voting/trustees/decrypt/0.1/payload.d.ts +1009 -0
  49. package/dist/voting/trustees/decrypt/0.1/payload.d.ts.map +1 -0
  50. package/dist/voting/trustees/decrypt/0.1/payload.js +623 -0
  51. package/dist/voting/trustees/decrypt/0.1/payload.js.map +1 -0
  52. package/dist/voting/trustees/enrol/0.1/payload.d.ts +792 -0
  53. package/dist/voting/trustees/enrol/0.1/payload.d.ts.map +1 -0
  54. package/dist/voting/trustees/enrol/0.1/payload.js +490 -0
  55. package/dist/voting/trustees/enrol/0.1/payload.js.map +1 -0
  56. package/dist/voting/trustees/justify/0.1/payload.d.ts +642 -0
  57. package/dist/voting/trustees/justify/0.1/payload.d.ts.map +1 -0
  58. package/dist/voting/trustees/justify/0.1/payload.js +402 -0
  59. package/dist/voting/trustees/justify/0.1/payload.js.map +1 -0
  60. package/dist/voting/trustees/status/0.1/payload.d.ts +1411 -0
  61. package/dist/voting/trustees/status/0.1/payload.d.ts.map +1 -0
  62. package/dist/voting/trustees/status/0.1/payload.js +822 -0
  63. package/dist/voting/trustees/status/0.1/payload.js.map +1 -0
  64. package/dist/vta/pcs/trustee/deal/0.1/payload.d.ts +2005 -0
  65. package/dist/vta/pcs/trustee/deal/0.1/payload.d.ts.map +1 -0
  66. package/dist/vta/pcs/trustee/deal/0.1/payload.js +1176 -0
  67. package/dist/vta/pcs/trustee/deal/0.1/payload.js.map +1 -0
  68. package/dist/vta/pcs/trustee/decrypt/0.1/payload.d.ts +736 -0
  69. package/dist/vta/pcs/trustee/decrypt/0.1/payload.d.ts.map +1 -0
  70. package/dist/vta/pcs/trustee/decrypt/0.1/payload.js +412 -0
  71. package/dist/vta/pcs/trustee/decrypt/0.1/payload.js.map +1 -0
  72. package/dist/vta/pcs/trustee/enrol/0.1/payload.d.ts +1756 -0
  73. package/dist/vta/pcs/trustee/enrol/0.1/payload.d.ts.map +1 -0
  74. package/dist/vta/pcs/trustee/enrol/0.1/payload.js +1040 -0
  75. package/dist/vta/pcs/trustee/enrol/0.1/payload.js.map +1 -0
  76. package/dist/vta/pcs/trustee/justify/0.1/payload.d.ts +504 -0
  77. package/dist/vta/pcs/trustee/justify/0.1/payload.d.ts.map +1 -0
  78. package/dist/vta/pcs/trustee/justify/0.1/payload.js +274 -0
  79. package/dist/vta/pcs/trustee/justify/0.1/payload.js.map +1 -0
  80. package/dist/vta/pcs/trustee/keys/0.1/payload.d.ts +2501 -0
  81. package/dist/vta/pcs/trustee/keys/0.1/payload.d.ts.map +1 -0
  82. package/dist/vta/pcs/trustee/keys/0.1/payload.js +1455 -0
  83. package/dist/vta/pcs/trustee/keys/0.1/payload.js.map +1 -0
  84. package/dist/vta/pcs/vote/0.1/payload.d.ts +4 -4
  85. package/dist/vta/pcs/vote/0.1/payload.js +2 -2
  86. package/dist/vta/pcs/vote/0.1/payload.js.map +1 -1
  87. package/dist/vta/pcs/vote-encrypted/0.1/payload.d.ts +2375 -0
  88. package/dist/vta/pcs/vote-encrypted/0.1/payload.d.ts.map +1 -0
  89. package/dist/vta/pcs/vote-encrypted/0.1/payload.js +1389 -0
  90. package/dist/vta/pcs/vote-encrypted/0.1/payload.js.map +1 -0
  91. package/dist/vta/pcs/voter/register/0.1/payload.d.ts +4 -4
  92. package/dist/vta/pcs/voter/register/0.1/payload.js +2 -2
  93. package/dist/vta/pcs/voter/register/0.1/payload.js.map +1 -1
  94. package/dist/vtc/config/did-hosting/list/0.1/payload.d.ts +339 -0
  95. package/dist/vtc/config/did-hosting/list/0.1/payload.d.ts.map +1 -0
  96. package/dist/vtc/config/did-hosting/list/0.1/payload.js +185 -0
  97. package/dist/vtc/config/did-hosting/list/0.1/payload.js.map +1 -0
  98. package/dist/vtc/elections/create/0.1/payload.d.ts +4 -4
  99. package/dist/vtc/elections/create/0.1/payload.js +2 -2
  100. package/dist/vtc/elections/create/0.1/payload.js.map +1 -1
  101. package/dist/vtc/elections/show/0.1/payload.d.ts +242 -6
  102. package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -1
  103. package/dist/vtc/elections/show/0.1/payload.js +132 -2
  104. package/dist/vtc/elections/show/0.1/payload.js.map +1 -1
  105. package/package.json +1 -1
  106. package/src/_shared/components.ts +222 -4
  107. package/src/device/list/0.1/payload.ts +4 -2
  108. package/src/device/list/0.2/payload.ts +4 -2
  109. package/src/device/register/0.1/payload.ts +4 -2
  110. package/src/device/register/0.2/payload.ts +4 -2
  111. package/src/index.ts +14 -0
  112. package/src/voting/_shared/0.1/voting.ts +1 -1
  113. package/src/voting/ballot/cast-encrypted/0.1/payload.ts +735 -0
  114. package/src/voting/board/read/0.1/payload.ts +1519 -393
  115. package/src/voting/election/register/0.1/payload.ts +2 -2
  116. package/src/voting/election/show/0.1/payload.ts +2 -2
  117. package/src/voting/trustees/confirm/0.1/payload.ts +429 -0
  118. package/src/voting/trustees/deal/0.1/payload.ts +665 -0
  119. package/src/voting/trustees/decrypt/0.1/payload.ts +663 -0
  120. package/src/voting/trustees/enrol/0.1/payload.ts +525 -0
  121. package/src/voting/trustees/justify/0.1/payload.ts +439 -0
  122. package/src/voting/trustees/status/0.1/payload.ts +890 -0
  123. package/src/vta/pcs/trustee/deal/0.1/payload.ts +1250 -0
  124. package/src/vta/pcs/trustee/decrypt/0.1/payload.ts +489 -0
  125. package/src/vta/pcs/trustee/enrol/0.1/payload.ts +1107 -0
  126. package/src/vta/pcs/trustee/justify/0.1/payload.ts +341 -0
  127. package/src/vta/pcs/trustee/keys/0.1/payload.ts +1545 -0
  128. package/src/vta/pcs/vote/0.1/payload.ts +2 -2
  129. package/src/vta/pcs/vote-encrypted/0.1/payload.ts +1455 -0
  130. package/src/vta/pcs/voter/register/0.1/payload.ts +2 -2
  131. package/src/vtc/config/did-hosting/list/0.1/payload.ts +233 -0
  132. package/src/vtc/elections/create/0.1/payload.ts +2 -2
  133. package/src/vtc/elections/show/0.1/payload.ts +138 -4
@@ -0,0 +1,1411 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/voting/trustees/status/0.1/payload.schema.json
4
+ */
5
+ import type { Dealing, DecryptionTarget, ElectionId, ElectionKey, ElGamalCiphertext, Ext, GroupElement, GroupScalar, SealedPayload, SealedShare, SigmaProof, TransportKey, TrusteeIndex, TrusteePhase } from "../../../../_shared/components.js";
6
+ /**
7
+ * Where an election's trustee ceremony stands: transport keys, dealings, complaints, the election key, and what remains to decrypt.
8
+ */
9
+ export interface VotingTrusteesStatusPayload {
10
+ /**
11
+ * The community's DID: the registrar that registered the election.
12
+ */
13
+ community: string;
14
+ electionId: ElectionId;
15
+ ext?: Ext;
16
+ }
17
+ export interface VotingTrusteesStatusResponsePayload {
18
+ phase: TrusteePhase;
19
+ threshold: number;
20
+ /**
21
+ * @maxItems 64
22
+ */
23
+ transportKeys: TransportKey[];
24
+ /**
25
+ * @maxItems 64
26
+ */
27
+ dealings: Dealing[];
28
+ /**
29
+ * @maxItems 4096
30
+ */
31
+ complaints: {
32
+ dealer: TrusteeIndex;
33
+ recipient: TrusteeIndex;
34
+ justified: boolean;
35
+ share?: GroupScalar;
36
+ }[];
37
+ /**
38
+ * @maxItems 64
39
+ */
40
+ confirmed: TrusteeIndex[];
41
+ electionKey?: ElectionKey;
42
+ /**
43
+ * What remains to be decrypted, once voting has closed.
44
+ *
45
+ * @maxItems 100000
46
+ */
47
+ targets: DecryptionTarget[];
48
+ /**
49
+ * The trustees whose partials have been accepted.
50
+ *
51
+ * @maxItems 64
52
+ */
53
+ decrypted: TrusteeIndex[];
54
+ ext?: Ext;
55
+ }
56
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
57
+ export type { Dealing, DecryptionTarget, ElectionId, ElectionKey, ElGamalCiphertext, Ext, GroupElement, GroupScalar, SealedPayload, SealedShare, SigmaProof, TransportKey, TrusteeIndex, TrusteePhase };
58
+ /** Trust Task type URI. */
59
+ export declare const TYPE_URI: "https://trusttasks.org/spec/voting/trustees/status/0.1";
60
+ /** Stable alias for this specification's request payload shape. */
61
+ export type Payload = VotingTrusteesStatusPayload;
62
+ /** Trust Task response type URI (request type URI + "#response"). */
63
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/voting/trustees/status/0.1#response";
64
+ /** Stable alias for this specification's success-response payload shape. */
65
+ export type Response = VotingTrusteesStatusResponsePayload;
66
+ /**
67
+ * This specification's payload schema, as a value.
68
+ *
69
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
70
+ * rather than only as a `.json` file because TypeScript types are erased
71
+ * at runtime: without a schema a consumer has nothing to validate, and
72
+ * every REQUIRED payload member is optional in practice. Cross-file
73
+ * `$ref`s are already inlined, so it needs no resolver.
74
+ */
75
+ export declare const PAYLOAD_SCHEMA: {
76
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
77
+ readonly $id: "https://trusttasks.org/spec/voting/trustees/status/0.1";
78
+ readonly title: "Voting — Trustees — Status — payload";
79
+ readonly description: "Where an election's trustee ceremony stands: transport keys, dealings, complaints, the election key, and what remains to decrypt.";
80
+ readonly type: "object";
81
+ readonly additionalProperties: false;
82
+ readonly required: readonly ["community", "electionId"];
83
+ readonly properties: {
84
+ readonly community: {
85
+ readonly type: "string";
86
+ readonly minLength: 1;
87
+ readonly maxLength: 2048;
88
+ readonly description: "The community's DID: the registrar that registered the election.";
89
+ };
90
+ readonly electionId: {
91
+ readonly $ref: "#/$defs/ElectionId";
92
+ };
93
+ readonly ext: {
94
+ readonly $ref: "#/$defs/Ext";
95
+ };
96
+ };
97
+ readonly $defs: {
98
+ readonly Response: {
99
+ readonly $anchor: "response";
100
+ readonly title: "Voting — Trustees — Status — response payload";
101
+ readonly type: "object";
102
+ readonly additionalProperties: false;
103
+ readonly required: readonly ["phase", "threshold", "transportKeys", "dealings", "complaints", "confirmed", "targets", "decrypted"];
104
+ readonly properties: {
105
+ readonly phase: {
106
+ readonly $ref: "#/$defs/TrusteePhase";
107
+ };
108
+ readonly threshold: {
109
+ readonly type: "integer";
110
+ readonly minimum: 2;
111
+ readonly maximum: 64;
112
+ };
113
+ readonly transportKeys: {
114
+ readonly type: "array";
115
+ readonly maxItems: 64;
116
+ readonly items: {
117
+ readonly $ref: "#/$defs/TransportKey";
118
+ };
119
+ };
120
+ readonly dealings: {
121
+ readonly type: "array";
122
+ readonly maxItems: 64;
123
+ readonly items: {
124
+ readonly $ref: "#/$defs/Dealing";
125
+ };
126
+ };
127
+ readonly complaints: {
128
+ readonly type: "array";
129
+ readonly maxItems: 4096;
130
+ readonly items: {
131
+ readonly type: "object";
132
+ readonly additionalProperties: false;
133
+ readonly required: readonly ["dealer", "recipient", "justified"];
134
+ readonly properties: {
135
+ readonly dealer: {
136
+ readonly $ref: "#/$defs/TrusteeIndex";
137
+ };
138
+ readonly recipient: {
139
+ readonly $ref: "#/$defs/TrusteeIndex";
140
+ };
141
+ readonly justified: {
142
+ readonly type: "boolean";
143
+ };
144
+ readonly share: {
145
+ readonly $ref: "#/$defs/GroupScalar";
146
+ };
147
+ };
148
+ };
149
+ };
150
+ readonly confirmed: {
151
+ readonly type: "array";
152
+ readonly maxItems: 64;
153
+ readonly items: {
154
+ readonly $ref: "#/$defs/TrusteeIndex";
155
+ };
156
+ };
157
+ readonly electionKey: {
158
+ readonly $ref: "#/$defs/ElectionKey";
159
+ };
160
+ readonly targets: {
161
+ readonly type: "array";
162
+ readonly maxItems: 100000;
163
+ readonly items: {
164
+ readonly $ref: "#/$defs/DecryptionTarget";
165
+ };
166
+ readonly description: "What remains to be decrypted, once voting has closed.";
167
+ };
168
+ readonly decrypted: {
169
+ readonly type: "array";
170
+ readonly maxItems: 64;
171
+ readonly items: {
172
+ readonly $ref: "#/$defs/TrusteeIndex";
173
+ };
174
+ readonly description: "The trustees whose partials have been accepted.";
175
+ };
176
+ readonly ext: {
177
+ readonly $ref: "#/$defs/Ext";
178
+ };
179
+ };
180
+ };
181
+ readonly Ext: {
182
+ readonly title: "Ext";
183
+ 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.";
184
+ readonly type: "object";
185
+ readonly minProperties: 1;
186
+ readonly additionalProperties: true;
187
+ readonly propertyNames: {
188
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
189
+ };
190
+ };
191
+ readonly TrusteeIndex: {
192
+ readonly title: "TrusteeIndex";
193
+ readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
194
+ readonly type: "integer";
195
+ readonly minimum: 1;
196
+ readonly maximum: 64;
197
+ };
198
+ readonly DecryptionTarget: {
199
+ readonly title: "DecryptionTarget";
200
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
201
+ readonly type: "object";
202
+ readonly additionalProperties: false;
203
+ readonly required: readonly ["ciphertext"];
204
+ readonly properties: {
205
+ readonly leafIndex: {
206
+ readonly type: "integer";
207
+ readonly minimum: 0;
208
+ readonly description: "A sealed cast's board leaf.";
209
+ };
210
+ readonly question: {
211
+ readonly $ref: "#/$defs/Key";
212
+ };
213
+ readonly option: {
214
+ readonly $ref: "#/$defs/Key";
215
+ };
216
+ readonly ciphertext: {
217
+ readonly $ref: "#/$defs/ElGamalCiphertext";
218
+ };
219
+ };
220
+ readonly oneOf: readonly [{
221
+ readonly required: readonly ["leafIndex"];
222
+ }, {
223
+ readonly required: readonly ["question", "option"];
224
+ }];
225
+ };
226
+ readonly ElGamalCiphertext: {
227
+ readonly title: "ElGamalCiphertext";
228
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
229
+ readonly type: "object";
230
+ readonly additionalProperties: false;
231
+ readonly required: readonly ["a", "b"];
232
+ readonly properties: {
233
+ readonly a: {
234
+ readonly $ref: "#/$defs/GroupElement";
235
+ };
236
+ readonly b: {
237
+ readonly $ref: "#/$defs/GroupElement";
238
+ };
239
+ };
240
+ };
241
+ readonly GroupElement: {
242
+ readonly title: "GroupElement";
243
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
244
+ readonly type: "string";
245
+ readonly minLength: 2;
246
+ readonly maxLength: 64;
247
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
248
+ };
249
+ readonly Key: {
250
+ readonly title: "Key";
251
+ readonly description: "A question or option key, unique within its manifest or question.";
252
+ readonly type: "string";
253
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
254
+ };
255
+ readonly ElectionKey: {
256
+ readonly title: "ElectionKey";
257
+ readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
258
+ readonly type: "object";
259
+ readonly additionalProperties: false;
260
+ readonly required: readonly ["key", "qualified", "verification"];
261
+ readonly properties: {
262
+ readonly key: {
263
+ readonly $ref: "#/$defs/GroupElement";
264
+ };
265
+ readonly qualified: {
266
+ readonly type: "array";
267
+ readonly minItems: 1;
268
+ readonly maxItems: 64;
269
+ readonly items: {
270
+ readonly $ref: "#/$defs/TrusteeIndex";
271
+ };
272
+ readonly description: "The dealers whose dealings the key is formed from.";
273
+ };
274
+ readonly verification: {
275
+ readonly type: "array";
276
+ readonly minItems: 2;
277
+ readonly maxItems: 64;
278
+ readonly items: {
279
+ readonly type: "object";
280
+ readonly additionalProperties: false;
281
+ readonly required: readonly ["trustee", "key"];
282
+ readonly properties: {
283
+ readonly trustee: {
284
+ readonly $ref: "#/$defs/TrusteeIndex";
285
+ };
286
+ readonly key: {
287
+ readonly $ref: "#/$defs/GroupElement";
288
+ };
289
+ };
290
+ };
291
+ };
292
+ };
293
+ };
294
+ readonly GroupScalar: {
295
+ readonly title: "GroupScalar";
296
+ readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
297
+ readonly type: "string";
298
+ readonly minLength: 2;
299
+ readonly maxLength: 64;
300
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
301
+ };
302
+ readonly Dealing: {
303
+ readonly title: "Dealing";
304
+ readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
305
+ readonly type: "object";
306
+ readonly additionalProperties: false;
307
+ readonly required: readonly ["dealer", "commitments", "pok", "shares"];
308
+ readonly properties: {
309
+ readonly dealer: {
310
+ readonly $ref: "#/$defs/TrusteeIndex";
311
+ };
312
+ readonly commitments: {
313
+ readonly type: "array";
314
+ readonly minItems: 2;
315
+ readonly maxItems: 64;
316
+ readonly items: {
317
+ readonly $ref: "#/$defs/GroupElement";
318
+ };
319
+ };
320
+ readonly pok: {
321
+ readonly $ref: "#/$defs/SigmaProof";
322
+ };
323
+ readonly shares: {
324
+ readonly type: "array";
325
+ readonly minItems: 2;
326
+ readonly maxItems: 64;
327
+ readonly items: {
328
+ readonly $ref: "#/$defs/SealedShare";
329
+ };
330
+ };
331
+ };
332
+ };
333
+ readonly SealedShare: {
334
+ readonly title: "SealedShare";
335
+ readonly type: "object";
336
+ readonly additionalProperties: false;
337
+ readonly required: readonly ["recipient", "share"];
338
+ readonly properties: {
339
+ readonly recipient: {
340
+ readonly $ref: "#/$defs/TrusteeIndex";
341
+ };
342
+ readonly share: {
343
+ readonly $ref: "#/$defs/SealedPayload";
344
+ };
345
+ };
346
+ };
347
+ readonly SealedPayload: {
348
+ readonly title: "SealedPayload";
349
+ readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
350
+ readonly type: "object";
351
+ readonly additionalProperties: false;
352
+ readonly required: readonly ["kem", "body"];
353
+ readonly properties: {
354
+ readonly kem: {
355
+ readonly $ref: "#/$defs/ElGamalCiphertext";
356
+ };
357
+ readonly body: {
358
+ readonly type: "string";
359
+ readonly minLength: 2;
360
+ readonly maxLength: 131072;
361
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
362
+ };
363
+ };
364
+ };
365
+ readonly SigmaProof: {
366
+ readonly title: "SigmaProof";
367
+ readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
368
+ readonly type: "object";
369
+ readonly additionalProperties: false;
370
+ readonly required: readonly ["c", "z"];
371
+ readonly properties: {
372
+ readonly c: {
373
+ readonly $ref: "#/$defs/GroupScalar";
374
+ };
375
+ readonly z: {
376
+ readonly $ref: "#/$defs/GroupScalar";
377
+ };
378
+ };
379
+ };
380
+ readonly TransportKey: {
381
+ readonly title: "TransportKey";
382
+ readonly description: "The group element a trustee's shares are sealed to, with a Schnorr proof of knowledge of its discrete log (CONVENTIONS §9.6).";
383
+ readonly type: "object";
384
+ readonly additionalProperties: false;
385
+ readonly required: readonly ["trustee", "key", "pok"];
386
+ readonly properties: {
387
+ readonly trustee: {
388
+ readonly $ref: "#/$defs/TrusteeIndex";
389
+ };
390
+ readonly key: {
391
+ readonly $ref: "#/$defs/GroupElement";
392
+ };
393
+ readonly pok: {
394
+ readonly $ref: "#/$defs/SigmaProof";
395
+ };
396
+ };
397
+ };
398
+ readonly TrusteePhase: {
399
+ readonly title: "TrusteePhase";
400
+ readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
401
+ readonly type: "string";
402
+ readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
403
+ };
404
+ readonly ElectionId: {
405
+ readonly title: "ElectionId";
406
+ 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.";
407
+ readonly type: "string";
408
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
409
+ };
410
+ };
411
+ };
412
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
413
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
414
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
415
+ readonly $ref: "#/$defs/Response";
416
+ readonly $defs: {
417
+ readonly Response: {
418
+ readonly $anchor: "response";
419
+ readonly title: "Voting — Trustees — Status — response payload";
420
+ readonly type: "object";
421
+ readonly additionalProperties: false;
422
+ readonly required: readonly ["phase", "threshold", "transportKeys", "dealings", "complaints", "confirmed", "targets", "decrypted"];
423
+ readonly properties: {
424
+ readonly phase: {
425
+ readonly $ref: "#/$defs/TrusteePhase";
426
+ };
427
+ readonly threshold: {
428
+ readonly type: "integer";
429
+ readonly minimum: 2;
430
+ readonly maximum: 64;
431
+ };
432
+ readonly transportKeys: {
433
+ readonly type: "array";
434
+ readonly maxItems: 64;
435
+ readonly items: {
436
+ readonly $ref: "#/$defs/TransportKey";
437
+ };
438
+ };
439
+ readonly dealings: {
440
+ readonly type: "array";
441
+ readonly maxItems: 64;
442
+ readonly items: {
443
+ readonly $ref: "#/$defs/Dealing";
444
+ };
445
+ };
446
+ readonly complaints: {
447
+ readonly type: "array";
448
+ readonly maxItems: 4096;
449
+ readonly items: {
450
+ readonly type: "object";
451
+ readonly additionalProperties: false;
452
+ readonly required: readonly ["dealer", "recipient", "justified"];
453
+ readonly properties: {
454
+ readonly dealer: {
455
+ readonly $ref: "#/$defs/TrusteeIndex";
456
+ };
457
+ readonly recipient: {
458
+ readonly $ref: "#/$defs/TrusteeIndex";
459
+ };
460
+ readonly justified: {
461
+ readonly type: "boolean";
462
+ };
463
+ readonly share: {
464
+ readonly $ref: "#/$defs/GroupScalar";
465
+ };
466
+ };
467
+ };
468
+ };
469
+ readonly confirmed: {
470
+ readonly type: "array";
471
+ readonly maxItems: 64;
472
+ readonly items: {
473
+ readonly $ref: "#/$defs/TrusteeIndex";
474
+ };
475
+ };
476
+ readonly electionKey: {
477
+ readonly $ref: "#/$defs/ElectionKey";
478
+ };
479
+ readonly targets: {
480
+ readonly type: "array";
481
+ readonly maxItems: 100000;
482
+ readonly items: {
483
+ readonly $ref: "#/$defs/DecryptionTarget";
484
+ };
485
+ readonly description: "What remains to be decrypted, once voting has closed.";
486
+ };
487
+ readonly decrypted: {
488
+ readonly type: "array";
489
+ readonly maxItems: 64;
490
+ readonly items: {
491
+ readonly $ref: "#/$defs/TrusteeIndex";
492
+ };
493
+ readonly description: "The trustees whose partials have been accepted.";
494
+ };
495
+ readonly ext: {
496
+ readonly $ref: "#/$defs/Ext";
497
+ };
498
+ };
499
+ };
500
+ readonly Ext: {
501
+ readonly title: "Ext";
502
+ 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.";
503
+ readonly type: "object";
504
+ readonly minProperties: 1;
505
+ readonly additionalProperties: true;
506
+ readonly propertyNames: {
507
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
508
+ };
509
+ };
510
+ readonly TrusteeIndex: {
511
+ readonly title: "TrusteeIndex";
512
+ readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
513
+ readonly type: "integer";
514
+ readonly minimum: 1;
515
+ readonly maximum: 64;
516
+ };
517
+ readonly DecryptionTarget: {
518
+ readonly title: "DecryptionTarget";
519
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
520
+ readonly type: "object";
521
+ readonly additionalProperties: false;
522
+ readonly required: readonly ["ciphertext"];
523
+ readonly properties: {
524
+ readonly leafIndex: {
525
+ readonly type: "integer";
526
+ readonly minimum: 0;
527
+ readonly description: "A sealed cast's board leaf.";
528
+ };
529
+ readonly question: {
530
+ readonly $ref: "#/$defs/Key";
531
+ };
532
+ readonly option: {
533
+ readonly $ref: "#/$defs/Key";
534
+ };
535
+ readonly ciphertext: {
536
+ readonly $ref: "#/$defs/ElGamalCiphertext";
537
+ };
538
+ };
539
+ readonly oneOf: readonly [{
540
+ readonly required: readonly ["leafIndex"];
541
+ }, {
542
+ readonly required: readonly ["question", "option"];
543
+ }];
544
+ };
545
+ readonly ElGamalCiphertext: {
546
+ readonly title: "ElGamalCiphertext";
547
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
548
+ readonly type: "object";
549
+ readonly additionalProperties: false;
550
+ readonly required: readonly ["a", "b"];
551
+ readonly properties: {
552
+ readonly a: {
553
+ readonly $ref: "#/$defs/GroupElement";
554
+ };
555
+ readonly b: {
556
+ readonly $ref: "#/$defs/GroupElement";
557
+ };
558
+ };
559
+ };
560
+ readonly GroupElement: {
561
+ readonly title: "GroupElement";
562
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
563
+ readonly type: "string";
564
+ readonly minLength: 2;
565
+ readonly maxLength: 64;
566
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
567
+ };
568
+ readonly Key: {
569
+ readonly title: "Key";
570
+ readonly description: "A question or option key, unique within its manifest or question.";
571
+ readonly type: "string";
572
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
573
+ };
574
+ readonly ElectionKey: {
575
+ readonly title: "ElectionKey";
576
+ readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
577
+ readonly type: "object";
578
+ readonly additionalProperties: false;
579
+ readonly required: readonly ["key", "qualified", "verification"];
580
+ readonly properties: {
581
+ readonly key: {
582
+ readonly $ref: "#/$defs/GroupElement";
583
+ };
584
+ readonly qualified: {
585
+ readonly type: "array";
586
+ readonly minItems: 1;
587
+ readonly maxItems: 64;
588
+ readonly items: {
589
+ readonly $ref: "#/$defs/TrusteeIndex";
590
+ };
591
+ readonly description: "The dealers whose dealings the key is formed from.";
592
+ };
593
+ readonly verification: {
594
+ readonly type: "array";
595
+ readonly minItems: 2;
596
+ readonly maxItems: 64;
597
+ readonly items: {
598
+ readonly type: "object";
599
+ readonly additionalProperties: false;
600
+ readonly required: readonly ["trustee", "key"];
601
+ readonly properties: {
602
+ readonly trustee: {
603
+ readonly $ref: "#/$defs/TrusteeIndex";
604
+ };
605
+ readonly key: {
606
+ readonly $ref: "#/$defs/GroupElement";
607
+ };
608
+ };
609
+ };
610
+ };
611
+ };
612
+ };
613
+ readonly GroupScalar: {
614
+ readonly title: "GroupScalar";
615
+ readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
616
+ readonly type: "string";
617
+ readonly minLength: 2;
618
+ readonly maxLength: 64;
619
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
620
+ };
621
+ readonly Dealing: {
622
+ readonly title: "Dealing";
623
+ readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
624
+ readonly type: "object";
625
+ readonly additionalProperties: false;
626
+ readonly required: readonly ["dealer", "commitments", "pok", "shares"];
627
+ readonly properties: {
628
+ readonly dealer: {
629
+ readonly $ref: "#/$defs/TrusteeIndex";
630
+ };
631
+ readonly commitments: {
632
+ readonly type: "array";
633
+ readonly minItems: 2;
634
+ readonly maxItems: 64;
635
+ readonly items: {
636
+ readonly $ref: "#/$defs/GroupElement";
637
+ };
638
+ };
639
+ readonly pok: {
640
+ readonly $ref: "#/$defs/SigmaProof";
641
+ };
642
+ readonly shares: {
643
+ readonly type: "array";
644
+ readonly minItems: 2;
645
+ readonly maxItems: 64;
646
+ readonly items: {
647
+ readonly $ref: "#/$defs/SealedShare";
648
+ };
649
+ };
650
+ };
651
+ };
652
+ readonly SealedShare: {
653
+ readonly title: "SealedShare";
654
+ readonly type: "object";
655
+ readonly additionalProperties: false;
656
+ readonly required: readonly ["recipient", "share"];
657
+ readonly properties: {
658
+ readonly recipient: {
659
+ readonly $ref: "#/$defs/TrusteeIndex";
660
+ };
661
+ readonly share: {
662
+ readonly $ref: "#/$defs/SealedPayload";
663
+ };
664
+ };
665
+ };
666
+ readonly SealedPayload: {
667
+ readonly title: "SealedPayload";
668
+ readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
669
+ readonly type: "object";
670
+ readonly additionalProperties: false;
671
+ readonly required: readonly ["kem", "body"];
672
+ readonly properties: {
673
+ readonly kem: {
674
+ readonly $ref: "#/$defs/ElGamalCiphertext";
675
+ };
676
+ readonly body: {
677
+ readonly type: "string";
678
+ readonly minLength: 2;
679
+ readonly maxLength: 131072;
680
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
681
+ };
682
+ };
683
+ };
684
+ readonly SigmaProof: {
685
+ readonly title: "SigmaProof";
686
+ readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
687
+ readonly type: "object";
688
+ readonly additionalProperties: false;
689
+ readonly required: readonly ["c", "z"];
690
+ readonly properties: {
691
+ readonly c: {
692
+ readonly $ref: "#/$defs/GroupScalar";
693
+ };
694
+ readonly z: {
695
+ readonly $ref: "#/$defs/GroupScalar";
696
+ };
697
+ };
698
+ };
699
+ readonly TransportKey: {
700
+ readonly title: "TransportKey";
701
+ readonly description: "The group element a trustee's shares are sealed to, with a Schnorr proof of knowledge of its discrete log (CONVENTIONS §9.6).";
702
+ readonly type: "object";
703
+ readonly additionalProperties: false;
704
+ readonly required: readonly ["trustee", "key", "pok"];
705
+ readonly properties: {
706
+ readonly trustee: {
707
+ readonly $ref: "#/$defs/TrusteeIndex";
708
+ };
709
+ readonly key: {
710
+ readonly $ref: "#/$defs/GroupElement";
711
+ };
712
+ readonly pok: {
713
+ readonly $ref: "#/$defs/SigmaProof";
714
+ };
715
+ };
716
+ };
717
+ readonly TrusteePhase: {
718
+ readonly title: "TrusteePhase";
719
+ readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
720
+ readonly type: "string";
721
+ readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
722
+ };
723
+ readonly ElectionId: {
724
+ readonly title: "ElectionId";
725
+ 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.";
726
+ readonly type: "string";
727
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
728
+ };
729
+ };
730
+ };
731
+ /**
732
+ * SPEC.md §7.2 policy for the request variant, from this specification's
733
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
734
+ * per-specification and cannot be derived from the document alone, and
735
+ * item 2 needs the schema this carries.
736
+ */
737
+ export declare const SPEC: {
738
+ readonly typeUri: "https://trusttasks.org/spec/voting/trustees/status/0.1";
739
+ readonly isBearer: false;
740
+ readonly isProofRequired: false;
741
+ readonly isRecipientRequired: true;
742
+ readonly isIssuedAtRequired: true;
743
+ readonly payloadSchema: {
744
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
745
+ readonly $id: "https://trusttasks.org/spec/voting/trustees/status/0.1";
746
+ readonly title: "Voting — Trustees — Status — payload";
747
+ readonly description: "Where an election's trustee ceremony stands: transport keys, dealings, complaints, the election key, and what remains to decrypt.";
748
+ readonly type: "object";
749
+ readonly additionalProperties: false;
750
+ readonly required: readonly ["community", "electionId"];
751
+ readonly properties: {
752
+ readonly community: {
753
+ readonly type: "string";
754
+ readonly minLength: 1;
755
+ readonly maxLength: 2048;
756
+ readonly description: "The community's DID: the registrar that registered the election.";
757
+ };
758
+ readonly electionId: {
759
+ readonly $ref: "#/$defs/ElectionId";
760
+ };
761
+ readonly ext: {
762
+ readonly $ref: "#/$defs/Ext";
763
+ };
764
+ };
765
+ readonly $defs: {
766
+ readonly Response: {
767
+ readonly $anchor: "response";
768
+ readonly title: "Voting — Trustees — Status — response payload";
769
+ readonly type: "object";
770
+ readonly additionalProperties: false;
771
+ readonly required: readonly ["phase", "threshold", "transportKeys", "dealings", "complaints", "confirmed", "targets", "decrypted"];
772
+ readonly properties: {
773
+ readonly phase: {
774
+ readonly $ref: "#/$defs/TrusteePhase";
775
+ };
776
+ readonly threshold: {
777
+ readonly type: "integer";
778
+ readonly minimum: 2;
779
+ readonly maximum: 64;
780
+ };
781
+ readonly transportKeys: {
782
+ readonly type: "array";
783
+ readonly maxItems: 64;
784
+ readonly items: {
785
+ readonly $ref: "#/$defs/TransportKey";
786
+ };
787
+ };
788
+ readonly dealings: {
789
+ readonly type: "array";
790
+ readonly maxItems: 64;
791
+ readonly items: {
792
+ readonly $ref: "#/$defs/Dealing";
793
+ };
794
+ };
795
+ readonly complaints: {
796
+ readonly type: "array";
797
+ readonly maxItems: 4096;
798
+ readonly items: {
799
+ readonly type: "object";
800
+ readonly additionalProperties: false;
801
+ readonly required: readonly ["dealer", "recipient", "justified"];
802
+ readonly properties: {
803
+ readonly dealer: {
804
+ readonly $ref: "#/$defs/TrusteeIndex";
805
+ };
806
+ readonly recipient: {
807
+ readonly $ref: "#/$defs/TrusteeIndex";
808
+ };
809
+ readonly justified: {
810
+ readonly type: "boolean";
811
+ };
812
+ readonly share: {
813
+ readonly $ref: "#/$defs/GroupScalar";
814
+ };
815
+ };
816
+ };
817
+ };
818
+ readonly confirmed: {
819
+ readonly type: "array";
820
+ readonly maxItems: 64;
821
+ readonly items: {
822
+ readonly $ref: "#/$defs/TrusteeIndex";
823
+ };
824
+ };
825
+ readonly electionKey: {
826
+ readonly $ref: "#/$defs/ElectionKey";
827
+ };
828
+ readonly targets: {
829
+ readonly type: "array";
830
+ readonly maxItems: 100000;
831
+ readonly items: {
832
+ readonly $ref: "#/$defs/DecryptionTarget";
833
+ };
834
+ readonly description: "What remains to be decrypted, once voting has closed.";
835
+ };
836
+ readonly decrypted: {
837
+ readonly type: "array";
838
+ readonly maxItems: 64;
839
+ readonly items: {
840
+ readonly $ref: "#/$defs/TrusteeIndex";
841
+ };
842
+ readonly description: "The trustees whose partials have been accepted.";
843
+ };
844
+ readonly ext: {
845
+ readonly $ref: "#/$defs/Ext";
846
+ };
847
+ };
848
+ };
849
+ readonly Ext: {
850
+ readonly title: "Ext";
851
+ 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.";
852
+ readonly type: "object";
853
+ readonly minProperties: 1;
854
+ readonly additionalProperties: true;
855
+ readonly propertyNames: {
856
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
857
+ };
858
+ };
859
+ readonly TrusteeIndex: {
860
+ readonly title: "TrusteeIndex";
861
+ readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
862
+ readonly type: "integer";
863
+ readonly minimum: 1;
864
+ readonly maximum: 64;
865
+ };
866
+ readonly DecryptionTarget: {
867
+ readonly title: "DecryptionTarget";
868
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
869
+ readonly type: "object";
870
+ readonly additionalProperties: false;
871
+ readonly required: readonly ["ciphertext"];
872
+ readonly properties: {
873
+ readonly leafIndex: {
874
+ readonly type: "integer";
875
+ readonly minimum: 0;
876
+ readonly description: "A sealed cast's board leaf.";
877
+ };
878
+ readonly question: {
879
+ readonly $ref: "#/$defs/Key";
880
+ };
881
+ readonly option: {
882
+ readonly $ref: "#/$defs/Key";
883
+ };
884
+ readonly ciphertext: {
885
+ readonly $ref: "#/$defs/ElGamalCiphertext";
886
+ };
887
+ };
888
+ readonly oneOf: readonly [{
889
+ readonly required: readonly ["leafIndex"];
890
+ }, {
891
+ readonly required: readonly ["question", "option"];
892
+ }];
893
+ };
894
+ readonly ElGamalCiphertext: {
895
+ readonly title: "ElGamalCiphertext";
896
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
897
+ readonly type: "object";
898
+ readonly additionalProperties: false;
899
+ readonly required: readonly ["a", "b"];
900
+ readonly properties: {
901
+ readonly a: {
902
+ readonly $ref: "#/$defs/GroupElement";
903
+ };
904
+ readonly b: {
905
+ readonly $ref: "#/$defs/GroupElement";
906
+ };
907
+ };
908
+ };
909
+ readonly GroupElement: {
910
+ readonly title: "GroupElement";
911
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
912
+ readonly type: "string";
913
+ readonly minLength: 2;
914
+ readonly maxLength: 64;
915
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
916
+ };
917
+ readonly Key: {
918
+ readonly title: "Key";
919
+ readonly description: "A question or option key, unique within its manifest or question.";
920
+ readonly type: "string";
921
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
922
+ };
923
+ readonly ElectionKey: {
924
+ readonly title: "ElectionKey";
925
+ readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
926
+ readonly type: "object";
927
+ readonly additionalProperties: false;
928
+ readonly required: readonly ["key", "qualified", "verification"];
929
+ readonly properties: {
930
+ readonly key: {
931
+ readonly $ref: "#/$defs/GroupElement";
932
+ };
933
+ readonly qualified: {
934
+ readonly type: "array";
935
+ readonly minItems: 1;
936
+ readonly maxItems: 64;
937
+ readonly items: {
938
+ readonly $ref: "#/$defs/TrusteeIndex";
939
+ };
940
+ readonly description: "The dealers whose dealings the key is formed from.";
941
+ };
942
+ readonly verification: {
943
+ readonly type: "array";
944
+ readonly minItems: 2;
945
+ readonly maxItems: 64;
946
+ readonly items: {
947
+ readonly type: "object";
948
+ readonly additionalProperties: false;
949
+ readonly required: readonly ["trustee", "key"];
950
+ readonly properties: {
951
+ readonly trustee: {
952
+ readonly $ref: "#/$defs/TrusteeIndex";
953
+ };
954
+ readonly key: {
955
+ readonly $ref: "#/$defs/GroupElement";
956
+ };
957
+ };
958
+ };
959
+ };
960
+ };
961
+ };
962
+ readonly GroupScalar: {
963
+ readonly title: "GroupScalar";
964
+ readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
965
+ readonly type: "string";
966
+ readonly minLength: 2;
967
+ readonly maxLength: 64;
968
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
969
+ };
970
+ readonly Dealing: {
971
+ readonly title: "Dealing";
972
+ readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
973
+ readonly type: "object";
974
+ readonly additionalProperties: false;
975
+ readonly required: readonly ["dealer", "commitments", "pok", "shares"];
976
+ readonly properties: {
977
+ readonly dealer: {
978
+ readonly $ref: "#/$defs/TrusteeIndex";
979
+ };
980
+ readonly commitments: {
981
+ readonly type: "array";
982
+ readonly minItems: 2;
983
+ readonly maxItems: 64;
984
+ readonly items: {
985
+ readonly $ref: "#/$defs/GroupElement";
986
+ };
987
+ };
988
+ readonly pok: {
989
+ readonly $ref: "#/$defs/SigmaProof";
990
+ };
991
+ readonly shares: {
992
+ readonly type: "array";
993
+ readonly minItems: 2;
994
+ readonly maxItems: 64;
995
+ readonly items: {
996
+ readonly $ref: "#/$defs/SealedShare";
997
+ };
998
+ };
999
+ };
1000
+ };
1001
+ readonly SealedShare: {
1002
+ readonly title: "SealedShare";
1003
+ readonly type: "object";
1004
+ readonly additionalProperties: false;
1005
+ readonly required: readonly ["recipient", "share"];
1006
+ readonly properties: {
1007
+ readonly recipient: {
1008
+ readonly $ref: "#/$defs/TrusteeIndex";
1009
+ };
1010
+ readonly share: {
1011
+ readonly $ref: "#/$defs/SealedPayload";
1012
+ };
1013
+ };
1014
+ };
1015
+ readonly SealedPayload: {
1016
+ readonly title: "SealedPayload";
1017
+ readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
1018
+ readonly type: "object";
1019
+ readonly additionalProperties: false;
1020
+ readonly required: readonly ["kem", "body"];
1021
+ readonly properties: {
1022
+ readonly kem: {
1023
+ readonly $ref: "#/$defs/ElGamalCiphertext";
1024
+ };
1025
+ readonly body: {
1026
+ readonly type: "string";
1027
+ readonly minLength: 2;
1028
+ readonly maxLength: 131072;
1029
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1030
+ };
1031
+ };
1032
+ };
1033
+ readonly SigmaProof: {
1034
+ readonly title: "SigmaProof";
1035
+ readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
1036
+ readonly type: "object";
1037
+ readonly additionalProperties: false;
1038
+ readonly required: readonly ["c", "z"];
1039
+ readonly properties: {
1040
+ readonly c: {
1041
+ readonly $ref: "#/$defs/GroupScalar";
1042
+ };
1043
+ readonly z: {
1044
+ readonly $ref: "#/$defs/GroupScalar";
1045
+ };
1046
+ };
1047
+ };
1048
+ readonly TransportKey: {
1049
+ readonly title: "TransportKey";
1050
+ readonly description: "The group element a trustee's shares are sealed to, with a Schnorr proof of knowledge of its discrete log (CONVENTIONS §9.6).";
1051
+ readonly type: "object";
1052
+ readonly additionalProperties: false;
1053
+ readonly required: readonly ["trustee", "key", "pok"];
1054
+ readonly properties: {
1055
+ readonly trustee: {
1056
+ readonly $ref: "#/$defs/TrusteeIndex";
1057
+ };
1058
+ readonly key: {
1059
+ readonly $ref: "#/$defs/GroupElement";
1060
+ };
1061
+ readonly pok: {
1062
+ readonly $ref: "#/$defs/SigmaProof";
1063
+ };
1064
+ };
1065
+ };
1066
+ readonly TrusteePhase: {
1067
+ readonly title: "TrusteePhase";
1068
+ readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
1069
+ readonly type: "string";
1070
+ readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
1071
+ };
1072
+ readonly ElectionId: {
1073
+ readonly title: "ElectionId";
1074
+ 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.";
1075
+ readonly type: "string";
1076
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
1077
+ };
1078
+ };
1079
+ };
1080
+ };
1081
+ /**
1082
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
1083
+ * tracks the *issuer* party's requirement because a response swaps the
1084
+ * parties (§7.3 item 5).
1085
+ */
1086
+ export declare const RESPONSE_SPEC: {
1087
+ readonly typeUri: "https://trusttasks.org/spec/voting/trustees/status/0.1#response";
1088
+ readonly isBearer: false;
1089
+ readonly isProofRequired: true;
1090
+ readonly isRecipientRequired: true;
1091
+ readonly isIssuedAtRequired: true;
1092
+ readonly payloadSchema: {
1093
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
1094
+ readonly $ref: "#/$defs/Response";
1095
+ readonly $defs: {
1096
+ readonly Response: {
1097
+ readonly $anchor: "response";
1098
+ readonly title: "Voting — Trustees — Status — response payload";
1099
+ readonly type: "object";
1100
+ readonly additionalProperties: false;
1101
+ readonly required: readonly ["phase", "threshold", "transportKeys", "dealings", "complaints", "confirmed", "targets", "decrypted"];
1102
+ readonly properties: {
1103
+ readonly phase: {
1104
+ readonly $ref: "#/$defs/TrusteePhase";
1105
+ };
1106
+ readonly threshold: {
1107
+ readonly type: "integer";
1108
+ readonly minimum: 2;
1109
+ readonly maximum: 64;
1110
+ };
1111
+ readonly transportKeys: {
1112
+ readonly type: "array";
1113
+ readonly maxItems: 64;
1114
+ readonly items: {
1115
+ readonly $ref: "#/$defs/TransportKey";
1116
+ };
1117
+ };
1118
+ readonly dealings: {
1119
+ readonly type: "array";
1120
+ readonly maxItems: 64;
1121
+ readonly items: {
1122
+ readonly $ref: "#/$defs/Dealing";
1123
+ };
1124
+ };
1125
+ readonly complaints: {
1126
+ readonly type: "array";
1127
+ readonly maxItems: 4096;
1128
+ readonly items: {
1129
+ readonly type: "object";
1130
+ readonly additionalProperties: false;
1131
+ readonly required: readonly ["dealer", "recipient", "justified"];
1132
+ readonly properties: {
1133
+ readonly dealer: {
1134
+ readonly $ref: "#/$defs/TrusteeIndex";
1135
+ };
1136
+ readonly recipient: {
1137
+ readonly $ref: "#/$defs/TrusteeIndex";
1138
+ };
1139
+ readonly justified: {
1140
+ readonly type: "boolean";
1141
+ };
1142
+ readonly share: {
1143
+ readonly $ref: "#/$defs/GroupScalar";
1144
+ };
1145
+ };
1146
+ };
1147
+ };
1148
+ readonly confirmed: {
1149
+ readonly type: "array";
1150
+ readonly maxItems: 64;
1151
+ readonly items: {
1152
+ readonly $ref: "#/$defs/TrusteeIndex";
1153
+ };
1154
+ };
1155
+ readonly electionKey: {
1156
+ readonly $ref: "#/$defs/ElectionKey";
1157
+ };
1158
+ readonly targets: {
1159
+ readonly type: "array";
1160
+ readonly maxItems: 100000;
1161
+ readonly items: {
1162
+ readonly $ref: "#/$defs/DecryptionTarget";
1163
+ };
1164
+ readonly description: "What remains to be decrypted, once voting has closed.";
1165
+ };
1166
+ readonly decrypted: {
1167
+ readonly type: "array";
1168
+ readonly maxItems: 64;
1169
+ readonly items: {
1170
+ readonly $ref: "#/$defs/TrusteeIndex";
1171
+ };
1172
+ readonly description: "The trustees whose partials have been accepted.";
1173
+ };
1174
+ readonly ext: {
1175
+ readonly $ref: "#/$defs/Ext";
1176
+ };
1177
+ };
1178
+ };
1179
+ readonly Ext: {
1180
+ readonly title: "Ext";
1181
+ 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.";
1182
+ readonly type: "object";
1183
+ readonly minProperties: 1;
1184
+ readonly additionalProperties: true;
1185
+ readonly propertyNames: {
1186
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
1187
+ };
1188
+ };
1189
+ readonly TrusteeIndex: {
1190
+ readonly title: "TrusteeIndex";
1191
+ readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
1192
+ readonly type: "integer";
1193
+ readonly minimum: 1;
1194
+ readonly maximum: 64;
1195
+ };
1196
+ readonly DecryptionTarget: {
1197
+ readonly title: "DecryptionTarget";
1198
+ readonly description: "What a partial decryption decrypts: the sealed cast at a board leaf, or the total of one option of one question.";
1199
+ readonly type: "object";
1200
+ readonly additionalProperties: false;
1201
+ readonly required: readonly ["ciphertext"];
1202
+ readonly properties: {
1203
+ readonly leafIndex: {
1204
+ readonly type: "integer";
1205
+ readonly minimum: 0;
1206
+ readonly description: "A sealed cast's board leaf.";
1207
+ };
1208
+ readonly question: {
1209
+ readonly $ref: "#/$defs/Key";
1210
+ };
1211
+ readonly option: {
1212
+ readonly $ref: "#/$defs/Key";
1213
+ };
1214
+ readonly ciphertext: {
1215
+ readonly $ref: "#/$defs/ElGamalCiphertext";
1216
+ };
1217
+ };
1218
+ readonly oneOf: readonly [{
1219
+ readonly required: readonly ["leafIndex"];
1220
+ }, {
1221
+ readonly required: readonly ["question", "option"];
1222
+ }];
1223
+ };
1224
+ readonly ElGamalCiphertext: {
1225
+ readonly title: "ElGamalCiphertext";
1226
+ readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
1227
+ readonly type: "object";
1228
+ readonly additionalProperties: false;
1229
+ readonly required: readonly ["a", "b"];
1230
+ readonly properties: {
1231
+ readonly a: {
1232
+ readonly $ref: "#/$defs/GroupElement";
1233
+ };
1234
+ readonly b: {
1235
+ readonly $ref: "#/$defs/GroupElement";
1236
+ };
1237
+ };
1238
+ };
1239
+ readonly GroupElement: {
1240
+ readonly title: "GroupElement";
1241
+ readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
1242
+ readonly type: "string";
1243
+ readonly minLength: 2;
1244
+ readonly maxLength: 64;
1245
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1246
+ };
1247
+ readonly Key: {
1248
+ readonly title: "Key";
1249
+ readonly description: "A question or option key, unique within its manifest or question.";
1250
+ readonly type: "string";
1251
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
1252
+ };
1253
+ readonly ElectionKey: {
1254
+ readonly title: "ElectionKey";
1255
+ readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
1256
+ readonly type: "object";
1257
+ readonly additionalProperties: false;
1258
+ readonly required: readonly ["key", "qualified", "verification"];
1259
+ readonly properties: {
1260
+ readonly key: {
1261
+ readonly $ref: "#/$defs/GroupElement";
1262
+ };
1263
+ readonly qualified: {
1264
+ readonly type: "array";
1265
+ readonly minItems: 1;
1266
+ readonly maxItems: 64;
1267
+ readonly items: {
1268
+ readonly $ref: "#/$defs/TrusteeIndex";
1269
+ };
1270
+ readonly description: "The dealers whose dealings the key is formed from.";
1271
+ };
1272
+ readonly verification: {
1273
+ readonly type: "array";
1274
+ readonly minItems: 2;
1275
+ readonly maxItems: 64;
1276
+ readonly items: {
1277
+ readonly type: "object";
1278
+ readonly additionalProperties: false;
1279
+ readonly required: readonly ["trustee", "key"];
1280
+ readonly properties: {
1281
+ readonly trustee: {
1282
+ readonly $ref: "#/$defs/TrusteeIndex";
1283
+ };
1284
+ readonly key: {
1285
+ readonly $ref: "#/$defs/GroupElement";
1286
+ };
1287
+ };
1288
+ };
1289
+ };
1290
+ };
1291
+ };
1292
+ readonly GroupScalar: {
1293
+ readonly title: "GroupScalar";
1294
+ readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
1295
+ readonly type: "string";
1296
+ readonly minLength: 2;
1297
+ readonly maxLength: 64;
1298
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1299
+ };
1300
+ readonly Dealing: {
1301
+ readonly title: "Dealing";
1302
+ readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
1303
+ readonly type: "object";
1304
+ readonly additionalProperties: false;
1305
+ readonly required: readonly ["dealer", "commitments", "pok", "shares"];
1306
+ readonly properties: {
1307
+ readonly dealer: {
1308
+ readonly $ref: "#/$defs/TrusteeIndex";
1309
+ };
1310
+ readonly commitments: {
1311
+ readonly type: "array";
1312
+ readonly minItems: 2;
1313
+ readonly maxItems: 64;
1314
+ readonly items: {
1315
+ readonly $ref: "#/$defs/GroupElement";
1316
+ };
1317
+ };
1318
+ readonly pok: {
1319
+ readonly $ref: "#/$defs/SigmaProof";
1320
+ };
1321
+ readonly shares: {
1322
+ readonly type: "array";
1323
+ readonly minItems: 2;
1324
+ readonly maxItems: 64;
1325
+ readonly items: {
1326
+ readonly $ref: "#/$defs/SealedShare";
1327
+ };
1328
+ };
1329
+ };
1330
+ };
1331
+ readonly SealedShare: {
1332
+ readonly title: "SealedShare";
1333
+ readonly type: "object";
1334
+ readonly additionalProperties: false;
1335
+ readonly required: readonly ["recipient", "share"];
1336
+ readonly properties: {
1337
+ readonly recipient: {
1338
+ readonly $ref: "#/$defs/TrusteeIndex";
1339
+ };
1340
+ readonly share: {
1341
+ readonly $ref: "#/$defs/SealedPayload";
1342
+ };
1343
+ };
1344
+ };
1345
+ readonly SealedPayload: {
1346
+ readonly title: "SealedPayload";
1347
+ readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
1348
+ readonly type: "object";
1349
+ readonly additionalProperties: false;
1350
+ readonly required: readonly ["kem", "body"];
1351
+ readonly properties: {
1352
+ readonly kem: {
1353
+ readonly $ref: "#/$defs/ElGamalCiphertext";
1354
+ };
1355
+ readonly body: {
1356
+ readonly type: "string";
1357
+ readonly minLength: 2;
1358
+ readonly maxLength: 131072;
1359
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1360
+ };
1361
+ };
1362
+ };
1363
+ readonly SigmaProof: {
1364
+ readonly title: "SigmaProof";
1365
+ readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
1366
+ readonly type: "object";
1367
+ readonly additionalProperties: false;
1368
+ readonly required: readonly ["c", "z"];
1369
+ readonly properties: {
1370
+ readonly c: {
1371
+ readonly $ref: "#/$defs/GroupScalar";
1372
+ };
1373
+ readonly z: {
1374
+ readonly $ref: "#/$defs/GroupScalar";
1375
+ };
1376
+ };
1377
+ };
1378
+ readonly TransportKey: {
1379
+ readonly title: "TransportKey";
1380
+ readonly description: "The group element a trustee's shares are sealed to, with a Schnorr proof of knowledge of its discrete log (CONVENTIONS §9.6).";
1381
+ readonly type: "object";
1382
+ readonly additionalProperties: false;
1383
+ readonly required: readonly ["trustee", "key", "pok"];
1384
+ readonly properties: {
1385
+ readonly trustee: {
1386
+ readonly $ref: "#/$defs/TrusteeIndex";
1387
+ };
1388
+ readonly key: {
1389
+ readonly $ref: "#/$defs/GroupElement";
1390
+ };
1391
+ readonly pok: {
1392
+ readonly $ref: "#/$defs/SigmaProof";
1393
+ };
1394
+ };
1395
+ };
1396
+ readonly TrusteePhase: {
1397
+ readonly title: "TrusteePhase";
1398
+ readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
1399
+ readonly type: "string";
1400
+ readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
1401
+ };
1402
+ readonly ElectionId: {
1403
+ readonly title: "ElectionId";
1404
+ 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.";
1405
+ readonly type: "string";
1406
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
1407
+ };
1408
+ };
1409
+ };
1410
+ };
1411
+ //# sourceMappingURL=payload.d.ts.map