@openvtc/trust-tasks 0.26.20 → 0.26.22

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 (221) hide show
  1. package/CHANGELOG.md +84 -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.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 +24 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +24 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/voting/_shared/0.1/voting.d.ts +16 -0
  25. package/dist/voting/_shared/0.1/voting.d.ts.map +1 -0
  26. package/dist/voting/_shared/0.1/voting.js +6 -0
  27. package/dist/voting/_shared/0.1/voting.js.map +1 -0
  28. package/dist/voting/ballot/cast/0.1/payload.d.ts +887 -0
  29. package/dist/voting/ballot/cast/0.1/payload.d.ts.map +1 -0
  30. package/dist/voting/ballot/cast/0.1/payload.js +506 -0
  31. package/dist/voting/ballot/cast/0.1/payload.js.map +1 -0
  32. package/dist/voting/board/consistency/0.1/payload.d.ts +389 -0
  33. package/dist/voting/board/consistency/0.1/payload.d.ts.map +1 -0
  34. package/dist/voting/board/consistency/0.1/payload.js +218 -0
  35. package/dist/voting/board/consistency/0.1/payload.js.map +1 -0
  36. package/dist/voting/board/head/0.1/payload.d.ts +380 -0
  37. package/dist/voting/board/head/0.1/payload.d.ts.map +1 -0
  38. package/dist/voting/board/head/0.1/payload.js +224 -0
  39. package/dist/voting/board/head/0.1/payload.js.map +1 -0
  40. package/dist/voting/board/inclusion/0.1/payload.d.ts +449 -0
  41. package/dist/voting/board/inclusion/0.1/payload.d.ts.map +1 -0
  42. package/dist/voting/board/inclusion/0.1/payload.js +246 -0
  43. package/dist/voting/board/inclusion/0.1/payload.js.map +1 -0
  44. package/dist/voting/board/read/0.1/payload.d.ts +1596 -0
  45. package/dist/voting/board/read/0.1/payload.d.ts.map +1 -0
  46. package/dist/voting/board/read/0.1/payload.js +920 -0
  47. package/dist/voting/board/read/0.1/payload.js.map +1 -0
  48. package/dist/voting/election/cancel/0.1/payload.d.ts +540 -0
  49. package/dist/voting/election/cancel/0.1/payload.d.ts.map +1 -0
  50. package/dist/voting/election/cancel/0.1/payload.js +331 -0
  51. package/dist/voting/election/cancel/0.1/payload.js.map +1 -0
  52. package/dist/voting/election/close/0.1/payload.d.ts +540 -0
  53. package/dist/voting/election/close/0.1/payload.d.ts.map +1 -0
  54. package/dist/voting/election/close/0.1/payload.js +330 -0
  55. package/dist/voting/election/close/0.1/payload.js.map +1 -0
  56. package/dist/voting/election/register/0.1/payload.d.ts +1920 -0
  57. package/dist/voting/election/register/0.1/payload.d.ts.map +1 -0
  58. package/dist/voting/election/register/0.1/payload.js +1166 -0
  59. package/dist/voting/election/register/0.1/payload.js.map +1 -0
  60. package/dist/voting/election/show/0.1/payload.d.ts +1824 -0
  61. package/dist/voting/election/show/0.1/payload.d.ts.map +1 -0
  62. package/dist/voting/election/show/0.1/payload.js +1112 -0
  63. package/dist/voting/election/show/0.1/payload.js.map +1 -0
  64. package/dist/voting/result/show/0.1/payload.d.ts +849 -0
  65. package/dist/voting/result/show/0.1/payload.d.ts.map +1 -0
  66. package/dist/voting/result/show/0.1/payload.js +498 -0
  67. package/dist/voting/result/show/0.1/payload.js.map +1 -0
  68. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  69. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  70. package/dist/vta/_shared/0.4/pcs-engine.d.ts +1 -1
  71. package/dist/vta/_shared/0.4/pcs-engine.d.ts.map +1 -1
  72. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  73. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  74. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  75. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  76. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  77. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  78. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  79. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  80. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  81. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  82. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  83. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  84. package/dist/vta/pcs/applications/create/0.1/payload.d.ts +1 -1
  85. package/dist/vta/pcs/applications/create/0.1/payload.d.ts.map +1 -1
  86. package/dist/vta/pcs/applications/show/0.1/payload.d.ts +1 -1
  87. package/dist/vta/pcs/applications/show/0.1/payload.d.ts.map +1 -1
  88. package/dist/vta/pcs/attest/0.1/payload.d.ts +1 -1
  89. package/dist/vta/pcs/attest/0.1/payload.d.ts.map +1 -1
  90. package/dist/vta/pcs/prove/0.1/payload.d.ts +1 -1
  91. package/dist/vta/pcs/prove/0.1/payload.d.ts.map +1 -1
  92. package/dist/vta/pcs/root-accept/0.1/payload.d.ts +1 -1
  93. package/dist/vta/pcs/root-accept/0.1/payload.d.ts.map +1 -1
  94. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts +1 -1
  95. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts.map +1 -1
  96. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts +1 -1
  97. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts.map +1 -1
  98. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts +1 -1
  99. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts.map +1 -1
  100. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts +1 -1
  101. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts.map +1 -1
  102. package/dist/vta/pcs/vote/0.1/payload.d.ts +2208 -0
  103. package/dist/vta/pcs/vote/0.1/payload.d.ts.map +1 -0
  104. package/dist/vta/pcs/vote/0.1/payload.js +1282 -0
  105. package/dist/vta/pcs/vote/0.1/payload.js.map +1 -0
  106. package/dist/vta/pcs/voter/accept/0.1/payload.d.ts +450 -0
  107. package/dist/vta/pcs/voter/accept/0.1/payload.d.ts.map +1 -0
  108. package/dist/vta/pcs/voter/accept/0.1/payload.js +247 -0
  109. package/dist/vta/pcs/voter/accept/0.1/payload.js.map +1 -0
  110. package/dist/vta/pcs/voter/receipt/0.1/payload.d.ts +531 -0
  111. package/dist/vta/pcs/voter/receipt/0.1/payload.d.ts.map +1 -0
  112. package/dist/vta/pcs/voter/receipt/0.1/payload.js +301 -0
  113. package/dist/vta/pcs/voter/receipt/0.1/payload.js.map +1 -0
  114. package/dist/vta/pcs/voter/register/0.1/payload.d.ts +1934 -0
  115. package/dist/vta/pcs/voter/register/0.1/payload.d.ts.map +1 -0
  116. package/dist/vta/pcs/voter/register/0.1/payload.js +1133 -0
  117. package/dist/vta/pcs/voter/register/0.1/payload.js.map +1 -0
  118. package/dist/vtc/directory/card/present/0.1/payload.d.ts +2 -2
  119. package/dist/vtc/directory/card/present/0.1/payload.js +1 -1
  120. package/dist/vtc/directory/card/present/0.1/payload.js.map +1 -1
  121. package/dist/vtc/elections/cancel/0.1/payload.d.ts +301 -0
  122. package/dist/vtc/elections/cancel/0.1/payload.d.ts.map +1 -0
  123. package/dist/vtc/elections/cancel/0.1/payload.js +183 -0
  124. package/dist/vtc/elections/cancel/0.1/payload.js.map +1 -0
  125. package/dist/vtc/elections/certify/0.1/payload.d.ts +914 -0
  126. package/dist/vtc/elections/certify/0.1/payload.d.ts.map +1 -0
  127. package/dist/vtc/elections/certify/0.1/payload.js +512 -0
  128. package/dist/vtc/elections/certify/0.1/payload.js.map +1 -0
  129. package/dist/vtc/elections/close/0.1/payload.d.ts +301 -0
  130. package/dist/vtc/elections/close/0.1/payload.d.ts.map +1 -0
  131. package/dist/vtc/elections/close/0.1/payload.js +182 -0
  132. package/dist/vtc/elections/close/0.1/payload.js.map +1 -0
  133. package/dist/vtc/elections/create/0.1/payload.d.ts +1656 -0
  134. package/dist/vtc/elections/create/0.1/payload.d.ts.map +1 -0
  135. package/dist/vtc/elections/create/0.1/payload.js +994 -0
  136. package/dist/vtc/elections/create/0.1/payload.js.map +1 -0
  137. package/dist/vtc/elections/list/0.1/payload.d.ts +521 -0
  138. package/dist/vtc/elections/list/0.1/payload.d.ts.map +1 -0
  139. package/dist/vtc/elections/list/0.1/payload.js +290 -0
  140. package/dist/vtc/elections/list/0.1/payload.js.map +1 -0
  141. package/dist/vtc/elections/show/0.1/payload.d.ts +2688 -0
  142. package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -0
  143. package/dist/vtc/elections/show/0.1/payload.js +1581 -0
  144. package/dist/vtc/elections/show/0.1/payload.js.map +1 -0
  145. package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts +597 -0
  146. package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts.map +1 -0
  147. package/dist/vtc/elections/tickets/issue/0.1/payload.js +318 -0
  148. package/dist/vtc/elections/tickets/issue/0.1/payload.js.map +1 -0
  149. package/dist/vtc/groups/create/0.1/payload.d.ts +4 -4
  150. package/dist/vtc/groups/create/0.1/payload.js +2 -2
  151. package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
  152. package/dist/vtc/groups/list/0.1/payload.d.ts +4 -4
  153. package/dist/vtc/groups/list/0.1/payload.js +2 -2
  154. package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
  155. package/dist/vtc/groups/managers/add/0.1/payload.d.ts +337 -0
  156. package/dist/vtc/groups/managers/add/0.1/payload.d.ts.map +1 -0
  157. package/dist/vtc/groups/managers/add/0.1/payload.js +184 -0
  158. package/dist/vtc/groups/managers/add/0.1/payload.js.map +1 -0
  159. package/dist/vtc/groups/managers/remove/0.1/payload.d.ts +337 -0
  160. package/dist/vtc/groups/managers/remove/0.1/payload.d.ts.map +1 -0
  161. package/dist/vtc/groups/managers/remove/0.1/payload.js +184 -0
  162. package/dist/vtc/groups/managers/remove/0.1/payload.js.map +1 -0
  163. package/dist/vtc/groups/show/0.1/payload.d.ts +4 -4
  164. package/dist/vtc/groups/show/0.1/payload.js +2 -2
  165. package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
  166. package/dist/vtc/groups/update/0.1/payload.d.ts +4 -4
  167. package/dist/vtc/groups/update/0.1/payload.js +2 -2
  168. package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
  169. package/package.json +1 -1
  170. package/src/_shared/components.ts +332 -17
  171. package/src/device/list/0.1/payload.ts +4 -2
  172. package/src/device/list/0.2/payload.ts +4 -2
  173. package/src/device/register/0.1/payload.ts +4 -2
  174. package/src/device/register/0.2/payload.ts +4 -2
  175. package/src/index.ts +24 -0
  176. package/src/voting/_shared/0.1/voting.ts +17 -0
  177. package/src/voting/ballot/cast/0.1/payload.ts +560 -0
  178. package/src/voting/board/consistency/0.1/payload.ts +264 -0
  179. package/src/voting/board/head/0.1/payload.ts +257 -0
  180. package/src/voting/board/inclusion/0.1/payload.ts +300 -0
  181. package/src/voting/board/read/0.1/payload.ts +981 -0
  182. package/src/voting/election/cancel/0.1/payload.ts +368 -0
  183. package/src/voting/election/close/0.1/payload.ts +367 -0
  184. package/src/voting/election/register/0.1/payload.ts +1207 -0
  185. package/src/voting/election/show/0.1/payload.ts +1149 -0
  186. package/src/voting/result/show/0.1/payload.ts +536 -0
  187. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  188. package/src/vta/_shared/0.4/pcs-engine.ts +1 -1
  189. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  190. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  191. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  192. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  193. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  194. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
  195. package/src/vta/pcs/applications/create/0.1/payload.ts +1 -1
  196. package/src/vta/pcs/applications/show/0.1/payload.ts +1 -1
  197. package/src/vta/pcs/attest/0.1/payload.ts +1 -1
  198. package/src/vta/pcs/prove/0.1/payload.ts +1 -1
  199. package/src/vta/pcs/root-accept/0.1/payload.ts +1 -1
  200. package/src/vta/pcs/tokens/abandon/0.1/payload.ts +1 -1
  201. package/src/vta/pcs/tokens/accept/0.1/payload.ts +1 -1
  202. package/src/vta/pcs/verify-attestation/0.1/payload.ts +1 -1
  203. package/src/vta/pcs/vetter/show/0.1/payload.ts +1 -1
  204. package/src/vta/pcs/vote/0.1/payload.ts +1365 -0
  205. package/src/vta/pcs/voter/accept/0.1/payload.ts +306 -0
  206. package/src/vta/pcs/voter/receipt/0.1/payload.ts +367 -0
  207. package/src/vta/pcs/voter/register/0.1/payload.ts +1211 -0
  208. package/src/vtc/directory/card/present/0.1/payload.ts +1 -1
  209. package/src/vtc/elections/cancel/0.1/payload.ts +223 -0
  210. package/src/vtc/elections/certify/0.1/payload.ts +565 -0
  211. package/src/vtc/elections/close/0.1/payload.ts +222 -0
  212. package/src/vtc/elections/create/0.1/payload.ts +1041 -0
  213. package/src/vtc/elections/list/0.1/payload.ts +371 -0
  214. package/src/vtc/elections/show/0.1/payload.ts +1671 -0
  215. package/src/vtc/elections/tickets/issue/0.1/payload.ts +394 -0
  216. package/src/vtc/groups/create/0.1/payload.ts +2 -2
  217. package/src/vtc/groups/list/0.1/payload.ts +2 -2
  218. package/src/vtc/groups/managers/add/0.1/payload.ts +230 -0
  219. package/src/vtc/groups/managers/remove/0.1/payload.ts +230 -0
  220. package/src/vtc/groups/show/0.1/payload.ts +2 -2
  221. package/src/vtc/groups/update/0.1/payload.ts +2 -2
