@openvtc/trust-tasks 0.26.19 → 0.26.21

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 (219) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/dist/_shared/components.d.ts +328 -17
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.2/payload.d.ts +4 -4
  5. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.2/payload.js +4 -2
  7. package/dist/device/list/0.2/payload.js.map +1 -1
  8. package/dist/device/register/0.2/payload.d.ts +4 -4
  9. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/register/0.2/payload.js +4 -2
  11. package/dist/device/register/0.2/payload.js.map +1 -1
  12. package/dist/index.d.ts +24 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +24 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/voting/_shared/0.1/voting.d.ts +16 -0
  17. package/dist/voting/_shared/0.1/voting.d.ts.map +1 -0
  18. package/dist/voting/_shared/0.1/voting.js +6 -0
  19. package/dist/voting/_shared/0.1/voting.js.map +1 -0
  20. package/dist/voting/ballot/cast/0.1/payload.d.ts +887 -0
  21. package/dist/voting/ballot/cast/0.1/payload.d.ts.map +1 -0
  22. package/dist/voting/ballot/cast/0.1/payload.js +506 -0
  23. package/dist/voting/ballot/cast/0.1/payload.js.map +1 -0
  24. package/dist/voting/board/consistency/0.1/payload.d.ts +389 -0
  25. package/dist/voting/board/consistency/0.1/payload.d.ts.map +1 -0
  26. package/dist/voting/board/consistency/0.1/payload.js +218 -0
  27. package/dist/voting/board/consistency/0.1/payload.js.map +1 -0
  28. package/dist/voting/board/head/0.1/payload.d.ts +380 -0
  29. package/dist/voting/board/head/0.1/payload.d.ts.map +1 -0
  30. package/dist/voting/board/head/0.1/payload.js +224 -0
  31. package/dist/voting/board/head/0.1/payload.js.map +1 -0
  32. package/dist/voting/board/inclusion/0.1/payload.d.ts +449 -0
  33. package/dist/voting/board/inclusion/0.1/payload.d.ts.map +1 -0
  34. package/dist/voting/board/inclusion/0.1/payload.js +246 -0
  35. package/dist/voting/board/inclusion/0.1/payload.js.map +1 -0
  36. package/dist/voting/board/read/0.1/payload.d.ts +1596 -0
  37. package/dist/voting/board/read/0.1/payload.d.ts.map +1 -0
  38. package/dist/voting/board/read/0.1/payload.js +920 -0
  39. package/dist/voting/board/read/0.1/payload.js.map +1 -0
  40. package/dist/voting/election/cancel/0.1/payload.d.ts +540 -0
  41. package/dist/voting/election/cancel/0.1/payload.d.ts.map +1 -0
  42. package/dist/voting/election/cancel/0.1/payload.js +331 -0
  43. package/dist/voting/election/cancel/0.1/payload.js.map +1 -0
  44. package/dist/voting/election/close/0.1/payload.d.ts +540 -0
  45. package/dist/voting/election/close/0.1/payload.d.ts.map +1 -0
  46. package/dist/voting/election/close/0.1/payload.js +330 -0
  47. package/dist/voting/election/close/0.1/payload.js.map +1 -0
  48. package/dist/voting/election/register/0.1/payload.d.ts +1920 -0
  49. package/dist/voting/election/register/0.1/payload.d.ts.map +1 -0
  50. package/dist/voting/election/register/0.1/payload.js +1166 -0
  51. package/dist/voting/election/register/0.1/payload.js.map +1 -0
  52. package/dist/voting/election/show/0.1/payload.d.ts +1824 -0
  53. package/dist/voting/election/show/0.1/payload.d.ts.map +1 -0
  54. package/dist/voting/election/show/0.1/payload.js +1112 -0
  55. package/dist/voting/election/show/0.1/payload.js.map +1 -0
  56. package/dist/voting/result/show/0.1/payload.d.ts +849 -0
  57. package/dist/voting/result/show/0.1/payload.d.ts.map +1 -0
  58. package/dist/voting/result/show/0.1/payload.js +498 -0
  59. package/dist/voting/result/show/0.1/payload.js.map +1 -0
  60. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  61. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  62. package/dist/vta/_shared/0.4/pcs-engine.d.ts +1 -1
  63. package/dist/vta/_shared/0.4/pcs-engine.d.ts.map +1 -1
  64. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  65. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  66. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  67. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  68. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  69. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  70. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  71. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  72. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  73. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  74. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  75. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  76. package/dist/vta/pcs/applications/create/0.1/payload.d.ts +1 -1
  77. package/dist/vta/pcs/applications/create/0.1/payload.d.ts.map +1 -1
  78. package/dist/vta/pcs/applications/show/0.1/payload.d.ts +1 -1
  79. package/dist/vta/pcs/applications/show/0.1/payload.d.ts.map +1 -1
  80. package/dist/vta/pcs/attest/0.1/payload.d.ts +1 -1
  81. package/dist/vta/pcs/attest/0.1/payload.d.ts.map +1 -1
  82. package/dist/vta/pcs/prove/0.1/payload.d.ts +1 -1
  83. package/dist/vta/pcs/prove/0.1/payload.d.ts.map +1 -1
  84. package/dist/vta/pcs/root-accept/0.1/payload.d.ts +1 -1
  85. package/dist/vta/pcs/root-accept/0.1/payload.d.ts.map +1 -1
  86. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts +1 -1
  87. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts.map +1 -1
  88. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts +1 -1
  89. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts.map +1 -1
  90. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts +1 -1
  91. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts.map +1 -1
  92. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts +1 -1
  93. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts.map +1 -1
  94. package/dist/vta/pcs/vote/0.1/payload.d.ts +2208 -0
  95. package/dist/vta/pcs/vote/0.1/payload.d.ts.map +1 -0
  96. package/dist/vta/pcs/vote/0.1/payload.js +1282 -0
  97. package/dist/vta/pcs/vote/0.1/payload.js.map +1 -0
  98. package/dist/vta/pcs/voter/accept/0.1/payload.d.ts +450 -0
  99. package/dist/vta/pcs/voter/accept/0.1/payload.d.ts.map +1 -0
  100. package/dist/vta/pcs/voter/accept/0.1/payload.js +247 -0
  101. package/dist/vta/pcs/voter/accept/0.1/payload.js.map +1 -0
  102. package/dist/vta/pcs/voter/receipt/0.1/payload.d.ts +531 -0
  103. package/dist/vta/pcs/voter/receipt/0.1/payload.d.ts.map +1 -0
  104. package/dist/vta/pcs/voter/receipt/0.1/payload.js +301 -0
  105. package/dist/vta/pcs/voter/receipt/0.1/payload.js.map +1 -0
  106. package/dist/vta/pcs/voter/register/0.1/payload.d.ts +1934 -0
  107. package/dist/vta/pcs/voter/register/0.1/payload.d.ts.map +1 -0
  108. package/dist/vta/pcs/voter/register/0.1/payload.js +1133 -0
  109. package/dist/vta/pcs/voter/register/0.1/payload.js.map +1 -0
  110. package/dist/vtc/directory/card/present/0.1/payload.d.ts +2 -2
  111. package/dist/vtc/directory/card/present/0.1/payload.js +1 -1
  112. package/dist/vtc/directory/card/present/0.1/payload.js.map +1 -1
  113. package/dist/vtc/directory/card/public/0.1/payload.d.ts +4 -4
  114. package/dist/vtc/directory/card/public/0.1/payload.js +2 -2
  115. package/dist/vtc/directory/card/public/0.1/payload.js.map +1 -1
  116. package/dist/vtc/directory/card/publish/0.1/payload.d.ts +4 -4
  117. package/dist/vtc/directory/card/publish/0.1/payload.js +2 -2
  118. package/dist/vtc/directory/card/publish/0.1/payload.js.map +1 -1
  119. package/dist/vtc/elections/cancel/0.1/payload.d.ts +301 -0
  120. package/dist/vtc/elections/cancel/0.1/payload.d.ts.map +1 -0
  121. package/dist/vtc/elections/cancel/0.1/payload.js +183 -0
  122. package/dist/vtc/elections/cancel/0.1/payload.js.map +1 -0
  123. package/dist/vtc/elections/certify/0.1/payload.d.ts +914 -0
  124. package/dist/vtc/elections/certify/0.1/payload.d.ts.map +1 -0
  125. package/dist/vtc/elections/certify/0.1/payload.js +512 -0
  126. package/dist/vtc/elections/certify/0.1/payload.js.map +1 -0
  127. package/dist/vtc/elections/close/0.1/payload.d.ts +301 -0
  128. package/dist/vtc/elections/close/0.1/payload.d.ts.map +1 -0
  129. package/dist/vtc/elections/close/0.1/payload.js +182 -0
  130. package/dist/vtc/elections/close/0.1/payload.js.map +1 -0
  131. package/dist/vtc/elections/create/0.1/payload.d.ts +1656 -0
  132. package/dist/vtc/elections/create/0.1/payload.d.ts.map +1 -0
  133. package/dist/vtc/elections/create/0.1/payload.js +994 -0
  134. package/dist/vtc/elections/create/0.1/payload.js.map +1 -0
  135. package/dist/vtc/elections/list/0.1/payload.d.ts +521 -0
  136. package/dist/vtc/elections/list/0.1/payload.d.ts.map +1 -0
  137. package/dist/vtc/elections/list/0.1/payload.js +290 -0
  138. package/dist/vtc/elections/list/0.1/payload.js.map +1 -0
  139. package/dist/vtc/elections/show/0.1/payload.d.ts +2688 -0
  140. package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -0
  141. package/dist/vtc/elections/show/0.1/payload.js +1581 -0
  142. package/dist/vtc/elections/show/0.1/payload.js.map +1 -0
  143. package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts +597 -0
  144. package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts.map +1 -0
  145. package/dist/vtc/elections/tickets/issue/0.1/payload.js +318 -0
  146. package/dist/vtc/elections/tickets/issue/0.1/payload.js.map +1 -0
  147. package/dist/vtc/groups/create/0.1/payload.d.ts +4 -4
  148. package/dist/vtc/groups/create/0.1/payload.js +2 -2
  149. package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
  150. package/dist/vtc/groups/list/0.1/payload.d.ts +4 -4
  151. package/dist/vtc/groups/list/0.1/payload.js +2 -2
  152. package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
  153. package/dist/vtc/groups/managers/add/0.1/payload.d.ts +337 -0
  154. package/dist/vtc/groups/managers/add/0.1/payload.d.ts.map +1 -0
  155. package/dist/vtc/groups/managers/add/0.1/payload.js +184 -0
  156. package/dist/vtc/groups/managers/add/0.1/payload.js.map +1 -0
  157. package/dist/vtc/groups/managers/remove/0.1/payload.d.ts +337 -0
  158. package/dist/vtc/groups/managers/remove/0.1/payload.d.ts.map +1 -0
  159. package/dist/vtc/groups/managers/remove/0.1/payload.js +184 -0
  160. package/dist/vtc/groups/managers/remove/0.1/payload.js.map +1 -0
  161. package/dist/vtc/groups/show/0.1/payload.d.ts +4 -4
  162. package/dist/vtc/groups/show/0.1/payload.js +2 -2
  163. package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
  164. package/dist/vtc/groups/update/0.1/payload.d.ts +4 -4
  165. package/dist/vtc/groups/update/0.1/payload.js +2 -2
  166. package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
  167. package/package.json +1 -1
  168. package/src/_shared/components.ts +331 -17
  169. package/src/device/list/0.2/payload.ts +4 -2
  170. package/src/device/register/0.2/payload.ts +4 -2
  171. package/src/index.ts +24 -0
  172. package/src/voting/_shared/0.1/voting.ts +17 -0
  173. package/src/voting/ballot/cast/0.1/payload.ts +560 -0
  174. package/src/voting/board/consistency/0.1/payload.ts +264 -0
  175. package/src/voting/board/head/0.1/payload.ts +257 -0
  176. package/src/voting/board/inclusion/0.1/payload.ts +300 -0
  177. package/src/voting/board/read/0.1/payload.ts +981 -0
  178. package/src/voting/election/cancel/0.1/payload.ts +368 -0
  179. package/src/voting/election/close/0.1/payload.ts +367 -0
  180. package/src/voting/election/register/0.1/payload.ts +1207 -0
  181. package/src/voting/election/show/0.1/payload.ts +1149 -0
  182. package/src/voting/result/show/0.1/payload.ts +536 -0
  183. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  184. package/src/vta/_shared/0.4/pcs-engine.ts +1 -1
  185. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  186. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  187. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  188. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  189. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  190. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
  191. package/src/vta/pcs/applications/create/0.1/payload.ts +1 -1
  192. package/src/vta/pcs/applications/show/0.1/payload.ts +1 -1
  193. package/src/vta/pcs/attest/0.1/payload.ts +1 -1
  194. package/src/vta/pcs/prove/0.1/payload.ts +1 -1
  195. package/src/vta/pcs/root-accept/0.1/payload.ts +1 -1
  196. package/src/vta/pcs/tokens/abandon/0.1/payload.ts +1 -1
  197. package/src/vta/pcs/tokens/accept/0.1/payload.ts +1 -1
  198. package/src/vta/pcs/verify-attestation/0.1/payload.ts +1 -1
  199. package/src/vta/pcs/vetter/show/0.1/payload.ts +1 -1
  200. package/src/vta/pcs/vote/0.1/payload.ts +1365 -0
  201. package/src/vta/pcs/voter/accept/0.1/payload.ts +306 -0
  202. package/src/vta/pcs/voter/receipt/0.1/payload.ts +367 -0
  203. package/src/vta/pcs/voter/register/0.1/payload.ts +1211 -0
  204. package/src/vtc/directory/card/present/0.1/payload.ts +1 -1
  205. package/src/vtc/directory/card/public/0.1/payload.ts +2 -2
  206. package/src/vtc/directory/card/publish/0.1/payload.ts +2 -2
  207. package/src/vtc/elections/cancel/0.1/payload.ts +223 -0
  208. package/src/vtc/elections/certify/0.1/payload.ts +565 -0
  209. package/src/vtc/elections/close/0.1/payload.ts +222 -0
  210. package/src/vtc/elections/create/0.1/payload.ts +1041 -0
  211. package/src/vtc/elections/list/0.1/payload.ts +371 -0
  212. package/src/vtc/elections/show/0.1/payload.ts +1671 -0
  213. package/src/vtc/elections/tickets/issue/0.1/payload.ts +394 -0
  214. package/src/vtc/groups/create/0.1/payload.ts +2 -2
  215. package/src/vtc/groups/list/0.1/payload.ts +2 -2
  216. package/src/vtc/groups/managers/add/0.1/payload.ts +230 -0
  217. package/src/vtc/groups/managers/remove/0.1/payload.ts +230 -0
  218. package/src/vtc/groups/show/0.1/payload.ts +2 -2
  219. package/src/vtc/groups/update/0.1/payload.ts +2 -2
