@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,389 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/voting/board/consistency/0.1/payload.schema.json
4
+ */
5
+ import type { DigestMultibase, ElectionId, Ext, MerklePath } from "../../../../_shared/components.js";
6
+ /**
7
+ * Asks for an RFC 9162 consistency proof that the board of one size is a prefix of the board of a larger size.
8
+ */
9
+ export interface VotingBoardConsistencyPayload {
10
+ /**
11
+ * The community's DID.
12
+ */
13
+ community: string;
14
+ electionId: ElectionId;
15
+ /**
16
+ * The size of the earlier head.
17
+ */
18
+ firstSize: number;
19
+ /**
20
+ * The size of the later head. At least `firstSize`, at most the current size.
21
+ */
22
+ secondSize: number;
23
+ ext?: Ext;
24
+ }
25
+ export interface VotingBoardConsistencyResponsePayload {
26
+ firstSize: number;
27
+ secondSize: number;
28
+ /**
29
+ * The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal.
30
+ */
31
+ path: MerklePath;
32
+ ext?: Ext;
33
+ }
34
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
35
+ export type { DigestMultibase, ElectionId, Ext, MerklePath };
36
+ /** Trust Task type URI. */
37
+ export declare const TYPE_URI: "https://trusttasks.org/spec/voting/board/consistency/0.1";
38
+ /** Stable alias for this specification's request payload shape. */
39
+ export type Payload = VotingBoardConsistencyPayload;
40
+ /** Trust Task response type URI (request type URI + "#response"). */
41
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/voting/board/consistency/0.1#response";
42
+ /** Stable alias for this specification's success-response payload shape. */
43
+ export type Response = VotingBoardConsistencyResponsePayload;
44
+ /**
45
+ * This specification's payload schema, as a value.
46
+ *
47
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
48
+ * rather than only as a `.json` file because TypeScript types are erased
49
+ * at runtime: without a schema a consumer has nothing to validate, and
50
+ * every REQUIRED payload member is optional in practice. Cross-file
51
+ * `$ref`s are already inlined, so it needs no resolver.
52
+ */
53
+ export declare const PAYLOAD_SCHEMA: {
54
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
55
+ readonly $id: "https://trusttasks.org/spec/voting/board/consistency/0.1";
56
+ readonly title: "Voting — Board Consistency — payload";
57
+ readonly description: "Asks for an RFC 9162 consistency proof that the board of one size is a prefix of the board of a larger size.";
58
+ readonly type: "object";
59
+ readonly additionalProperties: false;
60
+ readonly required: readonly ["community", "electionId", "firstSize", "secondSize"];
61
+ readonly properties: {
62
+ readonly community: {
63
+ readonly type: "string";
64
+ readonly minLength: 1;
65
+ readonly maxLength: 2048;
66
+ readonly description: "The community's DID.";
67
+ };
68
+ readonly electionId: {
69
+ readonly $ref: "#/$defs/ElectionId";
70
+ };
71
+ readonly firstSize: {
72
+ readonly type: "integer";
73
+ readonly minimum: 1;
74
+ readonly description: "The size of the earlier head.";
75
+ };
76
+ readonly secondSize: {
77
+ readonly type: "integer";
78
+ readonly minimum: 1;
79
+ readonly description: "The size of the later head. At least `firstSize`, at most the current size.";
80
+ };
81
+ readonly ext: {
82
+ readonly $ref: "#/$defs/Ext";
83
+ };
84
+ };
85
+ readonly $defs: {
86
+ readonly Response: {
87
+ readonly $anchor: "response";
88
+ readonly title: "Voting — Board Consistency — response payload";
89
+ readonly type: "object";
90
+ readonly additionalProperties: false;
91
+ readonly required: readonly ["firstSize", "secondSize", "path"];
92
+ readonly properties: {
93
+ readonly firstSize: {
94
+ readonly type: "integer";
95
+ readonly minimum: 1;
96
+ };
97
+ readonly secondSize: {
98
+ readonly type: "integer";
99
+ readonly minimum: 1;
100
+ };
101
+ readonly path: {
102
+ readonly $ref: "#/$defs/MerklePath";
103
+ readonly description: "The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal.";
104
+ };
105
+ readonly ext: {
106
+ readonly $ref: "#/$defs/Ext";
107
+ };
108
+ };
109
+ };
110
+ readonly Ext: {
111
+ readonly title: "Ext";
112
+ 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.";
113
+ readonly type: "object";
114
+ readonly minProperties: 1;
115
+ readonly additionalProperties: true;
116
+ readonly propertyNames: {
117
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
118
+ };
119
+ };
120
+ readonly MerklePath: {
121
+ readonly title: "MerklePath";
122
+ readonly description: "An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 / §2.1.4 define.";
123
+ readonly type: "array";
124
+ readonly maxItems: 64;
125
+ readonly items: {
126
+ readonly $ref: "#/$defs/DigestMultibase";
127
+ };
128
+ };
129
+ readonly DigestMultibase: {
130
+ readonly title: "DigestMultibase";
131
+ 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`.";
132
+ readonly type: "string";
133
+ readonly minLength: 16;
134
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
135
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
136
+ };
137
+ readonly ElectionId: {
138
+ readonly title: "ElectionId";
139
+ 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.";
140
+ readonly type: "string";
141
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
142
+ };
143
+ };
144
+ };
145
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
146
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
147
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
148
+ readonly $ref: "#/$defs/Response";
149
+ readonly $defs: {
150
+ readonly Response: {
151
+ readonly $anchor: "response";
152
+ readonly title: "Voting — Board Consistency — response payload";
153
+ readonly type: "object";
154
+ readonly additionalProperties: false;
155
+ readonly required: readonly ["firstSize", "secondSize", "path"];
156
+ readonly properties: {
157
+ readonly firstSize: {
158
+ readonly type: "integer";
159
+ readonly minimum: 1;
160
+ };
161
+ readonly secondSize: {
162
+ readonly type: "integer";
163
+ readonly minimum: 1;
164
+ };
165
+ readonly path: {
166
+ readonly $ref: "#/$defs/MerklePath";
167
+ readonly description: "The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal.";
168
+ };
169
+ readonly ext: {
170
+ readonly $ref: "#/$defs/Ext";
171
+ };
172
+ };
173
+ };
174
+ readonly Ext: {
175
+ readonly title: "Ext";
176
+ 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.";
177
+ readonly type: "object";
178
+ readonly minProperties: 1;
179
+ readonly additionalProperties: true;
180
+ readonly propertyNames: {
181
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
182
+ };
183
+ };
184
+ readonly MerklePath: {
185
+ readonly title: "MerklePath";
186
+ readonly description: "An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 / §2.1.4 define.";
187
+ readonly type: "array";
188
+ readonly maxItems: 64;
189
+ readonly items: {
190
+ readonly $ref: "#/$defs/DigestMultibase";
191
+ };
192
+ };
193
+ readonly DigestMultibase: {
194
+ readonly title: "DigestMultibase";
195
+ 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`.";
196
+ readonly type: "string";
197
+ readonly minLength: 16;
198
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
199
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
200
+ };
201
+ readonly ElectionId: {
202
+ readonly title: "ElectionId";
203
+ 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.";
204
+ readonly type: "string";
205
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
206
+ };
207
+ };
208
+ };
209
+ /**
210
+ * SPEC.md §7.2 policy for the request variant, from this specification's
211
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
212
+ * per-specification and cannot be derived from the document alone, and
213
+ * item 2 needs the schema this carries.
214
+ */
215
+ export declare const SPEC: {
216
+ readonly typeUri: "https://trusttasks.org/spec/voting/board/consistency/0.1";
217
+ readonly isBearer: false;
218
+ readonly isProofRequired: false;
219
+ readonly isRecipientRequired: true;
220
+ readonly isIssuedAtRequired: false;
221
+ readonly payloadSchema: {
222
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
223
+ readonly $id: "https://trusttasks.org/spec/voting/board/consistency/0.1";
224
+ readonly title: "Voting — Board Consistency — payload";
225
+ readonly description: "Asks for an RFC 9162 consistency proof that the board of one size is a prefix of the board of a larger size.";
226
+ readonly type: "object";
227
+ readonly additionalProperties: false;
228
+ readonly required: readonly ["community", "electionId", "firstSize", "secondSize"];
229
+ readonly properties: {
230
+ readonly community: {
231
+ readonly type: "string";
232
+ readonly minLength: 1;
233
+ readonly maxLength: 2048;
234
+ readonly description: "The community's DID.";
235
+ };
236
+ readonly electionId: {
237
+ readonly $ref: "#/$defs/ElectionId";
238
+ };
239
+ readonly firstSize: {
240
+ readonly type: "integer";
241
+ readonly minimum: 1;
242
+ readonly description: "The size of the earlier head.";
243
+ };
244
+ readonly secondSize: {
245
+ readonly type: "integer";
246
+ readonly minimum: 1;
247
+ readonly description: "The size of the later head. At least `firstSize`, at most the current size.";
248
+ };
249
+ readonly ext: {
250
+ readonly $ref: "#/$defs/Ext";
251
+ };
252
+ };
253
+ readonly $defs: {
254
+ readonly Response: {
255
+ readonly $anchor: "response";
256
+ readonly title: "Voting — Board Consistency — response payload";
257
+ readonly type: "object";
258
+ readonly additionalProperties: false;
259
+ readonly required: readonly ["firstSize", "secondSize", "path"];
260
+ readonly properties: {
261
+ readonly firstSize: {
262
+ readonly type: "integer";
263
+ readonly minimum: 1;
264
+ };
265
+ readonly secondSize: {
266
+ readonly type: "integer";
267
+ readonly minimum: 1;
268
+ };
269
+ readonly path: {
270
+ readonly $ref: "#/$defs/MerklePath";
271
+ readonly description: "The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal.";
272
+ };
273
+ readonly ext: {
274
+ readonly $ref: "#/$defs/Ext";
275
+ };
276
+ };
277
+ };
278
+ readonly Ext: {
279
+ readonly title: "Ext";
280
+ 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.";
281
+ readonly type: "object";
282
+ readonly minProperties: 1;
283
+ readonly additionalProperties: true;
284
+ readonly propertyNames: {
285
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
286
+ };
287
+ };
288
+ readonly MerklePath: {
289
+ readonly title: "MerklePath";
290
+ readonly description: "An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 / §2.1.4 define.";
291
+ readonly type: "array";
292
+ readonly maxItems: 64;
293
+ readonly items: {
294
+ readonly $ref: "#/$defs/DigestMultibase";
295
+ };
296
+ };
297
+ readonly DigestMultibase: {
298
+ readonly title: "DigestMultibase";
299
+ 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`.";
300
+ readonly type: "string";
301
+ readonly minLength: 16;
302
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
303
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
304
+ };
305
+ readonly ElectionId: {
306
+ readonly title: "ElectionId";
307
+ 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.";
308
+ readonly type: "string";
309
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
310
+ };
311
+ };
312
+ };
313
+ };
314
+ /**
315
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
316
+ * tracks the *issuer* party's requirement because a response swaps the
317
+ * parties (§7.3 item 5).
318
+ */
319
+ export declare const RESPONSE_SPEC: {
320
+ readonly typeUri: "https://trusttasks.org/spec/voting/board/consistency/0.1#response";
321
+ readonly isBearer: false;
322
+ readonly isProofRequired: false;
323
+ readonly isRecipientRequired: false;
324
+ readonly isIssuedAtRequired: false;
325
+ readonly payloadSchema: {
326
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
327
+ readonly $ref: "#/$defs/Response";
328
+ readonly $defs: {
329
+ readonly Response: {
330
+ readonly $anchor: "response";
331
+ readonly title: "Voting — Board Consistency — response payload";
332
+ readonly type: "object";
333
+ readonly additionalProperties: false;
334
+ readonly required: readonly ["firstSize", "secondSize", "path"];
335
+ readonly properties: {
336
+ readonly firstSize: {
337
+ readonly type: "integer";
338
+ readonly minimum: 1;
339
+ };
340
+ readonly secondSize: {
341
+ readonly type: "integer";
342
+ readonly minimum: 1;
343
+ };
344
+ readonly path: {
345
+ readonly $ref: "#/$defs/MerklePath";
346
+ readonly description: "The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal.";
347
+ };
348
+ readonly ext: {
349
+ readonly $ref: "#/$defs/Ext";
350
+ };
351
+ };
352
+ };
353
+ readonly Ext: {
354
+ readonly title: "Ext";
355
+ 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.";
356
+ readonly type: "object";
357
+ readonly minProperties: 1;
358
+ readonly additionalProperties: true;
359
+ readonly propertyNames: {
360
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
361
+ };
362
+ };
363
+ readonly MerklePath: {
364
+ readonly title: "MerklePath";
365
+ readonly description: "An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 / §2.1.4 define.";
366
+ readonly type: "array";
367
+ readonly maxItems: 64;
368
+ readonly items: {
369
+ readonly $ref: "#/$defs/DigestMultibase";
370
+ };
371
+ };
372
+ readonly DigestMultibase: {
373
+ readonly title: "DigestMultibase";
374
+ 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`.";
375
+ readonly type: "string";
376
+ readonly minLength: 16;
377
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
378
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
379
+ };
380
+ readonly ElectionId: {
381
+ readonly title: "ElectionId";
382
+ 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.";
383
+ readonly type: "string";
384
+ readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
385
+ };
386
+ };
387
+ };
388
+ };
389
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/voting/board/consistency/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGtG;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IACl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;;;;;CAOhB,CAAC"}
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/voting/board/consistency/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/voting/board/consistency/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/voting/board/consistency/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/voting/board/consistency/0.1",
21
+ "title": "Voting — Board Consistency — payload",
22
+ "description": "Asks for an RFC 9162 consistency proof that the board of one size is a prefix of the board of a larger size.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "community",
27
+ "electionId",
28
+ "firstSize",
29
+ "secondSize"
30
+ ],
31
+ "properties": {
32
+ "community": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 2048,
36
+ "description": "The community's DID."
37
+ },
38
+ "electionId": {
39
+ "$ref": "#/$defs/ElectionId"
40
+ },
41
+ "firstSize": {
42
+ "type": "integer",
43
+ "minimum": 1,
44
+ "description": "The size of the earlier head."
45
+ },
46
+ "secondSize": {
47
+ "type": "integer",
48
+ "minimum": 1,
49
+ "description": "The size of the later head. At least `firstSize`, at most the current size."
50
+ },
51
+ "ext": {
52
+ "$ref": "#/$defs/Ext"
53
+ }
54
+ },
55
+ "$defs": {
56
+ "Response": {
57
+ "$anchor": "response",
58
+ "title": "Voting — Board Consistency — response payload",
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": [
62
+ "firstSize",
63
+ "secondSize",
64
+ "path"
65
+ ],
66
+ "properties": {
67
+ "firstSize": {
68
+ "type": "integer",
69
+ "minimum": 1
70
+ },
71
+ "secondSize": {
72
+ "type": "integer",
73
+ "minimum": 1
74
+ },
75
+ "path": {
76
+ "$ref": "#/$defs/MerklePath",
77
+ "description": "The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal."
78
+ },
79
+ "ext": {
80
+ "$ref": "#/$defs/Ext"
81
+ }
82
+ }
83
+ },
84
+ "Ext": {
85
+ "title": "Ext",
86
+ "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.",
87
+ "type": "object",
88
+ "minProperties": 1,
89
+ "additionalProperties": true,
90
+ "propertyNames": {
91
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
92
+ }
93
+ },
94
+ "MerklePath": {
95
+ "title": "MerklePath",
96
+ "description": "An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 / §2.1.4 define.",
97
+ "type": "array",
98
+ "maxItems": 64,
99
+ "items": {
100
+ "$ref": "#/$defs/DigestMultibase"
101
+ }
102
+ },
103
+ "DigestMultibase": {
104
+ "title": "DigestMultibase",
105
+ "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`.",
106
+ "type": "string",
107
+ "minLength": 16,
108
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
109
+ "examples": [
110
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
111
+ ]
112
+ },
113
+ "ElectionId": {
114
+ "title": "ElectionId",
115
+ "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.",
116
+ "type": "string",
117
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
118
+ }
119
+ }
120
+ };
121
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
122
+ export const RESPONSE_PAYLOAD_SCHEMA = {
123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
124
+ "$ref": "#/$defs/Response",
125
+ "$defs": {
126
+ "Response": {
127
+ "$anchor": "response",
128
+ "title": "Voting — Board Consistency — response payload",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "firstSize",
133
+ "secondSize",
134
+ "path"
135
+ ],
136
+ "properties": {
137
+ "firstSize": {
138
+ "type": "integer",
139
+ "minimum": 1
140
+ },
141
+ "secondSize": {
142
+ "type": "integer",
143
+ "minimum": 1
144
+ },
145
+ "path": {
146
+ "$ref": "#/$defs/MerklePath",
147
+ "description": "The RFC 9162 §2.1.4 consistency proof between the trees of `firstSize` and `secondSize` entries. Empty when the two sizes are equal."
148
+ },
149
+ "ext": {
150
+ "$ref": "#/$defs/Ext"
151
+ }
152
+ }
153
+ },
154
+ "Ext": {
155
+ "title": "Ext",
156
+ "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.",
157
+ "type": "object",
158
+ "minProperties": 1,
159
+ "additionalProperties": true,
160
+ "propertyNames": {
161
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
162
+ }
163
+ },
164
+ "MerklePath": {
165
+ "title": "MerklePath",
166
+ "description": "An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 / §2.1.4 define.",
167
+ "type": "array",
168
+ "maxItems": 64,
169
+ "items": {
170
+ "$ref": "#/$defs/DigestMultibase"
171
+ }
172
+ },
173
+ "DigestMultibase": {
174
+ "title": "DigestMultibase",
175
+ "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`.",
176
+ "type": "string",
177
+ "minLength": 16,
178
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
179
+ "examples": [
180
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
181
+ ]
182
+ },
183
+ "ElectionId": {
184
+ "title": "ElectionId",
185
+ "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.",
186
+ "type": "string",
187
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
188
+ }
189
+ }
190
+ };
191
+ /**
192
+ * SPEC.md §7.2 policy for the request variant, from this specification's
193
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
194
+ * per-specification and cannot be derived from the document alone, and
195
+ * item 2 needs the schema this carries.
196
+ */
197
+ export const SPEC = {
198
+ typeUri: TYPE_URI,
199
+ isBearer: false,
200
+ isProofRequired: false,
201
+ isRecipientRequired: true,
202
+ isIssuedAtRequired: false,
203
+ payloadSchema: PAYLOAD_SCHEMA,
204
+ };
205
+ /**
206
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
207
+ * tracks the *issuer* party's requirement because a response swaps the
208
+ * parties (§7.3 item 5).
209
+ */
210
+ export const RESPONSE_SPEC = {
211
+ typeUri: RESPONSE_TYPE_URI,
212
+ isBearer: false,
213
+ isProofRequired: false,
214
+ isRecipientRequired: false,
215
+ isIssuedAtRequired: false,
216
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
217
+ };
218
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/voting/board/consistency/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,0DAAmE,CAAC;AAK5F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mEAA4E,CAAC;AAK9G;;;;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