@@ -0,0 +1,849 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/voting/result/show/0.1/payload.schema.json
4
+ */
5
+ import type { BoardHead, DigestMultibase, ElectionId, ElectionResult, ElectionState, Ext, Key_VotingV0_1 as Key, QuestionResult } from "../../../../_shared/components.js";
6
+ /**
7
+ * Reads an election's result once tallied, or its running totals while voting is open where the manifest allows them.
8
+ */
9
+ export interface VotingResultShowPayload {
10
+ /**
11
+ * The community's DID.
12
+ */
13
+ community: string;
14
+ electionId: ElectionId;
15
+ ext?: Ext;
16
+ }
17
+ export interface VotingResultShowResponsePayload {
18
+ result: ElectionResult;
19
+ /**
20
+ * True for running totals of an election still open for voting; false for the result the ballot box tallied after close.
21
+ */
22
+ provisional: boolean;
23
+ state: ElectionState;
24
+ ext?: Ext;
25
+ }
26
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
27
+ export type { BoardHead, DigestMultibase, ElectionId, ElectionResult, ElectionState, Ext, Key, QuestionResult };
28
+ /** Trust Task type URI. */
29
+ export declare const TYPE_URI: "https://trusttasks.org/spec/voting/result/show/0.1";
30
+ /** Stable alias for this specification's request payload shape. */
31
+ export type Payload = VotingResultShowPayload;
32
+ /** Trust Task response type URI (request type URI + "#response"). */
33
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/voting/result/show/0.1#response";
34
+ /** Stable alias for this specification's success-response payload shape. */
35
+ export type Response = VotingResultShowResponsePayload;
36
+ /**
37
+ * This specification's payload schema, as a value.
38
+ *
39
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
40
+ * rather than only as a `.json` file because TypeScript types are erased
41
+ * at runtime: without a schema a consumer has nothing to validate, and
42
+ * every REQUIRED payload member is optional in practice. Cross-file
43
+ * `$ref`s are already inlined, so it needs no resolver.
44
+ */
45
+ export declare const PAYLOAD_SCHEMA: {
46
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
47
+ readonly $id: "https://trusttasks.org/spec/voting/result/show/0.1";
48
+ readonly title: "Voting — Result Show — payload";
49
+ readonly description: "Reads an election's result once tallied, or its running totals while voting is open where the manifest allows them.";
50
+ readonly type: "object";
51
+ readonly additionalProperties: false;
52
+ readonly required: readonly ["community", "electionId"];
53
+ readonly properties: {
54
+ readonly community: {
55
+ readonly type: "string";
56
+ readonly minLength: 1;
57
+ readonly maxLength: 2048;
58
+ readonly description: "The community's DID.";
59
+ };
60
+ readonly electionId: {
61
+ readonly $ref: "#/$defs/ElectionId";
62
+ };
63
+ readonly ext: {
64
+ readonly $ref: "#/$defs/Ext";
65
+ };
66
+ };
67
+ readonly $defs: {
68
+ readonly Response: {
69
+ readonly $anchor: "response";
70
+ readonly title: "Voting — Result Show — response payload";
71
+ readonly type: "object";
72
+ readonly additionalProperties: false;
73
+ readonly required: readonly ["result", "provisional", "state"];
74
+ readonly properties: {
75
+ readonly result: {
76
+ readonly $ref: "#/$defs/ElectionResult";
77
+ };
78
+ readonly provisional: {
79
+ readonly type: "boolean";
80
+ readonly description: "True for running totals of an election still open for voting; false for the result the ballot box tallied after close.";
81
+ };
82
+ readonly state: {
83
+ readonly $ref: "#/$defs/ElectionState";
84
+ };
85
+ readonly ext: {
86
+ readonly $ref: "#/$defs/Ext";
87
+ };
88
+ };
89
+ };
90
+ readonly Ext: {
91
+ readonly title: "Ext";
92
+ 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.";
93
+ readonly type: "object";
94
+ readonly minProperties: 1;
95
+ readonly additionalProperties: true;
96
+ readonly propertyNames: {
97
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
98
+ };
99
+ };
100
+ readonly ElectionState: {
101
+ readonly title: "ElectionState";
102
+ readonly type: "string";
103
+ readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
104
+ };
105
+ readonly ElectionResult: {
106
+ readonly title: "ElectionResult";
107
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
108
+ readonly type: "object";
109
+ readonly additionalProperties: false;
110
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
111
+ readonly properties: {
112
+ readonly electionId: {
113
+ readonly $ref: "#/$defs/ElectionId";
114
+ };
115
+ readonly manifestDigest: {
116
+ readonly $ref: "#/$defs/DigestMultibase";
117
+ };
118
+ readonly ballotsCounted: {
119
+ readonly type: "integer";
120
+ readonly minimum: 0;
121
+ };
122
+ readonly questions: {
123
+ readonly type: "array";
124
+ readonly items: {
125
+ readonly $ref: "#/$defs/QuestionResult";
126
+ };
127
+ };
128
+ readonly head: {
129
+ readonly $ref: "#/$defs/BoardHead";
130
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
131
+ };
132
+ };
133
+ };
134
+ readonly BoardHead: {
135
+ readonly title: "BoardHead";
136
+ 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.";
137
+ readonly type: "object";
138
+ readonly additionalProperties: false;
139
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
140
+ readonly properties: {
141
+ readonly electionId: {
142
+ readonly $ref: "#/$defs/ElectionId";
143
+ };
144
+ readonly treeSize: {
145
+ readonly type: "integer";
146
+ readonly minimum: 0;
147
+ };
148
+ readonly rootHash: {
149
+ readonly $ref: "#/$defs/DigestMultibase";
150
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
151
+ };
152
+ readonly issuedAt: {
153
+ readonly type: "string";
154
+ readonly format: "date-time";
155
+ };
156
+ };
157
+ };
158
+ readonly ElectionId: {
159
+ readonly title: "ElectionId";
160
+ 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.";
161
+ readonly type: "string";
162
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
163
+ };
164
+ readonly DigestMultibase: {
165
+ readonly title: "DigestMultibase";
166
+ 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`.";
167
+ readonly type: "string";
168
+ readonly minLength: 16;
169
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
170
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
171
+ };
172
+ readonly QuestionResult: {
173
+ readonly title: "QuestionResult";
174
+ 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.";
175
+ readonly type: "object";
176
+ readonly additionalProperties: false;
177
+ readonly required: readonly ["question", "abstained"];
178
+ readonly properties: {
179
+ readonly question: {
180
+ readonly $ref: "#/$defs/Key";
181
+ };
182
+ readonly abstained: {
183
+ readonly type: "integer";
184
+ readonly minimum: 0;
185
+ };
186
+ readonly choice: {
187
+ readonly type: "object";
188
+ readonly propertyNames: {
189
+ readonly $ref: "#/$defs/Key";
190
+ };
191
+ readonly additionalProperties: {
192
+ readonly type: "integer";
193
+ readonly minimum: 0;
194
+ };
195
+ };
196
+ readonly ranking: {
197
+ readonly type: "object";
198
+ readonly propertyNames: {
199
+ readonly $ref: "#/$defs/Key";
200
+ };
201
+ readonly additionalProperties: {
202
+ readonly type: "array";
203
+ readonly items: {
204
+ readonly type: "integer";
205
+ readonly minimum: 0;
206
+ };
207
+ };
208
+ };
209
+ readonly score: {
210
+ readonly type: "object";
211
+ readonly propertyNames: {
212
+ readonly $ref: "#/$defs/Key";
213
+ };
214
+ readonly additionalProperties: {
215
+ readonly type: "object";
216
+ readonly additionalProperties: false;
217
+ readonly required: readonly ["sum", "count"];
218
+ readonly properties: {
219
+ readonly sum: {
220
+ readonly type: "integer";
221
+ };
222
+ readonly count: {
223
+ readonly type: "integer";
224
+ readonly minimum: 0;
225
+ };
226
+ };
227
+ };
228
+ };
229
+ readonly text: {
230
+ readonly type: "array";
231
+ readonly items: {
232
+ readonly type: "string";
233
+ readonly maxLength: 4096;
234
+ };
235
+ };
236
+ readonly withheld: {
237
+ readonly type: "boolean";
238
+ };
239
+ };
240
+ };
241
+ readonly Key: {
242
+ readonly title: "Key";
243
+ readonly description: "A question or option key, unique within its manifest or question.";
244
+ readonly type: "string";
245
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
246
+ };
247
+ };
248
+ };
249
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
250
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
251
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
252
+ readonly $ref: "#/$defs/Response";
253
+ readonly $defs: {
254
+ readonly Response: {
255
+ readonly $anchor: "response";
256
+ readonly title: "Voting — Result Show — response payload";
257
+ readonly type: "object";
258
+ readonly additionalProperties: false;
259
+ readonly required: readonly ["result", "provisional", "state"];
260
+ readonly properties: {
261
+ readonly result: {
262
+ readonly $ref: "#/$defs/ElectionResult";
263
+ };
264
+ readonly provisional: {
265
+ readonly type: "boolean";
266
+ readonly description: "True for running totals of an election still open for voting; false for the result the ballot box tallied after close.";
267
+ };
268
+ readonly state: {
269
+ readonly $ref: "#/$defs/ElectionState";
270
+ };
271
+ readonly ext: {
272
+ readonly $ref: "#/$defs/Ext";
273
+ };
274
+ };
275
+ };
276
+ readonly Ext: {
277
+ readonly title: "Ext";
278
+ 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.";
279
+ readonly type: "object";
280
+ readonly minProperties: 1;
281
+ readonly additionalProperties: true;
282
+ readonly propertyNames: {
283
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
284
+ };
285
+ };
286
+ readonly ElectionState: {
287
+ readonly title: "ElectionState";
288
+ readonly type: "string";
289
+ readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
290
+ };
291
+ readonly ElectionResult: {
292
+ readonly title: "ElectionResult";
293
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
294
+ readonly type: "object";
295
+ readonly additionalProperties: false;
296
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
297
+ readonly properties: {
298
+ readonly electionId: {
299
+ readonly $ref: "#/$defs/ElectionId";
300
+ };
301
+ readonly manifestDigest: {
302
+ readonly $ref: "#/$defs/DigestMultibase";
303
+ };
304
+ readonly ballotsCounted: {
305
+ readonly type: "integer";
306
+ readonly minimum: 0;
307
+ };
308
+ readonly questions: {
309
+ readonly type: "array";
310
+ readonly items: {
311
+ readonly $ref: "#/$defs/QuestionResult";
312
+ };
313
+ };
314
+ readonly head: {
315
+ readonly $ref: "#/$defs/BoardHead";
316
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
317
+ };
318
+ };
319
+ };
320
+ readonly BoardHead: {
321
+ readonly title: "BoardHead";
322
+ 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.";
323
+ readonly type: "object";
324
+ readonly additionalProperties: false;
325
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
326
+ readonly properties: {
327
+ readonly electionId: {
328
+ readonly $ref: "#/$defs/ElectionId";
329
+ };
330
+ readonly treeSize: {
331
+ readonly type: "integer";
332
+ readonly minimum: 0;
333
+ };
334
+ readonly rootHash: {
335
+ readonly $ref: "#/$defs/DigestMultibase";
336
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
337
+ };
338
+ readonly issuedAt: {
339
+ readonly type: "string";
340
+ readonly format: "date-time";
341
+ };
342
+ };
343
+ };
344
+ readonly ElectionId: {
345
+ readonly title: "ElectionId";
346
+ 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.";
347
+ readonly type: "string";
348
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
349
+ };
350
+ readonly DigestMultibase: {
351
+ readonly title: "DigestMultibase";
352
+ 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`.";
353
+ readonly type: "string";
354
+ readonly minLength: 16;
355
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
356
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
357
+ };
358
+ readonly QuestionResult: {
359
+ readonly title: "QuestionResult";
360
+ 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.";
361
+ readonly type: "object";
362
+ readonly additionalProperties: false;
363
+ readonly required: readonly ["question", "abstained"];
364
+ readonly properties: {
365
+ readonly question: {
366
+ readonly $ref: "#/$defs/Key";
367
+ };
368
+ readonly abstained: {
369
+ readonly type: "integer";
370
+ readonly minimum: 0;
371
+ };
372
+ readonly choice: {
373
+ readonly type: "object";
374
+ readonly propertyNames: {
375
+ readonly $ref: "#/$defs/Key";
376
+ };
377
+ readonly additionalProperties: {
378
+ readonly type: "integer";
379
+ readonly minimum: 0;
380
+ };
381
+ };
382
+ readonly ranking: {
383
+ readonly type: "object";
384
+ readonly propertyNames: {
385
+ readonly $ref: "#/$defs/Key";
386
+ };
387
+ readonly additionalProperties: {
388
+ readonly type: "array";
389
+ readonly items: {
390
+ readonly type: "integer";
391
+ readonly minimum: 0;
392
+ };
393
+ };
394
+ };
395
+ readonly score: {
396
+ readonly type: "object";
397
+ readonly propertyNames: {
398
+ readonly $ref: "#/$defs/Key";
399
+ };
400
+ readonly additionalProperties: {
401
+ readonly type: "object";
402
+ readonly additionalProperties: false;
403
+ readonly required: readonly ["sum", "count"];
404
+ readonly properties: {
405
+ readonly sum: {
406
+ readonly type: "integer";
407
+ };
408
+ readonly count: {
409
+ readonly type: "integer";
410
+ readonly minimum: 0;
411
+ };
412
+ };
413
+ };
414
+ };
415
+ readonly text: {
416
+ readonly type: "array";
417
+ readonly items: {
418
+ readonly type: "string";
419
+ readonly maxLength: 4096;
420
+ };
421
+ };
422
+ readonly withheld: {
423
+ readonly type: "boolean";
424
+ };
425
+ };
426
+ };
427
+ readonly Key: {
428
+ readonly title: "Key";
429
+ readonly description: "A question or option key, unique within its manifest or question.";
430
+ readonly type: "string";
431
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
432
+ };
433
+ };
434
+ };
435
+ /**
436
+ * SPEC.md §7.2 policy for the request variant, from this specification's
437
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
438
+ * per-specification and cannot be derived from the document alone, and
439
+ * item 2 needs the schema this carries.
440
+ */
441
+ export declare const SPEC: {
442
+ readonly typeUri: "https://trusttasks.org/spec/voting/result/show/0.1";
443
+ readonly isBearer: false;
444
+ readonly isProofRequired: false;
445
+ readonly isRecipientRequired: true;
446
+ readonly isIssuedAtRequired: false;
447
+ readonly payloadSchema: {
448
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
449
+ readonly $id: "https://trusttasks.org/spec/voting/result/show/0.1";
450
+ readonly title: "Voting — Result Show — payload";
451
+ readonly description: "Reads an election's result once tallied, or its running totals while voting is open where the manifest allows them.";
452
+ readonly type: "object";
453
+ readonly additionalProperties: false;
454
+ readonly required: readonly ["community", "electionId"];
455
+ readonly properties: {
456
+ readonly community: {
457
+ readonly type: "string";
458
+ readonly minLength: 1;
459
+ readonly maxLength: 2048;
460
+ readonly description: "The community's DID.";
461
+ };
462
+ readonly electionId: {
463
+ readonly $ref: "#/$defs/ElectionId";
464
+ };
465
+ readonly ext: {
466
+ readonly $ref: "#/$defs/Ext";
467
+ };
468
+ };
469
+ readonly $defs: {
470
+ readonly Response: {
471
+ readonly $anchor: "response";
472
+ readonly title: "Voting — Result Show — response payload";
473
+ readonly type: "object";
474
+ readonly additionalProperties: false;
475
+ readonly required: readonly ["result", "provisional", "state"];
476
+ readonly properties: {
477
+ readonly result: {
478
+ readonly $ref: "#/$defs/ElectionResult";
479
+ };
480
+ readonly provisional: {
481
+ readonly type: "boolean";
482
+ readonly description: "True for running totals of an election still open for voting; false for the result the ballot box tallied after close.";
483
+ };
484
+ readonly state: {
485
+ readonly $ref: "#/$defs/ElectionState";
486
+ };
487
+ readonly ext: {
488
+ readonly $ref: "#/$defs/Ext";
489
+ };
490
+ };
491
+ };
492
+ readonly Ext: {
493
+ readonly title: "Ext";
494
+ 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.";
495
+ readonly type: "object";
496
+ readonly minProperties: 1;
497
+ readonly additionalProperties: true;
498
+ readonly propertyNames: {
499
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
500
+ };
501
+ };
502
+ readonly ElectionState: {
503
+ readonly title: "ElectionState";
504
+ readonly type: "string";
505
+ readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
506
+ };
507
+ readonly ElectionResult: {
508
+ readonly title: "ElectionResult";
509
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
510
+ readonly type: "object";
511
+ readonly additionalProperties: false;
512
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
513
+ readonly properties: {
514
+ readonly electionId: {
515
+ readonly $ref: "#/$defs/ElectionId";
516
+ };
517
+ readonly manifestDigest: {
518
+ readonly $ref: "#/$defs/DigestMultibase";
519
+ };
520
+ readonly ballotsCounted: {
521
+ readonly type: "integer";
522
+ readonly minimum: 0;
523
+ };
524
+ readonly questions: {
525
+ readonly type: "array";
526
+ readonly items: {
527
+ readonly $ref: "#/$defs/QuestionResult";
528
+ };
529
+ };
530
+ readonly head: {
531
+ readonly $ref: "#/$defs/BoardHead";
532
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
533
+ };
534
+ };
535
+ };
536
+ readonly BoardHead: {
537
+ readonly title: "BoardHead";
538
+ 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.";
539
+ readonly type: "object";
540
+ readonly additionalProperties: false;
541
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
542
+ readonly properties: {
543
+ readonly electionId: {
544
+ readonly $ref: "#/$defs/ElectionId";
545
+ };
546
+ readonly treeSize: {
547
+ readonly type: "integer";
548
+ readonly minimum: 0;
549
+ };
550
+ readonly rootHash: {
551
+ readonly $ref: "#/$defs/DigestMultibase";
552
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
553
+ };
554
+ readonly issuedAt: {
555
+ readonly type: "string";
556
+ readonly format: "date-time";
557
+ };
558
+ };
559
+ };
560
+ readonly ElectionId: {
561
+ readonly title: "ElectionId";
562
+ 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.";
563
+ readonly type: "string";
564
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
565
+ };
566
+ readonly DigestMultibase: {
567
+ readonly title: "DigestMultibase";
568
+ 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`.";
569
+ readonly type: "string";
570
+ readonly minLength: 16;
571
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
572
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
573
+ };
574
+ readonly QuestionResult: {
575
+ readonly title: "QuestionResult";
576
+ 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.";
577
+ readonly type: "object";
578
+ readonly additionalProperties: false;
579
+ readonly required: readonly ["question", "abstained"];
580
+ readonly properties: {
581
+ readonly question: {
582
+ readonly $ref: "#/$defs/Key";
583
+ };
584
+ readonly abstained: {
585
+ readonly type: "integer";
586
+ readonly minimum: 0;
587
+ };
588
+ readonly choice: {
589
+ readonly type: "object";
590
+ readonly propertyNames: {
591
+ readonly $ref: "#/$defs/Key";
592
+ };
593
+ readonly additionalProperties: {
594
+ readonly type: "integer";
595
+ readonly minimum: 0;
596
+ };
597
+ };
598
+ readonly ranking: {
599
+ readonly type: "object";
600
+ readonly propertyNames: {
601
+ readonly $ref: "#/$defs/Key";
602
+ };
603
+ readonly additionalProperties: {
604
+ readonly type: "array";
605
+ readonly items: {
606
+ readonly type: "integer";
607
+ readonly minimum: 0;
608
+ };
609
+ };
610
+ };
611
+ readonly score: {
612
+ readonly type: "object";
613
+ readonly propertyNames: {
614
+ readonly $ref: "#/$defs/Key";
615
+ };
616
+ readonly additionalProperties: {
617
+ readonly type: "object";
618
+ readonly additionalProperties: false;
619
+ readonly required: readonly ["sum", "count"];
620
+ readonly properties: {
621
+ readonly sum: {
622
+ readonly type: "integer";
623
+ };
624
+ readonly count: {
625
+ readonly type: "integer";
626
+ readonly minimum: 0;
627
+ };
628
+ };
629
+ };
630
+ };
631
+ readonly text: {
632
+ readonly type: "array";
633
+ readonly items: {
634
+ readonly type: "string";
635
+ readonly maxLength: 4096;
636
+ };
637
+ };
638
+ readonly withheld: {
639
+ readonly type: "boolean";
640
+ };
641
+ };
642
+ };
643
+ readonly Key: {
644
+ readonly title: "Key";
645
+ readonly description: "A question or option key, unique within its manifest or question.";
646
+ readonly type: "string";
647
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
648
+ };
649
+ };
650
+ };
651
+ };
652
+ /**
653
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
654
+ * tracks the *issuer* party's requirement because a response swaps the
655
+ * parties (§7.3 item 5).
656
+ */
657
+ export declare const RESPONSE_SPEC: {
658
+ readonly typeUri: "https://trusttasks.org/spec/voting/result/show/0.1#response";
659
+ readonly isBearer: false;
660
+ readonly isProofRequired: true;
661
+ readonly isRecipientRequired: false;
662
+ readonly isIssuedAtRequired: false;
663
+ readonly payloadSchema: {
664
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
665
+ readonly $ref: "#/$defs/Response";
666
+ readonly $defs: {
667
+ readonly Response: {
668
+ readonly $anchor: "response";
669
+ readonly title: "Voting — Result Show — response payload";
670
+ readonly type: "object";
671
+ readonly additionalProperties: false;
672
+ readonly required: readonly ["result", "provisional", "state"];
673
+ readonly properties: {
674
+ readonly result: {
675
+ readonly $ref: "#/$defs/ElectionResult";
676
+ };
677
+ readonly provisional: {
678
+ readonly type: "boolean";
679
+ readonly description: "True for running totals of an election still open for voting; false for the result the ballot box tallied after close.";
680
+ };
681
+ readonly state: {
682
+ readonly $ref: "#/$defs/ElectionState";
683
+ };
684
+ readonly ext: {
685
+ readonly $ref: "#/$defs/Ext";
686
+ };
687
+ };
688
+ };
689
+ readonly Ext: {
690
+ readonly title: "Ext";
691
+ 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.";
692
+ readonly type: "object";
693
+ readonly minProperties: 1;
694
+ readonly additionalProperties: true;
695
+ readonly propertyNames: {
696
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
697
+ };
698
+ };
699
+ readonly ElectionState: {
700
+ readonly title: "ElectionState";
701
+ readonly type: "string";
702
+ readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
703
+ };
704
+ readonly ElectionResult: {
705
+ readonly title: "ElectionResult";
706
+ readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
707
+ readonly type: "object";
708
+ readonly additionalProperties: false;
709
+ readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
710
+ readonly properties: {
711
+ readonly electionId: {
712
+ readonly $ref: "#/$defs/ElectionId";
713
+ };
714
+ readonly manifestDigest: {
715
+ readonly $ref: "#/$defs/DigestMultibase";
716
+ };
717
+ readonly ballotsCounted: {
718
+ readonly type: "integer";
719
+ readonly minimum: 0;
720
+ };
721
+ readonly questions: {
722
+ readonly type: "array";
723
+ readonly items: {
724
+ readonly $ref: "#/$defs/QuestionResult";
725
+ };
726
+ };
727
+ readonly head: {
728
+ readonly $ref: "#/$defs/BoardHead";
729
+ readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
730
+ };
731
+ };
732
+ };
733
+ readonly BoardHead: {
734
+ readonly title: "BoardHead";
735
+ 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.";
736
+ readonly type: "object";
737
+ readonly additionalProperties: false;
738
+ readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
739
+ readonly properties: {
740
+ readonly electionId: {
741
+ readonly $ref: "#/$defs/ElectionId";
742
+ };
743
+ readonly treeSize: {
744
+ readonly type: "integer";
745
+ readonly minimum: 0;
746
+ };
747
+ readonly rootHash: {
748
+ readonly $ref: "#/$defs/DigestMultibase";
749
+ readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
750
+ };
751
+ readonly issuedAt: {
752
+ readonly type: "string";
753
+ readonly format: "date-time";
754
+ };
755
+ };
756
+ };
757
+ readonly ElectionId: {
758
+ readonly title: "ElectionId";
759
+ 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.";
760
+ readonly type: "string";
761
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
762
+ };
763
+ readonly DigestMultibase: {
764
+ readonly title: "DigestMultibase";
765
+ 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`.";
766
+ readonly type: "string";
767
+ readonly minLength: 16;
768
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
769
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
770
+ };
771
+ readonly QuestionResult: {
772
+ readonly title: "QuestionResult";
773
+ 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.";
774
+ readonly type: "object";
775
+ readonly additionalProperties: false;
776
+ readonly required: readonly ["question", "abstained"];
777
+ readonly properties: {
778
+ readonly question: {
779
+ readonly $ref: "#/$defs/Key";
780
+ };
781
+ readonly abstained: {
782
+ readonly type: "integer";
783
+ readonly minimum: 0;
784
+ };
785
+ readonly choice: {
786
+ readonly type: "object";
787
+ readonly propertyNames: {
788
+ readonly $ref: "#/$defs/Key";
789
+ };
790
+ readonly additionalProperties: {
791
+ readonly type: "integer";
792
+ readonly minimum: 0;
793
+ };
794
+ };
795
+ readonly ranking: {
796
+ readonly type: "object";
797
+ readonly propertyNames: {
798
+ readonly $ref: "#/$defs/Key";
799
+ };
800
+ readonly additionalProperties: {
801
+ readonly type: "array";
802
+ readonly items: {
803
+ readonly type: "integer";
804
+ readonly minimum: 0;
805
+ };
806
+ };
807
+ };
808
+ readonly score: {
809
+ readonly type: "object";
810
+ readonly propertyNames: {
811
+ readonly $ref: "#/$defs/Key";
812
+ };
813
+ readonly additionalProperties: {
814
+ readonly type: "object";
815
+ readonly additionalProperties: false;
816
+ readonly required: readonly ["sum", "count"];
817
+ readonly properties: {
818
+ readonly sum: {
819
+ readonly type: "integer";
820
+ };
821
+ readonly count: {
822
+ readonly type: "integer";
823
+ readonly minimum: 0;
824
+ };
825
+ };
826
+ };
827
+ };
828
+ readonly text: {
829
+ readonly type: "array";
830
+ readonly items: {
831
+ readonly type: "string";
832
+ readonly maxLength: 4096;
833
+ };
834
+ };
835
+ readonly withheld: {
836
+ readonly type: "boolean";
837
+ };
838
+ };
839
+ };
840
+ readonly Key: {
841
+ readonly title: "Key";
842
+ readonly description: "A question or option key, unique within its manifest or question.";
843
+ readonly type: "string";
844
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
845
+ };
846
+ };
847
+ };
848
+ };
849
+ //# sourceMappingURL=payload.d.ts.map