@@ -0,0 +1,1596 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/voting/board/read/0.1/payload.schema.json
4
+ */
5
+ import type { Answer, Ballot, BoardEntry, BoardHead, Cast, CastEntry, DigestMultibase, ElectionId, ElectionResult, Ext, Key_VotingV0_1 as Key, LifecycleEntry, Multibase_VotingV0_1 as Multibase, QuestionResult, ReplacementEntry, ResultEntry } from "../../../../_shared/components.js";
6
+ /**
7
+ * Reads a range of an election board's entries, against the current head or against an earlier tree size.
8
+ */
9
+ export interface VotingBoardReadPayload {
10
+ /**
11
+ * The community's DID.
12
+ */
13
+ community: string;
14
+ electionId: ElectionId;
15
+ /**
16
+ * The index of the first entry to return.
17
+ */
18
+ from: number;
19
+ /**
20
+ * The most entries to return.
21
+ */
22
+ limit: number;
23
+ /**
24
+ * Read against the board as it stood at this size — the size of a head the reader holds. At most the current size. Absent: the current size.
25
+ */
26
+ treeSize?: number;
27
+ ext?: Ext;
28
+ }
29
+ export interface VotingBoardReadResponsePayload {
30
+ /**
31
+ * The tree size the page was read against. No entry at or beyond it is returned.
32
+ */
33
+ treeSize: number;
34
+ /**
35
+ * Consecutive entries from `from`, in board order.
36
+ *
37
+ * @maxItems 1000
38
+ */
39
+ entries: {
40
+ index: number;
41
+ entry: BoardEntry;
42
+ }[];
43
+ /**
44
+ * The `from` of the next page. Absent when the page reaches `treeSize`.
45
+ */
46
+ next?: number;
47
+ ext?: Ext;
48
+ }
49
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
50
+ export type { Answer, Ballot, BoardEntry, BoardHead, Cast, CastEntry, DigestMultibase, ElectionId, ElectionResult, Ext, Key, LifecycleEntry, Multibase, QuestionResult, ReplacementEntry, ResultEntry };
51
+ /** Trust Task type URI. */
52
+ export declare const TYPE_URI: "https://trusttasks.org/spec/voting/board/read/0.1";
53
+ /** Stable alias for this specification's request payload shape. */
54
+ export type Payload = VotingBoardReadPayload;
55
+ /** Trust Task response type URI (request type URI + "#response"). */
56
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/voting/board/read/0.1#response";
57
+ /** Stable alias for this specification's success-response payload shape. */
58
+ export type Response = VotingBoardReadResponsePayload;
59
+ /**
60
+ * This specification's payload schema, as a value.
61
+ *
62
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
63
+ * rather than only as a `.json` file because TypeScript types are erased
64
+ * at runtime: without a schema a consumer has nothing to validate, and
65
+ * every REQUIRED payload member is optional in practice. Cross-file
66
+ * `$ref`s are already inlined, so it needs no resolver.
67
+ */
68
+ export declare const PAYLOAD_SCHEMA: {
69
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
70
+ readonly $id: "https://trusttasks.org/spec/voting/board/read/0.1";
71
+ readonly title: "Voting — Board Read — payload";
72
+ readonly description: "Reads a range of an election board's entries, against the current head or against an earlier tree size.";
73
+ readonly type: "object";
74
+ readonly additionalProperties: false;
75
+ readonly required: readonly ["community", "electionId", "from", "limit"];
76
+ readonly properties: {
77
+ readonly community: {
78
+ readonly type: "string";
79
+ readonly minLength: 1;
80
+ readonly maxLength: 2048;
81
+ readonly description: "The community's DID.";
82
+ };
83
+ readonly electionId: {
84
+ readonly $ref: "#/$defs/ElectionId";
85
+ };
86
+ readonly from: {
87
+ readonly type: "integer";
88
+ readonly minimum: 0;
89
+ readonly description: "The index of the first entry to return.";
90
+ };
91
+ readonly limit: {
92
+ readonly type: "integer";
93
+ readonly minimum: 1;
94
+ readonly maximum: 1000;
95
+ readonly description: "The most entries to return.";
96
+ };
97
+ readonly treeSize: {
98
+ readonly type: "integer";
99
+ readonly minimum: 0;
100
+ readonly description: "Read against the board as it stood at this size — the size of a head the reader holds. At most the current size. Absent: the current size.";
101
+ };
102
+ readonly ext: {
103
+ readonly $ref: "#/$defs/Ext";
104
+ };
105
+ };
106
+ readonly $defs: {
107
+ readonly Response: {
108
+ readonly $anchor: "response";
109
+ readonly title: "Voting — Board Read — response payload";
110
+ readonly type: "object";
111
+ readonly additionalProperties: false;
112
+ readonly required: readonly ["treeSize", "entries"];
113
+ readonly properties: {
114
+ readonly treeSize: {
115
+ readonly type: "integer";
116
+ readonly minimum: 0;
117
+ readonly description: "The tree size the page was read against. No entry at or beyond it is returned.";
118
+ };
119
+ readonly entries: {
120
+ readonly type: "array";
121
+ readonly maxItems: 1000;
122
+ readonly items: {
123
+ readonly type: "object";
124
+ readonly additionalProperties: false;
125
+ readonly required: readonly ["index", "entry"];
126
+ readonly properties: {
127
+ readonly index: {
128
+ readonly type: "integer";
129
+ readonly minimum: 0;
130
+ };
131
+ readonly entry: {
132
+ readonly $ref: "#/$defs/BoardEntry";
133
+ };
134
+ };
135
+ };
136
+ readonly description: "Consecutive entries from `from`, in board order.";
137
+ };
138
+ readonly next: {
139
+ readonly type: "integer";
140
+ readonly minimum: 1;
141
+ readonly description: "The `from` of the next page. Absent when the page reaches `treeSize`.";
142
+ };
143
+ readonly ext: {
144
+ readonly $ref: "#/$defs/Ext";
145
+ };
146
+ };
147
+ };
148
+ readonly Ext: {
149
+ readonly title: "Ext";
150
+ 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.";
151
+ readonly type: "object";
152
+ readonly minProperties: 1;
153
+ readonly additionalProperties: true;
154
+ readonly propertyNames: {
155
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
156
+ };
157
+ };
158
+ readonly BoardEntry: {
159
+ readonly title: "BoardEntry";
160
+ readonly description: "One leaf of a board. A leaf's hash is the RFC 9162 leaf hash of the JCS canonicalization of this object. Entries carry no time of arrival: the order is the board's, and a timestamp would hand anyone who reads the board the timing the registrar's log would need to pair a ticket with its cast.";
161
+ readonly oneOf: readonly [{
162
+ readonly title: "CastEntry";
163
+ readonly type: "object";
164
+ readonly additionalProperties: false;
165
+ readonly required: readonly ["kind", "cast"];
166
+ readonly properties: {
167
+ readonly kind: {
168
+ readonly const: "cast";
169
+ };
170
+ readonly cast: {
171
+ readonly $ref: "#/$defs/Cast";
172
+ };
173
+ };
174
+ }, {
175
+ readonly title: "ReplacementEntry";
176
+ readonly description: "The cast at `replaces` is no longer counted: a later cast under the same tag is.";
177
+ readonly type: "object";
178
+ readonly additionalProperties: false;
179
+ readonly required: readonly ["kind", "tag", "replaces", "by"];
180
+ readonly properties: {
181
+ readonly kind: {
182
+ readonly const: "replaced";
183
+ };
184
+ readonly tag: {
185
+ readonly $ref: "#/$defs/Multibase";
186
+ };
187
+ readonly replaces: {
188
+ readonly type: "integer";
189
+ readonly minimum: 0;
190
+ };
191
+ readonly by: {
192
+ readonly type: "integer";
193
+ readonly minimum: 0;
194
+ };
195
+ };
196
+ }, {
197
+ readonly title: "LifecycleEntry";
198
+ readonly type: "object";
199
+ readonly additionalProperties: false;
200
+ readonly required: readonly ["kind", "at"];
201
+ readonly properties: {
202
+ readonly kind: {
203
+ readonly enum: readonly ["opened", "closed", "closedEarly", "cancelled"];
204
+ };
205
+ readonly at: {
206
+ readonly type: "string";
207
+ readonly format: "date-time";
208
+ };
209
+ };
210
+ }, {
211
+ readonly title: "ResultEntry";
212
+ readonly type: "object";
213
+ readonly additionalProperties: false;
214
+ readonly required: readonly ["kind", "result"];
215
+ readonly properties: {
216
+ readonly kind: {
217
+ readonly const: "result";
218
+ };
219
+ readonly result: {
220
+ readonly $ref: "#/$defs/ElectionResult";
221
+ };
222
+ };
223
+ }];
224
+ };
225
+ readonly ElectionResult: {
226
+ readonly title: "ElectionResult";
227
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
228
+ readonly type: "object";
229
+ readonly additionalProperties: false;
230
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
231
+ readonly properties: {
232
+ readonly electionId: {
233
+ readonly $ref: "#/$defs/ElectionId";
234
+ };
235
+ readonly manifestDigest: {
236
+ readonly $ref: "#/$defs/DigestMultibase";
237
+ };
238
+ readonly ballotsCounted: {
239
+ readonly type: "integer";
240
+ readonly minimum: 0;
241
+ };
242
+ readonly questions: {
243
+ readonly type: "array";
244
+ readonly items: {
245
+ readonly $ref: "#/$defs/QuestionResult";
246
+ };
247
+ };
248
+ readonly head: {
249
+ readonly $ref: "#/$defs/BoardHead";
250
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
251
+ };
252
+ };
253
+ };
254
+ readonly BoardHead: {
255
+ readonly title: "BoardHead";
256
+ readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
257
+ readonly type: "object";
258
+ readonly additionalProperties: false;
259
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
260
+ readonly properties: {
261
+ readonly electionId: {
262
+ readonly $ref: "#/$defs/ElectionId";
263
+ };
264
+ readonly treeSize: {
265
+ readonly type: "integer";
266
+ readonly minimum: 0;
267
+ };
268
+ readonly rootHash: {
269
+ readonly $ref: "#/$defs/DigestMultibase";
270
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
271
+ };
272
+ readonly issuedAt: {
273
+ readonly type: "string";
274
+ readonly format: "date-time";
275
+ };
276
+ };
277
+ };
278
+ readonly ElectionId: {
279
+ readonly title: "ElectionId";
280
+ 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.";
281
+ readonly type: "string";
282
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
283
+ };
284
+ readonly DigestMultibase: {
285
+ readonly title: "DigestMultibase";
286
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
287
+ readonly type: "string";
288
+ readonly minLength: 16;
289
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
290
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
291
+ };
292
+ readonly QuestionResult: {
293
+ readonly title: "QuestionResult";
294
+ readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
295
+ readonly type: "object";
296
+ readonly additionalProperties: false;
297
+ readonly required: readonly ["question", "abstained"];
298
+ readonly properties: {
299
+ readonly question: {
300
+ readonly $ref: "#/$defs/Key";
301
+ };
302
+ readonly abstained: {
303
+ readonly type: "integer";
304
+ readonly minimum: 0;
305
+ };
306
+ readonly choice: {
307
+ readonly type: "object";
308
+ readonly propertyNames: {
309
+ readonly $ref: "#/$defs/Key";
310
+ };
311
+ readonly additionalProperties: {
312
+ readonly type: "integer";
313
+ readonly minimum: 0;
314
+ };
315
+ };
316
+ readonly ranking: {
317
+ readonly type: "object";
318
+ readonly propertyNames: {
319
+ readonly $ref: "#/$defs/Key";
320
+ };
321
+ readonly additionalProperties: {
322
+ readonly type: "array";
323
+ readonly items: {
324
+ readonly type: "integer";
325
+ readonly minimum: 0;
326
+ };
327
+ };
328
+ };
329
+ readonly score: {
330
+ readonly type: "object";
331
+ readonly propertyNames: {
332
+ readonly $ref: "#/$defs/Key";
333
+ };
334
+ readonly additionalProperties: {
335
+ readonly type: "object";
336
+ readonly additionalProperties: false;
337
+ readonly required: readonly ["sum", "count"];
338
+ readonly properties: {
339
+ readonly sum: {
340
+ readonly type: "integer";
341
+ };
342
+ readonly count: {
343
+ readonly type: "integer";
344
+ readonly minimum: 0;
345
+ };
346
+ };
347
+ };
348
+ };
349
+ readonly text: {
350
+ readonly type: "array";
351
+ readonly items: {
352
+ readonly type: "string";
353
+ readonly maxLength: 4096;
354
+ };
355
+ };
356
+ readonly withheld: {
357
+ readonly type: "boolean";
358
+ };
359
+ };
360
+ };
361
+ readonly Key: {
362
+ readonly title: "Key";
363
+ readonly description: "A question or option key, unique within its manifest or question.";
364
+ readonly type: "string";
365
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
366
+ };
367
+ readonly Multibase: {
368
+ readonly title: "Multibase";
369
+ readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
370
+ readonly type: "string";
371
+ readonly maxLength: 16384;
372
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
373
+ };
374
+ readonly Cast: {
375
+ readonly title: "Cast";
376
+ readonly description: "A ballot and the PCS attestation that admits it (VTI-VOT-030). `attestation` is the suite's canonical encoding of the attestation made for the election point with the ballot context bound in (CONVENTIONS §3); `tag` repeats its tag so a ballot box can refuse a duplicate before the pairing check.";
377
+ readonly type: "object";
378
+ readonly additionalProperties: false;
379
+ readonly required: readonly ["ballot", "tag", "attestation"];
380
+ readonly properties: {
381
+ readonly ballot: {
382
+ readonly $ref: "#/$defs/Ballot";
383
+ };
384
+ readonly tag: {
385
+ readonly $ref: "#/$defs/Multibase";
386
+ };
387
+ readonly attestation: {
388
+ readonly $ref: "#/$defs/Multibase";
389
+ };
390
+ };
391
+ };
392
+ readonly Ballot: {
393
+ readonly title: "Ballot";
394
+ readonly description: "An open ballot: one answer per question of the manifest, in any order. The bytes a cast's proof binds are the RFC 8785 (JCS) canonicalization of this object as received.";
395
+ readonly type: "object";
396
+ readonly additionalProperties: false;
397
+ readonly required: readonly ["electionId", "manifestDigest", "answers"];
398
+ readonly properties: {
399
+ readonly electionId: {
400
+ readonly $ref: "#/$defs/ElectionId";
401
+ };
402
+ readonly manifestDigest: {
403
+ readonly $ref: "#/$defs/DigestMultibase";
404
+ };
405
+ readonly answers: {
406
+ readonly type: "array";
407
+ readonly minItems: 1;
408
+ readonly maxItems: 128;
409
+ readonly items: {
410
+ readonly $ref: "#/$defs/Answer";
411
+ };
412
+ };
413
+ };
414
+ };
415
+ readonly Answer: {
416
+ readonly title: "Answer";
417
+ readonly description: "The answer to one question. Exactly one member besides `question` is present, matching the question's type, or `abstain` for an optional question left unanswered.";
418
+ readonly type: "object";
419
+ readonly additionalProperties: false;
420
+ readonly required: readonly ["question"];
421
+ readonly minProperties: 2;
422
+ readonly maxProperties: 2;
423
+ readonly properties: {
424
+ readonly question: {
425
+ readonly $ref: "#/$defs/Key";
426
+ };
427
+ readonly choice: {
428
+ readonly type: "array";
429
+ readonly items: {
430
+ readonly $ref: "#/$defs/Key";
431
+ };
432
+ readonly uniqueItems: true;
433
+ };
434
+ readonly ranking: {
435
+ readonly type: "array";
436
+ readonly items: {
437
+ readonly $ref: "#/$defs/Key";
438
+ };
439
+ readonly uniqueItems: true;
440
+ };
441
+ readonly scores: {
442
+ readonly type: "object";
443
+ readonly propertyNames: {
444
+ readonly $ref: "#/$defs/Key";
445
+ };
446
+ readonly additionalProperties: {
447
+ readonly type: "integer";
448
+ };
449
+ };
450
+ readonly text: {
451
+ readonly type: "string";
452
+ readonly maxLength: 4096;
453
+ };
454
+ readonly abstain: {
455
+ readonly const: true;
456
+ };
457
+ };
458
+ };
459
+ };
460
+ };
461
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
462
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
463
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
464
+ readonly $ref: "#/$defs/Response";
465
+ readonly $defs: {
466
+ readonly Response: {
467
+ readonly $anchor: "response";
468
+ readonly title: "Voting — Board Read — response payload";
469
+ readonly type: "object";
470
+ readonly additionalProperties: false;
471
+ readonly required: readonly ["treeSize", "entries"];
472
+ readonly properties: {
473
+ readonly treeSize: {
474
+ readonly type: "integer";
475
+ readonly minimum: 0;
476
+ readonly description: "The tree size the page was read against. No entry at or beyond it is returned.";
477
+ };
478
+ readonly entries: {
479
+ readonly type: "array";
480
+ readonly maxItems: 1000;
481
+ readonly items: {
482
+ readonly type: "object";
483
+ readonly additionalProperties: false;
484
+ readonly required: readonly ["index", "entry"];
485
+ readonly properties: {
486
+ readonly index: {
487
+ readonly type: "integer";
488
+ readonly minimum: 0;
489
+ };
490
+ readonly entry: {
491
+ readonly $ref: "#/$defs/BoardEntry";
492
+ };
493
+ };
494
+ };
495
+ readonly description: "Consecutive entries from `from`, in board order.";
496
+ };
497
+ readonly next: {
498
+ readonly type: "integer";
499
+ readonly minimum: 1;
500
+ readonly description: "The `from` of the next page. Absent when the page reaches `treeSize`.";
501
+ };
502
+ readonly ext: {
503
+ readonly $ref: "#/$defs/Ext";
504
+ };
505
+ };
506
+ };
507
+ readonly Ext: {
508
+ readonly title: "Ext";
509
+ 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.";
510
+ readonly type: "object";
511
+ readonly minProperties: 1;
512
+ readonly additionalProperties: true;
513
+ readonly propertyNames: {
514
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
515
+ };
516
+ };
517
+ readonly BoardEntry: {
518
+ readonly title: "BoardEntry";
519
+ readonly description: "One leaf of a board. A leaf's hash is the RFC 9162 leaf hash of the JCS canonicalization of this object. Entries carry no time of arrival: the order is the board's, and a timestamp would hand anyone who reads the board the timing the registrar's log would need to pair a ticket with its cast.";
520
+ readonly oneOf: readonly [{
521
+ readonly title: "CastEntry";
522
+ readonly type: "object";
523
+ readonly additionalProperties: false;
524
+ readonly required: readonly ["kind", "cast"];
525
+ readonly properties: {
526
+ readonly kind: {
527
+ readonly const: "cast";
528
+ };
529
+ readonly cast: {
530
+ readonly $ref: "#/$defs/Cast";
531
+ };
532
+ };
533
+ }, {
534
+ readonly title: "ReplacementEntry";
535
+ readonly description: "The cast at `replaces` is no longer counted: a later cast under the same tag is.";
536
+ readonly type: "object";
537
+ readonly additionalProperties: false;
538
+ readonly required: readonly ["kind", "tag", "replaces", "by"];
539
+ readonly properties: {
540
+ readonly kind: {
541
+ readonly const: "replaced";
542
+ };
543
+ readonly tag: {
544
+ readonly $ref: "#/$defs/Multibase";
545
+ };
546
+ readonly replaces: {
547
+ readonly type: "integer";
548
+ readonly minimum: 0;
549
+ };
550
+ readonly by: {
551
+ readonly type: "integer";
552
+ readonly minimum: 0;
553
+ };
554
+ };
555
+ }, {
556
+ readonly title: "LifecycleEntry";
557
+ readonly type: "object";
558
+ readonly additionalProperties: false;
559
+ readonly required: readonly ["kind", "at"];
560
+ readonly properties: {
561
+ readonly kind: {
562
+ readonly enum: readonly ["opened", "closed", "closedEarly", "cancelled"];
563
+ };
564
+ readonly at: {
565
+ readonly type: "string";
566
+ readonly format: "date-time";
567
+ };
568
+ };
569
+ }, {
570
+ readonly title: "ResultEntry";
571
+ readonly type: "object";
572
+ readonly additionalProperties: false;
573
+ readonly required: readonly ["kind", "result"];
574
+ readonly properties: {
575
+ readonly kind: {
576
+ readonly const: "result";
577
+ };
578
+ readonly result: {
579
+ readonly $ref: "#/$defs/ElectionResult";
580
+ };
581
+ };
582
+ }];
583
+ };
584
+ readonly ElectionResult: {
585
+ readonly title: "ElectionResult";
586
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
587
+ readonly type: "object";
588
+ readonly additionalProperties: false;
589
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
590
+ readonly properties: {
591
+ readonly electionId: {
592
+ readonly $ref: "#/$defs/ElectionId";
593
+ };
594
+ readonly manifestDigest: {
595
+ readonly $ref: "#/$defs/DigestMultibase";
596
+ };
597
+ readonly ballotsCounted: {
598
+ readonly type: "integer";
599
+ readonly minimum: 0;
600
+ };
601
+ readonly questions: {
602
+ readonly type: "array";
603
+ readonly items: {
604
+ readonly $ref: "#/$defs/QuestionResult";
605
+ };
606
+ };
607
+ readonly head: {
608
+ readonly $ref: "#/$defs/BoardHead";
609
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
610
+ };
611
+ };
612
+ };
613
+ readonly BoardHead: {
614
+ readonly title: "BoardHead";
615
+ readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
616
+ readonly type: "object";
617
+ readonly additionalProperties: false;
618
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
619
+ readonly properties: {
620
+ readonly electionId: {
621
+ readonly $ref: "#/$defs/ElectionId";
622
+ };
623
+ readonly treeSize: {
624
+ readonly type: "integer";
625
+ readonly minimum: 0;
626
+ };
627
+ readonly rootHash: {
628
+ readonly $ref: "#/$defs/DigestMultibase";
629
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
630
+ };
631
+ readonly issuedAt: {
632
+ readonly type: "string";
633
+ readonly format: "date-time";
634
+ };
635
+ };
636
+ };
637
+ readonly ElectionId: {
638
+ readonly title: "ElectionId";
639
+ 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.";
640
+ readonly type: "string";
641
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
642
+ };
643
+ readonly DigestMultibase: {
644
+ readonly title: "DigestMultibase";
645
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
646
+ readonly type: "string";
647
+ readonly minLength: 16;
648
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
649
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
650
+ };
651
+ readonly QuestionResult: {
652
+ readonly title: "QuestionResult";
653
+ readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
654
+ readonly type: "object";
655
+ readonly additionalProperties: false;
656
+ readonly required: readonly ["question", "abstained"];
657
+ readonly properties: {
658
+ readonly question: {
659
+ readonly $ref: "#/$defs/Key";
660
+ };
661
+ readonly abstained: {
662
+ readonly type: "integer";
663
+ readonly minimum: 0;
664
+ };
665
+ readonly choice: {
666
+ readonly type: "object";
667
+ readonly propertyNames: {
668
+ readonly $ref: "#/$defs/Key";
669
+ };
670
+ readonly additionalProperties: {
671
+ readonly type: "integer";
672
+ readonly minimum: 0;
673
+ };
674
+ };
675
+ readonly ranking: {
676
+ readonly type: "object";
677
+ readonly propertyNames: {
678
+ readonly $ref: "#/$defs/Key";
679
+ };
680
+ readonly additionalProperties: {
681
+ readonly type: "array";
682
+ readonly items: {
683
+ readonly type: "integer";
684
+ readonly minimum: 0;
685
+ };
686
+ };
687
+ };
688
+ readonly score: {
689
+ readonly type: "object";
690
+ readonly propertyNames: {
691
+ readonly $ref: "#/$defs/Key";
692
+ };
693
+ readonly additionalProperties: {
694
+ readonly type: "object";
695
+ readonly additionalProperties: false;
696
+ readonly required: readonly ["sum", "count"];
697
+ readonly properties: {
698
+ readonly sum: {
699
+ readonly type: "integer";
700
+ };
701
+ readonly count: {
702
+ readonly type: "integer";
703
+ readonly minimum: 0;
704
+ };
705
+ };
706
+ };
707
+ };
708
+ readonly text: {
709
+ readonly type: "array";
710
+ readonly items: {
711
+ readonly type: "string";
712
+ readonly maxLength: 4096;
713
+ };
714
+ };
715
+ readonly withheld: {
716
+ readonly type: "boolean";
717
+ };
718
+ };
719
+ };
720
+ readonly Key: {
721
+ readonly title: "Key";
722
+ readonly description: "A question or option key, unique within its manifest or question.";
723
+ readonly type: "string";
724
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
725
+ };
726
+ readonly Multibase: {
727
+ readonly title: "Multibase";
728
+ readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
729
+ readonly type: "string";
730
+ readonly maxLength: 16384;
731
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
732
+ };
733
+ readonly Cast: {
734
+ readonly title: "Cast";
735
+ readonly description: "A ballot and the PCS attestation that admits it (VTI-VOT-030). `attestation` is the suite's canonical encoding of the attestation made for the election point with the ballot context bound in (CONVENTIONS §3); `tag` repeats its tag so a ballot box can refuse a duplicate before the pairing check.";
736
+ readonly type: "object";
737
+ readonly additionalProperties: false;
738
+ readonly required: readonly ["ballot", "tag", "attestation"];
739
+ readonly properties: {
740
+ readonly ballot: {
741
+ readonly $ref: "#/$defs/Ballot";
742
+ };
743
+ readonly tag: {
744
+ readonly $ref: "#/$defs/Multibase";
745
+ };
746
+ readonly attestation: {
747
+ readonly $ref: "#/$defs/Multibase";
748
+ };
749
+ };
750
+ };
751
+ readonly Ballot: {
752
+ readonly title: "Ballot";
753
+ readonly description: "An open ballot: one answer per question of the manifest, in any order. The bytes a cast's proof binds are the RFC 8785 (JCS) canonicalization of this object as received.";
754
+ readonly type: "object";
755
+ readonly additionalProperties: false;
756
+ readonly required: readonly ["electionId", "manifestDigest", "answers"];
757
+ readonly properties: {
758
+ readonly electionId: {
759
+ readonly $ref: "#/$defs/ElectionId";
760
+ };
761
+ readonly manifestDigest: {
762
+ readonly $ref: "#/$defs/DigestMultibase";
763
+ };
764
+ readonly answers: {
765
+ readonly type: "array";
766
+ readonly minItems: 1;
767
+ readonly maxItems: 128;
768
+ readonly items: {
769
+ readonly $ref: "#/$defs/Answer";
770
+ };
771
+ };
772
+ };
773
+ };
774
+ readonly Answer: {
775
+ readonly title: "Answer";
776
+ readonly description: "The answer to one question. Exactly one member besides `question` is present, matching the question's type, or `abstain` for an optional question left unanswered.";
777
+ readonly type: "object";
778
+ readonly additionalProperties: false;
779
+ readonly required: readonly ["question"];
780
+ readonly minProperties: 2;
781
+ readonly maxProperties: 2;
782
+ readonly properties: {
783
+ readonly question: {
784
+ readonly $ref: "#/$defs/Key";
785
+ };
786
+ readonly choice: {
787
+ readonly type: "array";
788
+ readonly items: {
789
+ readonly $ref: "#/$defs/Key";
790
+ };
791
+ readonly uniqueItems: true;
792
+ };
793
+ readonly ranking: {
794
+ readonly type: "array";
795
+ readonly items: {
796
+ readonly $ref: "#/$defs/Key";
797
+ };
798
+ readonly uniqueItems: true;
799
+ };
800
+ readonly scores: {
801
+ readonly type: "object";
802
+ readonly propertyNames: {
803
+ readonly $ref: "#/$defs/Key";
804
+ };
805
+ readonly additionalProperties: {
806
+ readonly type: "integer";
807
+ };
808
+ };
809
+ readonly text: {
810
+ readonly type: "string";
811
+ readonly maxLength: 4096;
812
+ };
813
+ readonly abstain: {
814
+ readonly const: true;
815
+ };
816
+ };
817
+ };
818
+ };
819
+ };
820
+ /**
821
+ * SPEC.md §7.2 policy for the request variant, from this specification's
822
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
823
+ * per-specification and cannot be derived from the document alone, and
824
+ * item 2 needs the schema this carries.
825
+ */
826
+ export declare const SPEC: {
827
+ readonly typeUri: "https://trusttasks.org/spec/voting/board/read/0.1";
828
+ readonly isBearer: false;
829
+ readonly isProofRequired: false;
830
+ readonly isRecipientRequired: true;
831
+ readonly isIssuedAtRequired: false;
832
+ readonly payloadSchema: {
833
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
834
+ readonly $id: "https://trusttasks.org/spec/voting/board/read/0.1";
835
+ readonly title: "Voting — Board Read — payload";
836
+ readonly description: "Reads a range of an election board's entries, against the current head or against an earlier tree size.";
837
+ readonly type: "object";
838
+ readonly additionalProperties: false;
839
+ readonly required: readonly ["community", "electionId", "from", "limit"];
840
+ readonly properties: {
841
+ readonly community: {
842
+ readonly type: "string";
843
+ readonly minLength: 1;
844
+ readonly maxLength: 2048;
845
+ readonly description: "The community's DID.";
846
+ };
847
+ readonly electionId: {
848
+ readonly $ref: "#/$defs/ElectionId";
849
+ };
850
+ readonly from: {
851
+ readonly type: "integer";
852
+ readonly minimum: 0;
853
+ readonly description: "The index of the first entry to return.";
854
+ };
855
+ readonly limit: {
856
+ readonly type: "integer";
857
+ readonly minimum: 1;
858
+ readonly maximum: 1000;
859
+ readonly description: "The most entries to return.";
860
+ };
861
+ readonly treeSize: {
862
+ readonly type: "integer";
863
+ readonly minimum: 0;
864
+ readonly description: "Read against the board as it stood at this size — the size of a head the reader holds. At most the current size. Absent: the current size.";
865
+ };
866
+ readonly ext: {
867
+ readonly $ref: "#/$defs/Ext";
868
+ };
869
+ };
870
+ readonly $defs: {
871
+ readonly Response: {
872
+ readonly $anchor: "response";
873
+ readonly title: "Voting — Board Read — response payload";
874
+ readonly type: "object";
875
+ readonly additionalProperties: false;
876
+ readonly required: readonly ["treeSize", "entries"];
877
+ readonly properties: {
878
+ readonly treeSize: {
879
+ readonly type: "integer";
880
+ readonly minimum: 0;
881
+ readonly description: "The tree size the page was read against. No entry at or beyond it is returned.";
882
+ };
883
+ readonly entries: {
884
+ readonly type: "array";
885
+ readonly maxItems: 1000;
886
+ readonly items: {
887
+ readonly type: "object";
888
+ readonly additionalProperties: false;
889
+ readonly required: readonly ["index", "entry"];
890
+ readonly properties: {
891
+ readonly index: {
892
+ readonly type: "integer";
893
+ readonly minimum: 0;
894
+ };
895
+ readonly entry: {
896
+ readonly $ref: "#/$defs/BoardEntry";
897
+ };
898
+ };
899
+ };
900
+ readonly description: "Consecutive entries from `from`, in board order.";
901
+ };
902
+ readonly next: {
903
+ readonly type: "integer";
904
+ readonly minimum: 1;
905
+ readonly description: "The `from` of the next page. Absent when the page reaches `treeSize`.";
906
+ };
907
+ readonly ext: {
908
+ readonly $ref: "#/$defs/Ext";
909
+ };
910
+ };
911
+ };
912
+ readonly Ext: {
913
+ readonly title: "Ext";
914
+ 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.";
915
+ readonly type: "object";
916
+ readonly minProperties: 1;
917
+ readonly additionalProperties: true;
918
+ readonly propertyNames: {
919
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
920
+ };
921
+ };
922
+ readonly BoardEntry: {
923
+ readonly title: "BoardEntry";
924
+ readonly description: "One leaf of a board. A leaf's hash is the RFC 9162 leaf hash of the JCS canonicalization of this object. Entries carry no time of arrival: the order is the board's, and a timestamp would hand anyone who reads the board the timing the registrar's log would need to pair a ticket with its cast.";
925
+ readonly oneOf: readonly [{
926
+ readonly title: "CastEntry";
927
+ readonly type: "object";
928
+ readonly additionalProperties: false;
929
+ readonly required: readonly ["kind", "cast"];
930
+ readonly properties: {
931
+ readonly kind: {
932
+ readonly const: "cast";
933
+ };
934
+ readonly cast: {
935
+ readonly $ref: "#/$defs/Cast";
936
+ };
937
+ };
938
+ }, {
939
+ readonly title: "ReplacementEntry";
940
+ readonly description: "The cast at `replaces` is no longer counted: a later cast under the same tag is.";
941
+ readonly type: "object";
942
+ readonly additionalProperties: false;
943
+ readonly required: readonly ["kind", "tag", "replaces", "by"];
944
+ readonly properties: {
945
+ readonly kind: {
946
+ readonly const: "replaced";
947
+ };
948
+ readonly tag: {
949
+ readonly $ref: "#/$defs/Multibase";
950
+ };
951
+ readonly replaces: {
952
+ readonly type: "integer";
953
+ readonly minimum: 0;
954
+ };
955
+ readonly by: {
956
+ readonly type: "integer";
957
+ readonly minimum: 0;
958
+ };
959
+ };
960
+ }, {
961
+ readonly title: "LifecycleEntry";
962
+ readonly type: "object";
963
+ readonly additionalProperties: false;
964
+ readonly required: readonly ["kind", "at"];
965
+ readonly properties: {
966
+ readonly kind: {
967
+ readonly enum: readonly ["opened", "closed", "closedEarly", "cancelled"];
968
+ };
969
+ readonly at: {
970
+ readonly type: "string";
971
+ readonly format: "date-time";
972
+ };
973
+ };
974
+ }, {
975
+ readonly title: "ResultEntry";
976
+ readonly type: "object";
977
+ readonly additionalProperties: false;
978
+ readonly required: readonly ["kind", "result"];
979
+ readonly properties: {
980
+ readonly kind: {
981
+ readonly const: "result";
982
+ };
983
+ readonly result: {
984
+ readonly $ref: "#/$defs/ElectionResult";
985
+ };
986
+ };
987
+ }];
988
+ };
989
+ readonly ElectionResult: {
990
+ readonly title: "ElectionResult";
991
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
992
+ readonly type: "object";
993
+ readonly additionalProperties: false;
994
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
995
+ readonly properties: {
996
+ readonly electionId: {
997
+ readonly $ref: "#/$defs/ElectionId";
998
+ };
999
+ readonly manifestDigest: {
1000
+ readonly $ref: "#/$defs/DigestMultibase";
1001
+ };
1002
+ readonly ballotsCounted: {
1003
+ readonly type: "integer";
1004
+ readonly minimum: 0;
1005
+ };
1006
+ readonly questions: {
1007
+ readonly type: "array";
1008
+ readonly items: {
1009
+ readonly $ref: "#/$defs/QuestionResult";
1010
+ };
1011
+ };
1012
+ readonly head: {
1013
+ readonly $ref: "#/$defs/BoardHead";
1014
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
1015
+ };
1016
+ };
1017
+ };
1018
+ readonly BoardHead: {
1019
+ readonly title: "BoardHead";
1020
+ readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
1021
+ readonly type: "object";
1022
+ readonly additionalProperties: false;
1023
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
1024
+ readonly properties: {
1025
+ readonly electionId: {
1026
+ readonly $ref: "#/$defs/ElectionId";
1027
+ };
1028
+ readonly treeSize: {
1029
+ readonly type: "integer";
1030
+ readonly minimum: 0;
1031
+ };
1032
+ readonly rootHash: {
1033
+ readonly $ref: "#/$defs/DigestMultibase";
1034
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
1035
+ };
1036
+ readonly issuedAt: {
1037
+ readonly type: "string";
1038
+ readonly format: "date-time";
1039
+ };
1040
+ };
1041
+ };
1042
+ readonly ElectionId: {
1043
+ readonly title: "ElectionId";
1044
+ 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.";
1045
+ readonly type: "string";
1046
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
1047
+ };
1048
+ readonly DigestMultibase: {
1049
+ readonly title: "DigestMultibase";
1050
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
1051
+ readonly type: "string";
1052
+ readonly minLength: 16;
1053
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
1054
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
1055
+ };
1056
+ readonly QuestionResult: {
1057
+ readonly title: "QuestionResult";
1058
+ readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
1059
+ readonly type: "object";
1060
+ readonly additionalProperties: false;
1061
+ readonly required: readonly ["question", "abstained"];
1062
+ readonly properties: {
1063
+ readonly question: {
1064
+ readonly $ref: "#/$defs/Key";
1065
+ };
1066
+ readonly abstained: {
1067
+ readonly type: "integer";
1068
+ readonly minimum: 0;
1069
+ };
1070
+ readonly choice: {
1071
+ readonly type: "object";
1072
+ readonly propertyNames: {
1073
+ readonly $ref: "#/$defs/Key";
1074
+ };
1075
+ readonly additionalProperties: {
1076
+ readonly type: "integer";
1077
+ readonly minimum: 0;
1078
+ };
1079
+ };
1080
+ readonly ranking: {
1081
+ readonly type: "object";
1082
+ readonly propertyNames: {
1083
+ readonly $ref: "#/$defs/Key";
1084
+ };
1085
+ readonly additionalProperties: {
1086
+ readonly type: "array";
1087
+ readonly items: {
1088
+ readonly type: "integer";
1089
+ readonly minimum: 0;
1090
+ };
1091
+ };
1092
+ };
1093
+ readonly score: {
1094
+ readonly type: "object";
1095
+ readonly propertyNames: {
1096
+ readonly $ref: "#/$defs/Key";
1097
+ };
1098
+ readonly additionalProperties: {
1099
+ readonly type: "object";
1100
+ readonly additionalProperties: false;
1101
+ readonly required: readonly ["sum", "count"];
1102
+ readonly properties: {
1103
+ readonly sum: {
1104
+ readonly type: "integer";
1105
+ };
1106
+ readonly count: {
1107
+ readonly type: "integer";
1108
+ readonly minimum: 0;
1109
+ };
1110
+ };
1111
+ };
1112
+ };
1113
+ readonly text: {
1114
+ readonly type: "array";
1115
+ readonly items: {
1116
+ readonly type: "string";
1117
+ readonly maxLength: 4096;
1118
+ };
1119
+ };
1120
+ readonly withheld: {
1121
+ readonly type: "boolean";
1122
+ };
1123
+ };
1124
+ };
1125
+ readonly Key: {
1126
+ readonly title: "Key";
1127
+ readonly description: "A question or option key, unique within its manifest or question.";
1128
+ readonly type: "string";
1129
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
1130
+ };
1131
+ readonly Multibase: {
1132
+ readonly title: "Multibase";
1133
+ readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
1134
+ readonly type: "string";
1135
+ readonly maxLength: 16384;
1136
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1137
+ };
1138
+ readonly Cast: {
1139
+ readonly title: "Cast";
1140
+ readonly description: "A ballot and the PCS attestation that admits it (VTI-VOT-030). `attestation` is the suite's canonical encoding of the attestation made for the election point with the ballot context bound in (CONVENTIONS §3); `tag` repeats its tag so a ballot box can refuse a duplicate before the pairing check.";
1141
+ readonly type: "object";
1142
+ readonly additionalProperties: false;
1143
+ readonly required: readonly ["ballot", "tag", "attestation"];
1144
+ readonly properties: {
1145
+ readonly ballot: {
1146
+ readonly $ref: "#/$defs/Ballot";
1147
+ };
1148
+ readonly tag: {
1149
+ readonly $ref: "#/$defs/Multibase";
1150
+ };
1151
+ readonly attestation: {
1152
+ readonly $ref: "#/$defs/Multibase";
1153
+ };
1154
+ };
1155
+ };
1156
+ readonly Ballot: {
1157
+ readonly title: "Ballot";
1158
+ readonly description: "An open ballot: one answer per question of the manifest, in any order. The bytes a cast's proof binds are the RFC 8785 (JCS) canonicalization of this object as received.";
1159
+ readonly type: "object";
1160
+ readonly additionalProperties: false;
1161
+ readonly required: readonly ["electionId", "manifestDigest", "answers"];
1162
+ readonly properties: {
1163
+ readonly electionId: {
1164
+ readonly $ref: "#/$defs/ElectionId";
1165
+ };
1166
+ readonly manifestDigest: {
1167
+ readonly $ref: "#/$defs/DigestMultibase";
1168
+ };
1169
+ readonly answers: {
1170
+ readonly type: "array";
1171
+ readonly minItems: 1;
1172
+ readonly maxItems: 128;
1173
+ readonly items: {
1174
+ readonly $ref: "#/$defs/Answer";
1175
+ };
1176
+ };
1177
+ };
1178
+ };
1179
+ readonly Answer: {
1180
+ readonly title: "Answer";
1181
+ readonly description: "The answer to one question. Exactly one member besides `question` is present, matching the question's type, or `abstain` for an optional question left unanswered.";
1182
+ readonly type: "object";
1183
+ readonly additionalProperties: false;
1184
+ readonly required: readonly ["question"];
1185
+ readonly minProperties: 2;
1186
+ readonly maxProperties: 2;
1187
+ readonly properties: {
1188
+ readonly question: {
1189
+ readonly $ref: "#/$defs/Key";
1190
+ };
1191
+ readonly choice: {
1192
+ readonly type: "array";
1193
+ readonly items: {
1194
+ readonly $ref: "#/$defs/Key";
1195
+ };
1196
+ readonly uniqueItems: true;
1197
+ };
1198
+ readonly ranking: {
1199
+ readonly type: "array";
1200
+ readonly items: {
1201
+ readonly $ref: "#/$defs/Key";
1202
+ };
1203
+ readonly uniqueItems: true;
1204
+ };
1205
+ readonly scores: {
1206
+ readonly type: "object";
1207
+ readonly propertyNames: {
1208
+ readonly $ref: "#/$defs/Key";
1209
+ };
1210
+ readonly additionalProperties: {
1211
+ readonly type: "integer";
1212
+ };
1213
+ };
1214
+ readonly text: {
1215
+ readonly type: "string";
1216
+ readonly maxLength: 4096;
1217
+ };
1218
+ readonly abstain: {
1219
+ readonly const: true;
1220
+ };
1221
+ };
1222
+ };
1223
+ };
1224
+ };
1225
+ };
1226
+ /**
1227
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
1228
+ * tracks the *issuer* party's requirement because a response swaps the
1229
+ * parties (§7.3 item 5).
1230
+ */
1231
+ export declare const RESPONSE_SPEC: {
1232
+ readonly typeUri: "https://trusttasks.org/spec/voting/board/read/0.1#response";
1233
+ readonly isBearer: false;
1234
+ readonly isProofRequired: false;
1235
+ readonly isRecipientRequired: false;
1236
+ readonly isIssuedAtRequired: false;
1237
+ readonly payloadSchema: {
1238
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
1239
+ readonly $ref: "#/$defs/Response";
1240
+ readonly $defs: {
1241
+ readonly Response: {
1242
+ readonly $anchor: "response";
1243
+ readonly title: "Voting — Board Read — response payload";
1244
+ readonly type: "object";
1245
+ readonly additionalProperties: false;
1246
+ readonly required: readonly ["treeSize", "entries"];
1247
+ readonly properties: {
1248
+ readonly treeSize: {
1249
+ readonly type: "integer";
1250
+ readonly minimum: 0;
1251
+ readonly description: "The tree size the page was read against. No entry at or beyond it is returned.";
1252
+ };
1253
+ readonly entries: {
1254
+ readonly type: "array";
1255
+ readonly maxItems: 1000;
1256
+ readonly items: {
1257
+ readonly type: "object";
1258
+ readonly additionalProperties: false;
1259
+ readonly required: readonly ["index", "entry"];
1260
+ readonly properties: {
1261
+ readonly index: {
1262
+ readonly type: "integer";
1263
+ readonly minimum: 0;
1264
+ };
1265
+ readonly entry: {
1266
+ readonly $ref: "#/$defs/BoardEntry";
1267
+ };
1268
+ };
1269
+ };
1270
+ readonly description: "Consecutive entries from `from`, in board order.";
1271
+ };
1272
+ readonly next: {
1273
+ readonly type: "integer";
1274
+ readonly minimum: 1;
1275
+ readonly description: "The `from` of the next page. Absent when the page reaches `treeSize`.";
1276
+ };
1277
+ readonly ext: {
1278
+ readonly $ref: "#/$defs/Ext";
1279
+ };
1280
+ };
1281
+ };
1282
+ readonly Ext: {
1283
+ readonly title: "Ext";
1284
+ 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.";
1285
+ readonly type: "object";
1286
+ readonly minProperties: 1;
1287
+ readonly additionalProperties: true;
1288
+ readonly propertyNames: {
1289
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
1290
+ };
1291
+ };
1292
+ readonly BoardEntry: {
1293
+ readonly title: "BoardEntry";
1294
+ readonly description: "One leaf of a board. A leaf's hash is the RFC 9162 leaf hash of the JCS canonicalization of this object. Entries carry no time of arrival: the order is the board's, and a timestamp would hand anyone who reads the board the timing the registrar's log would need to pair a ticket with its cast.";
1295
+ readonly oneOf: readonly [{
1296
+ readonly title: "CastEntry";
1297
+ readonly type: "object";
1298
+ readonly additionalProperties: false;
1299
+ readonly required: readonly ["kind", "cast"];
1300
+ readonly properties: {
1301
+ readonly kind: {
1302
+ readonly const: "cast";
1303
+ };
1304
+ readonly cast: {
1305
+ readonly $ref: "#/$defs/Cast";
1306
+ };
1307
+ };
1308
+ }, {
1309
+ readonly title: "ReplacementEntry";
1310
+ readonly description: "The cast at `replaces` is no longer counted: a later cast under the same tag is.";
1311
+ readonly type: "object";
1312
+ readonly additionalProperties: false;
1313
+ readonly required: readonly ["kind", "tag", "replaces", "by"];
1314
+ readonly properties: {
1315
+ readonly kind: {
1316
+ readonly const: "replaced";
1317
+ };
1318
+ readonly tag: {
1319
+ readonly $ref: "#/$defs/Multibase";
1320
+ };
1321
+ readonly replaces: {
1322
+ readonly type: "integer";
1323
+ readonly minimum: 0;
1324
+ };
1325
+ readonly by: {
1326
+ readonly type: "integer";
1327
+ readonly minimum: 0;
1328
+ };
1329
+ };
1330
+ }, {
1331
+ readonly title: "LifecycleEntry";
1332
+ readonly type: "object";
1333
+ readonly additionalProperties: false;
1334
+ readonly required: readonly ["kind", "at"];
1335
+ readonly properties: {
1336
+ readonly kind: {
1337
+ readonly enum: readonly ["opened", "closed", "closedEarly", "cancelled"];
1338
+ };
1339
+ readonly at: {
1340
+ readonly type: "string";
1341
+ readonly format: "date-time";
1342
+ };
1343
+ };
1344
+ }, {
1345
+ readonly title: "ResultEntry";
1346
+ readonly type: "object";
1347
+ readonly additionalProperties: false;
1348
+ readonly required: readonly ["kind", "result"];
1349
+ readonly properties: {
1350
+ readonly kind: {
1351
+ readonly const: "result";
1352
+ };
1353
+ readonly result: {
1354
+ readonly $ref: "#/$defs/ElectionResult";
1355
+ };
1356
+ };
1357
+ }];
1358
+ };
1359
+ readonly ElectionResult: {
1360
+ readonly title: "ElectionResult";
1361
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
1362
+ readonly type: "object";
1363
+ readonly additionalProperties: false;
1364
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
1365
+ readonly properties: {
1366
+ readonly electionId: {
1367
+ readonly $ref: "#/$defs/ElectionId";
1368
+ };
1369
+ readonly manifestDigest: {
1370
+ readonly $ref: "#/$defs/DigestMultibase";
1371
+ };
1372
+ readonly ballotsCounted: {
1373
+ readonly type: "integer";
1374
+ readonly minimum: 0;
1375
+ };
1376
+ readonly questions: {
1377
+ readonly type: "array";
1378
+ readonly items: {
1379
+ readonly $ref: "#/$defs/QuestionResult";
1380
+ };
1381
+ };
1382
+ readonly head: {
1383
+ readonly $ref: "#/$defs/BoardHead";
1384
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
1385
+ };
1386
+ };
1387
+ };
1388
+ readonly BoardHead: {
1389
+ readonly title: "BoardHead";
1390
+ readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
1391
+ readonly type: "object";
1392
+ readonly additionalProperties: false;
1393
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
1394
+ readonly properties: {
1395
+ readonly electionId: {
1396
+ readonly $ref: "#/$defs/ElectionId";
1397
+ };
1398
+ readonly treeSize: {
1399
+ readonly type: "integer";
1400
+ readonly minimum: 0;
1401
+ };
1402
+ readonly rootHash: {
1403
+ readonly $ref: "#/$defs/DigestMultibase";
1404
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
1405
+ };
1406
+ readonly issuedAt: {
1407
+ readonly type: "string";
1408
+ readonly format: "date-time";
1409
+ };
1410
+ };
1411
+ };
1412
+ readonly ElectionId: {
1413
+ readonly title: "ElectionId";
1414
+ 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.";
1415
+ readonly type: "string";
1416
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
1417
+ };
1418
+ readonly DigestMultibase: {
1419
+ readonly title: "DigestMultibase";
1420
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
1421
+ readonly type: "string";
1422
+ readonly minLength: 16;
1423
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
1424
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
1425
+ };
1426
+ readonly QuestionResult: {
1427
+ readonly title: "QuestionResult";
1428
+ readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
1429
+ readonly type: "object";
1430
+ readonly additionalProperties: false;
1431
+ readonly required: readonly ["question", "abstained"];
1432
+ readonly properties: {
1433
+ readonly question: {
1434
+ readonly $ref: "#/$defs/Key";
1435
+ };
1436
+ readonly abstained: {
1437
+ readonly type: "integer";
1438
+ readonly minimum: 0;
1439
+ };
1440
+ readonly choice: {
1441
+ readonly type: "object";
1442
+ readonly propertyNames: {
1443
+ readonly $ref: "#/$defs/Key";
1444
+ };
1445
+ readonly additionalProperties: {
1446
+ readonly type: "integer";
1447
+ readonly minimum: 0;
1448
+ };
1449
+ };
1450
+ readonly ranking: {
1451
+ readonly type: "object";
1452
+ readonly propertyNames: {
1453
+ readonly $ref: "#/$defs/Key";
1454
+ };
1455
+ readonly additionalProperties: {
1456
+ readonly type: "array";
1457
+ readonly items: {
1458
+ readonly type: "integer";
1459
+ readonly minimum: 0;
1460
+ };
1461
+ };
1462
+ };
1463
+ readonly score: {
1464
+ readonly type: "object";
1465
+ readonly propertyNames: {
1466
+ readonly $ref: "#/$defs/Key";
1467
+ };
1468
+ readonly additionalProperties: {
1469
+ readonly type: "object";
1470
+ readonly additionalProperties: false;
1471
+ readonly required: readonly ["sum", "count"];
1472
+ readonly properties: {
1473
+ readonly sum: {
1474
+ readonly type: "integer";
1475
+ };
1476
+ readonly count: {
1477
+ readonly type: "integer";
1478
+ readonly minimum: 0;
1479
+ };
1480
+ };
1481
+ };
1482
+ };
1483
+ readonly text: {
1484
+ readonly type: "array";
1485
+ readonly items: {
1486
+ readonly type: "string";
1487
+ readonly maxLength: 4096;
1488
+ };
1489
+ };
1490
+ readonly withheld: {
1491
+ readonly type: "boolean";
1492
+ };
1493
+ };
1494
+ };
1495
+ readonly Key: {
1496
+ readonly title: "Key";
1497
+ readonly description: "A question or option key, unique within its manifest or question.";
1498
+ readonly type: "string";
1499
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
1500
+ };
1501
+ readonly Multibase: {
1502
+ readonly title: "Multibase";
1503
+ readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
1504
+ readonly type: "string";
1505
+ readonly maxLength: 16384;
1506
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1507
+ };
1508
+ readonly Cast: {
1509
+ readonly title: "Cast";
1510
+ readonly description: "A ballot and the PCS attestation that admits it (VTI-VOT-030). `attestation` is the suite's canonical encoding of the attestation made for the election point with the ballot context bound in (CONVENTIONS §3); `tag` repeats its tag so a ballot box can refuse a duplicate before the pairing check.";
1511
+ readonly type: "object";
1512
+ readonly additionalProperties: false;
1513
+ readonly required: readonly ["ballot", "tag", "attestation"];
1514
+ readonly properties: {
1515
+ readonly ballot: {
1516
+ readonly $ref: "#/$defs/Ballot";
1517
+ };
1518
+ readonly tag: {
1519
+ readonly $ref: "#/$defs/Multibase";
1520
+ };
1521
+ readonly attestation: {
1522
+ readonly $ref: "#/$defs/Multibase";
1523
+ };
1524
+ };
1525
+ };
1526
+ readonly Ballot: {
1527
+ readonly title: "Ballot";
1528
+ readonly description: "An open ballot: one answer per question of the manifest, in any order. The bytes a cast's proof binds are the RFC 8785 (JCS) canonicalization of this object as received.";
1529
+ readonly type: "object";
1530
+ readonly additionalProperties: false;
1531
+ readonly required: readonly ["electionId", "manifestDigest", "answers"];
1532
+ readonly properties: {
1533
+ readonly electionId: {
1534
+ readonly $ref: "#/$defs/ElectionId";
1535
+ };
1536
+ readonly manifestDigest: {
1537
+ readonly $ref: "#/$defs/DigestMultibase";
1538
+ };
1539
+ readonly answers: {
1540
+ readonly type: "array";
1541
+ readonly minItems: 1;
1542
+ readonly maxItems: 128;
1543
+ readonly items: {
1544
+ readonly $ref: "#/$defs/Answer";
1545
+ };
1546
+ };
1547
+ };
1548
+ };
1549
+ readonly Answer: {
1550
+ readonly title: "Answer";
1551
+ readonly description: "The answer to one question. Exactly one member besides `question` is present, matching the question's type, or `abstain` for an optional question left unanswered.";
1552
+ readonly type: "object";
1553
+ readonly additionalProperties: false;
1554
+ readonly required: readonly ["question"];
1555
+ readonly minProperties: 2;
1556
+ readonly maxProperties: 2;
1557
+ readonly properties: {
1558
+ readonly question: {
1559
+ readonly $ref: "#/$defs/Key";
1560
+ };
1561
+ readonly choice: {
1562
+ readonly type: "array";
1563
+ readonly items: {
1564
+ readonly $ref: "#/$defs/Key";
1565
+ };
1566
+ readonly uniqueItems: true;
1567
+ };
1568
+ readonly ranking: {
1569
+ readonly type: "array";
1570
+ readonly items: {
1571
+ readonly $ref: "#/$defs/Key";
1572
+ };
1573
+ readonly uniqueItems: true;
1574
+ };
1575
+ readonly scores: {
1576
+ readonly type: "object";
1577
+ readonly propertyNames: {
1578
+ readonly $ref: "#/$defs/Key";
1579
+ };
1580
+ readonly additionalProperties: {
1581
+ readonly type: "integer";
1582
+ };
1583
+ };
1584
+ readonly text: {
1585
+ readonly type: "string";
1586
+ readonly maxLength: 4096;
1587
+ };
1588
+ readonly abstain: {
1589
+ readonly const: true;
1590
+ };
1591
+ };
1592
+ };
1593
+ };
1594
+ };
1595
+ };
1596
+ //# sourceMappingURL=payload.d.ts.map