@openvtc/trust-tasks 0.28.8 → 0.28.10

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 (424) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/dist/_extends.d.ts.map +1 -1
  3. package/dist/_extends.js +5 -0
  4. package/dist/_extends.js.map +1 -1
  5. package/dist/_shared/components.d.ts +288 -0
  6. package/dist/_shared/components.d.ts.map +1 -1
  7. package/dist/git-ns/bridge/event/0.1/payload.d.ts +4 -4
  8. package/dist/git-ns/bridge/event/0.1/payload.js +1 -1
  9. package/dist/git-ns/bridge/event/0.2/payload.d.ts +4 -4
  10. package/dist/git-ns/bridge/event/0.2/payload.js +1 -1
  11. package/dist/git-ns/bridge/event/0.3/payload.d.ts +4 -4
  12. package/dist/git-ns/bridge/event/0.3/payload.js +1 -1
  13. package/dist/git-ns/bridge/event/0.4/payload.d.ts +4 -4
  14. package/dist/git-ns/bridge/event/0.4/payload.js +1 -1
  15. package/dist/git-ns/bridge/event/0.5/payload.d.ts +14 -2
  16. package/dist/git-ns/bridge/event/0.5/payload.d.ts.map +1 -1
  17. package/dist/git-ns/bridge/event/0.5/payload.js +1 -1
  18. package/dist/git-ns/bridge/event/0.5/payload.js.map +1 -1
  19. package/dist/git-ns/bridge/event/0.6/payload.d.ts +2067 -0
  20. package/dist/git-ns/bridge/event/0.6/payload.d.ts.map +1 -0
  21. package/dist/git-ns/bridge/event/0.6/payload.js +1119 -0
  22. package/dist/git-ns/bridge/event/0.6/payload.js.map +1 -0
  23. package/dist/git-ns/bridge/job/0.1/payload.d.ts +4 -4
  24. package/dist/git-ns/bridge/job/0.1/payload.js +1 -1
  25. package/dist/git-ns/bridge/job/0.2/payload.d.ts +4 -4
  26. package/dist/git-ns/bridge/job/0.2/payload.js +1 -1
  27. package/dist/git-ns/bridge/job/0.3/payload.d.ts +4 -4
  28. package/dist/git-ns/bridge/job/0.3/payload.js +1 -1
  29. package/dist/git-ns/bridge/job/0.4/payload.d.ts +4 -4
  30. package/dist/git-ns/bridge/job/0.4/payload.js +1 -1
  31. package/dist/git-ns/bridge/job/0.5/payload.d.ts +4 -4
  32. package/dist/git-ns/bridge/job/0.5/payload.js +1 -1
  33. package/dist/git-ns/bridge/job/0.6/payload.d.ts +14 -2
  34. package/dist/git-ns/bridge/job/0.6/payload.d.ts.map +1 -1
  35. package/dist/git-ns/bridge/job/0.6/payload.js +1 -1
  36. package/dist/git-ns/bridge/job/0.6/payload.js.map +1 -1
  37. package/dist/git-ns/bridge/job/0.7/payload.d.ts +1120 -0
  38. package/dist/git-ns/bridge/job/0.7/payload.d.ts.map +1 -0
  39. package/dist/git-ns/bridge/job/0.7/payload.js +608 -0
  40. package/dist/git-ns/bridge/job/0.7/payload.js.map +1 -0
  41. package/dist/git-ns/bridge/job/list/0.4/payload.d.ts +5 -5
  42. package/dist/git-ns/bridge/job/list/0.4/payload.js +2 -2
  43. package/dist/index.d.ts +123 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +123 -0
  46. package/dist/index.js.map +1 -1
  47. package/dist/notifications/_shared/0.1/notification.d.ts +22 -0
  48. package/dist/notifications/_shared/0.1/notification.d.ts.map +1 -0
  49. package/dist/notifications/_shared/0.1/notification.js +6 -0
  50. package/dist/notifications/_shared/0.1/notification.js.map +1 -0
  51. package/dist/notifications/notify/0.1/payload.d.ts +652 -0
  52. package/dist/notifications/notify/0.1/payload.d.ts.map +1 -0
  53. package/dist/notifications/notify/0.1/payload.js +383 -0
  54. package/dist/notifications/notify/0.1/payload.js.map +1 -0
  55. package/dist/notifications/relay/0.1/payload.d.ts +309 -0
  56. package/dist/notifications/relay/0.1/payload.d.ts.map +1 -0
  57. package/dist/notifications/relay/0.1/payload.js +179 -0
  58. package/dist/notifications/relay/0.1/payload.js.map +1 -0
  59. package/dist/voting/_shared/0.4/voting.d.ts +16 -0
  60. package/dist/voting/_shared/0.4/voting.d.ts.map +1 -0
  61. package/dist/voting/_shared/0.4/voting.js +6 -0
  62. package/dist/voting/_shared/0.4/voting.js.map +1 -0
  63. package/dist/voting/election/register/0.1/payload.d.ts +4 -4
  64. package/dist/voting/election/register/0.1/payload.js +1 -1
  65. package/dist/voting/election/register/0.2/payload.d.ts +4 -4
  66. package/dist/voting/election/register/0.2/payload.js +1 -1
  67. package/dist/voting/election/register/0.3/payload.d.ts +13 -2
  68. package/dist/voting/election/register/0.3/payload.d.ts.map +1 -1
  69. package/dist/voting/election/register/0.3/payload.js +1 -1
  70. package/dist/voting/election/register/0.3/payload.js.map +1 -1
  71. package/dist/voting/election/register/0.4/payload.d.ts +2054 -0
  72. package/dist/voting/election/register/0.4/payload.d.ts.map +1 -0
  73. package/dist/voting/election/register/0.4/payload.js +1264 -0
  74. package/dist/voting/election/register/0.4/payload.js.map +1 -0
  75. package/dist/voting/election/show/0.1/payload.d.ts +4 -4
  76. package/dist/voting/election/show/0.1/payload.js +1 -1
  77. package/dist/voting/election/show/0.2/payload.d.ts +4 -4
  78. package/dist/voting/election/show/0.2/payload.js +1 -1
  79. package/dist/voting/election/show/0.3/payload.d.ts +13 -2
  80. package/dist/voting/election/show/0.3/payload.d.ts.map +1 -1
  81. package/dist/voting/election/show/0.3/payload.js +1 -1
  82. package/dist/voting/election/show/0.3/payload.js.map +1 -1
  83. package/dist/voting/election/show/0.4/payload.d.ts +1958 -0
  84. package/dist/voting/election/show/0.4/payload.d.ts.map +1 -0
  85. package/dist/voting/election/show/0.4/payload.js +1210 -0
  86. package/dist/voting/election/show/0.4/payload.js.map +1 -0
  87. package/dist/vta/notifications/_shared/0.1/held-notification.d.ts +16 -0
  88. package/dist/vta/notifications/_shared/0.1/held-notification.d.ts.map +1 -0
  89. package/dist/vta/notifications/_shared/0.1/held-notification.js +6 -0
  90. package/dist/vta/notifications/_shared/0.1/held-notification.js.map +1 -0
  91. package/dist/vta/notifications/dismiss/0.1/payload.d.ts +300 -0
  92. package/dist/vta/notifications/dismiss/0.1/payload.d.ts.map +1 -0
  93. package/dist/vta/notifications/dismiss/0.1/payload.js +179 -0
  94. package/dist/vta/notifications/dismiss/0.1/payload.js.map +1 -0
  95. package/dist/vta/notifications/list/0.1/payload.d.ts +1100 -0
  96. package/dist/vta/notifications/list/0.1/payload.d.ts.map +1 -0
  97. package/dist/vta/notifications/list/0.1/payload.js +627 -0
  98. package/dist/vta/notifications/list/0.1/payload.js.map +1 -0
  99. package/dist/vta/notifications/show/0.1/payload.d.ts +1004 -0
  100. package/dist/vta/notifications/show/0.1/payload.d.ts.map +1 -0
  101. package/dist/vta/notifications/show/0.1/payload.js +595 -0
  102. package/dist/vta/notifications/show/0.1/payload.js.map +1 -0
  103. package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts +4 -4
  104. package/dist/vta/pcs/trustee/deal/0.2/payload.js +1 -1
  105. package/dist/vta/pcs/trustee/deal/0.3/payload.d.ts +4 -4
  106. package/dist/vta/pcs/trustee/deal/0.3/payload.js +1 -1
  107. package/dist/vta/pcs/trustee/deal/0.4/payload.d.ts +13 -2
  108. package/dist/vta/pcs/trustee/deal/0.4/payload.d.ts.map +1 -1
  109. package/dist/vta/pcs/trustee/deal/0.4/payload.js +1 -1
  110. package/dist/vta/pcs/trustee/deal/0.4/payload.js.map +1 -1
  111. package/dist/vta/pcs/trustee/deal/0.5/payload.d.ts +1966 -0
  112. package/dist/vta/pcs/trustee/deal/0.5/payload.d.ts.map +1 -0
  113. package/dist/vta/pcs/trustee/deal/0.5/payload.js +1175 -0
  114. package/dist/vta/pcs/trustee/deal/0.5/payload.js.map +1 -0
  115. package/dist/vta/pcs/trustee/enrol/0.1/payload.d.ts +4 -4
  116. package/dist/vta/pcs/trustee/enrol/0.1/payload.js +1 -1
  117. package/dist/vta/pcs/trustee/enrol/0.2/payload.d.ts +4 -4
  118. package/dist/vta/pcs/trustee/enrol/0.2/payload.js +1 -1
  119. package/dist/vta/pcs/trustee/enrol/0.3/payload.d.ts +13 -2
  120. package/dist/vta/pcs/trustee/enrol/0.3/payload.d.ts.map +1 -1
  121. package/dist/vta/pcs/trustee/enrol/0.3/payload.js +1 -1
  122. package/dist/vta/pcs/trustee/enrol/0.3/payload.js.map +1 -1
  123. package/dist/vta/pcs/trustee/enrol/0.4/payload.d.ts +1890 -0
  124. package/dist/vta/pcs/trustee/enrol/0.4/payload.d.ts.map +1 -0
  125. package/dist/vta/pcs/trustee/enrol/0.4/payload.js +1138 -0
  126. package/dist/vta/pcs/trustee/enrol/0.4/payload.js.map +1 -0
  127. package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts +4 -4
  128. package/dist/vta/pcs/trustee/justify/0.2/payload.js +1 -1
  129. package/dist/vta/pcs/trustee/justify/0.3/payload.d.ts +4 -4
  130. package/dist/vta/pcs/trustee/justify/0.3/payload.js +1 -1
  131. package/dist/vta/pcs/trustee/justify/0.4/payload.d.ts +13 -2
  132. package/dist/vta/pcs/trustee/justify/0.4/payload.d.ts.map +1 -1
  133. package/dist/vta/pcs/trustee/justify/0.4/payload.js +1 -1
  134. package/dist/vta/pcs/trustee/justify/0.4/payload.js.map +1 -1
  135. package/dist/vta/pcs/trustee/justify/0.5/payload.d.ts +2001 -0
  136. package/dist/vta/pcs/trustee/justify/0.5/payload.d.ts.map +1 -0
  137. package/dist/vta/pcs/trustee/justify/0.5/payload.js +1193 -0
  138. package/dist/vta/pcs/trustee/justify/0.5/payload.js.map +1 -0
  139. package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts +4 -4
  140. package/dist/vta/pcs/trustee/keys/0.2/payload.js +1 -1
  141. package/dist/vta/pcs/trustee/keys/0.3/payload.d.ts +4 -4
  142. package/dist/vta/pcs/trustee/keys/0.3/payload.js +1 -1
  143. package/dist/vta/pcs/trustee/keys/0.4/payload.d.ts +13 -2
  144. package/dist/vta/pcs/trustee/keys/0.4/payload.d.ts.map +1 -1
  145. package/dist/vta/pcs/trustee/keys/0.4/payload.js +1 -1
  146. package/dist/vta/pcs/trustee/keys/0.4/payload.js.map +1 -1
  147. package/dist/vta/pcs/trustee/keys/0.5/payload.d.ts +2046 -0
  148. package/dist/vta/pcs/trustee/keys/0.5/payload.d.ts.map +1 -0
  149. package/dist/vta/pcs/trustee/keys/0.5/payload.js +1213 -0
  150. package/dist/vta/pcs/trustee/keys/0.5/payload.js.map +1 -0
  151. package/dist/vta/pcs/trustee/read/0.1/payload.d.ts +4 -4
  152. package/dist/vta/pcs/trustee/read/0.1/payload.js +1 -1
  153. package/dist/vta/pcs/trustee/read/0.2/payload.d.ts +4 -4
  154. package/dist/vta/pcs/trustee/read/0.2/payload.js +1 -1
  155. package/dist/vta/pcs/trustee/read/0.3/payload.d.ts +14 -2
  156. package/dist/vta/pcs/trustee/read/0.3/payload.d.ts.map +1 -1
  157. package/dist/vta/pcs/trustee/read/0.3/payload.js +1 -1
  158. package/dist/vta/pcs/trustee/read/0.3/payload.js.map +1 -1
  159. package/dist/vta/pcs/trustee/read/0.4/payload.d.ts +540 -0
  160. package/dist/vta/pcs/trustee/read/0.4/payload.d.ts.map +1 -0
  161. package/dist/vta/pcs/trustee/read/0.4/payload.js +304 -0
  162. package/dist/vta/pcs/trustee/read/0.4/payload.js.map +1 -0
  163. package/dist/vta/pcs/vote/0.1/payload.d.ts +4 -4
  164. package/dist/vta/pcs/vote/0.1/payload.js +1 -1
  165. package/dist/vta/pcs/vote/0.2/payload.d.ts +4 -4
  166. package/dist/vta/pcs/vote/0.2/payload.js +1 -1
  167. package/dist/vta/pcs/vote/0.3/payload.d.ts +13 -2
  168. package/dist/vta/pcs/vote/0.3/payload.d.ts.map +1 -1
  169. package/dist/vta/pcs/vote/0.3/payload.js +1 -1
  170. package/dist/vta/pcs/vote/0.3/payload.js.map +1 -1
  171. package/dist/vta/pcs/vote/0.4/payload.d.ts +2342 -0
  172. package/dist/vta/pcs/vote/0.4/payload.d.ts.map +1 -0
  173. package/dist/vta/pcs/vote/0.4/payload.js +1380 -0
  174. package/dist/vta/pcs/vote/0.4/payload.js.map +1 -0
  175. package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts +4 -4
  176. package/dist/vta/pcs/vote-encrypted/0.2/payload.js +1 -1
  177. package/dist/vta/pcs/vote-encrypted/0.3/payload.d.ts +4 -4
  178. package/dist/vta/pcs/vote-encrypted/0.3/payload.js +1 -1
  179. package/dist/vta/pcs/vote-encrypted/0.4/payload.d.ts +13 -2
  180. package/dist/vta/pcs/vote-encrypted/0.4/payload.d.ts.map +1 -1
  181. package/dist/vta/pcs/vote-encrypted/0.4/payload.js +1 -1
  182. package/dist/vta/pcs/vote-encrypted/0.4/payload.js.map +1 -1
  183. package/dist/vta/pcs/vote-encrypted/0.5/payload.d.ts +2362 -0
  184. package/dist/vta/pcs/vote-encrypted/0.5/payload.d.ts.map +1 -0
  185. package/dist/vta/pcs/vote-encrypted/0.5/payload.js +1398 -0
  186. package/dist/vta/pcs/vote-encrypted/0.5/payload.js.map +1 -0
  187. package/dist/vta/pcs/voter/accept/0.1/payload.d.ts +3 -3
  188. package/dist/vta/pcs/voter/accept/0.1/payload.js +1 -1
  189. package/dist/vta/pcs/voter/read/0.1/payload.d.ts +4 -4
  190. package/dist/vta/pcs/voter/read/0.1/payload.js +1 -1
  191. package/dist/vta/pcs/voter/read/0.2/payload.d.ts +4 -4
  192. package/dist/vta/pcs/voter/read/0.2/payload.js +1 -1
  193. package/dist/vta/pcs/voter/read/0.3/payload.d.ts +14 -2
  194. package/dist/vta/pcs/voter/read/0.3/payload.d.ts.map +1 -1
  195. package/dist/vta/pcs/voter/read/0.3/payload.js +1 -1
  196. package/dist/vta/pcs/voter/read/0.3/payload.js.map +1 -1
  197. package/dist/vta/pcs/voter/read/0.4/payload.d.ts +515 -0
  198. package/dist/vta/pcs/voter/read/0.4/payload.d.ts.map +1 -0
  199. package/dist/vta/pcs/voter/read/0.4/payload.js +285 -0
  200. package/dist/vta/pcs/voter/read/0.4/payload.js.map +1 -0
  201. package/dist/vta/pcs/voter/read/0.5/payload.d.ts +549 -0
  202. package/dist/vta/pcs/voter/read/0.5/payload.d.ts.map +1 -0
  203. package/dist/vta/pcs/voter/read/0.5/payload.js +300 -0
  204. package/dist/vta/pcs/voter/read/0.5/payload.js.map +1 -0
  205. package/dist/vta/pcs/voter/read/0.6/payload.d.ts +561 -0
  206. package/dist/vta/pcs/voter/read/0.6/payload.d.ts.map +1 -0
  207. package/dist/vta/pcs/voter/read/0.6/payload.js +312 -0
  208. package/dist/vta/pcs/voter/read/0.6/payload.js.map +1 -0
  209. package/dist/vta/pcs/voter/register/0.1/payload.d.ts +4 -4
  210. package/dist/vta/pcs/voter/register/0.1/payload.js +1 -1
  211. package/dist/vta/pcs/voter/register/0.2/payload.d.ts +4 -4
  212. package/dist/vta/pcs/voter/register/0.2/payload.js +1 -1
  213. package/dist/vta/pcs/voter/register/0.3/payload.d.ts +14 -2
  214. package/dist/vta/pcs/voter/register/0.3/payload.d.ts.map +1 -1
  215. package/dist/vta/pcs/voter/register/0.3/payload.js +1 -1
  216. package/dist/vta/pcs/voter/register/0.3/payload.js.map +1 -1
  217. package/dist/vta/pcs/voter/register/0.4/payload.d.ts +2324 -0
  218. package/dist/vta/pcs/voter/register/0.4/payload.d.ts.map +1 -0
  219. package/dist/vta/pcs/voter/register/0.4/payload.js +1352 -0
  220. package/dist/vta/pcs/voter/register/0.4/payload.js.map +1 -0
  221. package/dist/vta/pcs/voter/register/0.5/payload.d.ts +2312 -0
  222. package/dist/vta/pcs/voter/register/0.5/payload.d.ts.map +1 -0
  223. package/dist/vta/pcs/voter/register/0.5/payload.js +1352 -0
  224. package/dist/vta/pcs/voter/register/0.5/payload.js.map +1 -0
  225. package/dist/vtc/_shared/0.6/network-membership.d.ts +16 -0
  226. package/dist/vtc/_shared/0.6/network-membership.d.ts.map +1 -0
  227. package/dist/vtc/_shared/0.6/network-membership.js +6 -0
  228. package/dist/vtc/_shared/0.6/network-membership.js.map +1 -0
  229. package/dist/vtc/elections/create/0.1/payload.d.ts +4 -4
  230. package/dist/vtc/elections/create/0.1/payload.js +1 -1
  231. package/dist/vtc/elections/create/0.2/payload.d.ts +4 -4
  232. package/dist/vtc/elections/create/0.2/payload.js +1 -1
  233. package/dist/vtc/elections/create/0.3/payload.d.ts +4 -4
  234. package/dist/vtc/elections/create/0.3/payload.js +1 -1
  235. package/dist/vtc/elections/create/0.4/payload.d.ts +14 -2
  236. package/dist/vtc/elections/create/0.4/payload.d.ts.map +1 -1
  237. package/dist/vtc/elections/create/0.4/payload.js +1 -1
  238. package/dist/vtc/elections/create/0.4/payload.js.map +1 -1
  239. package/dist/vtc/elections/create/0.5/payload.d.ts +1790 -0
  240. package/dist/vtc/elections/create/0.5/payload.d.ts.map +1 -0
  241. package/dist/vtc/elections/create/0.5/payload.js +1092 -0
  242. package/dist/vtc/elections/create/0.5/payload.js.map +1 -0
  243. package/dist/vtc/elections/list/0.1/payload.d.ts +4 -4
  244. package/dist/vtc/elections/list/0.1/payload.js +1 -1
  245. package/dist/vtc/elections/list/0.2/payload.d.ts +4 -4
  246. package/dist/vtc/elections/list/0.2/payload.js +1 -1
  247. package/dist/vtc/elections/list/0.3/payload.d.ts +14 -2
  248. package/dist/vtc/elections/list/0.3/payload.d.ts.map +1 -1
  249. package/dist/vtc/elections/list/0.3/payload.js +1 -1
  250. package/dist/vtc/elections/list/0.3/payload.js.map +1 -1
  251. package/dist/vtc/elections/list/0.4/payload.d.ts +547 -0
  252. package/dist/vtc/elections/list/0.4/payload.d.ts.map +1 -0
  253. package/dist/vtc/elections/list/0.4/payload.js +304 -0
  254. package/dist/vtc/elections/list/0.4/payload.js.map +1 -0
  255. package/dist/vtc/elections/list/0.5/payload.d.ts +535 -0
  256. package/dist/vtc/elections/list/0.5/payload.d.ts.map +1 -0
  257. package/dist/vtc/elections/list/0.5/payload.js +304 -0
  258. package/dist/vtc/elections/list/0.5/payload.js.map +1 -0
  259. package/dist/vtc/elections/show/0.1/payload.d.ts +4 -4
  260. package/dist/vtc/elections/show/0.1/payload.js +1 -1
  261. package/dist/vtc/elections/show/0.2/payload.d.ts +4 -4
  262. package/dist/vtc/elections/show/0.2/payload.js +1 -1
  263. package/dist/vtc/elections/show/0.3/payload.d.ts +14 -2
  264. package/dist/vtc/elections/show/0.3/payload.d.ts.map +1 -1
  265. package/dist/vtc/elections/show/0.3/payload.js +1 -1
  266. package/dist/vtc/elections/show/0.3/payload.js.map +1 -1
  267. package/dist/vtc/elections/show/0.4/payload.d.ts +3290 -0
  268. package/dist/vtc/elections/show/0.4/payload.d.ts.map +1 -0
  269. package/dist/vtc/elections/show/0.4/payload.js +1931 -0
  270. package/dist/vtc/elections/show/0.4/payload.js.map +1 -0
  271. package/dist/vtc/elections/show/0.5/payload.d.ts +3318 -0
  272. package/dist/vtc/elections/show/0.5/payload.d.ts.map +1 -0
  273. package/dist/vtc/elections/show/0.5/payload.js +1946 -0
  274. package/dist/vtc/elections/show/0.5/payload.js.map +1 -0
  275. package/dist/vtc/elections/show/0.6/payload.d.ts +3306 -0
  276. package/dist/vtc/elections/show/0.6/payload.d.ts.map +1 -0
  277. package/dist/vtc/elections/show/0.6/payload.js +1946 -0
  278. package/dist/vtc/elections/show/0.6/payload.js.map +1 -0
  279. package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts +14 -2
  280. package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts.map +1 -1
  281. package/dist/vtc/elections/tickets/issue/0.1/payload.js +1 -1
  282. package/dist/vtc/elections/tickets/issue/0.1/payload.js.map +1 -1
  283. package/dist/vtc/elections/tickets/issue/0.2/payload.d.ts +651 -0
  284. package/dist/vtc/elections/tickets/issue/0.2/payload.d.ts.map +1 -0
  285. package/dist/vtc/elections/tickets/issue/0.2/payload.js +347 -0
  286. package/dist/vtc/elections/tickets/issue/0.2/payload.js.map +1 -0
  287. package/dist/vtc/elections/tickets/issue/0.3/payload.d.ts +639 -0
  288. package/dist/vtc/elections/tickets/issue/0.3/payload.d.ts.map +1 -0
  289. package/dist/vtc/elections/tickets/issue/0.3/payload.js +347 -0
  290. package/dist/vtc/elections/tickets/issue/0.3/payload.js.map +1 -0
  291. package/dist/vtc/networks/evidence/0.1/payload.d.ts +412 -0
  292. package/dist/vtc/networks/evidence/0.1/payload.d.ts.map +1 -0
  293. package/dist/vtc/networks/evidence/0.1/payload.js +233 -0
  294. package/dist/vtc/networks/evidence/0.1/payload.js.map +1 -0
  295. package/dist/vtc/networks/groups/register/0.1/payload.d.ts +680 -0
  296. package/dist/vtc/networks/groups/register/0.1/payload.d.ts.map +1 -0
  297. package/dist/vtc/networks/groups/register/0.1/payload.js +401 -0
  298. package/dist/vtc/networks/groups/register/0.1/payload.js.map +1 -0
  299. package/dist/vtc/networks/join/0.1/payload.d.ts +760 -0
  300. package/dist/vtc/networks/join/0.1/payload.d.ts.map +1 -0
  301. package/dist/vtc/networks/join/0.1/payload.js +445 -0
  302. package/dist/vtc/networks/join/0.1/payload.js.map +1 -0
  303. package/dist/vtc/networks/leave/0.1/payload.d.ts +664 -0
  304. package/dist/vtc/networks/leave/0.1/payload.d.ts.map +1 -0
  305. package/dist/vtc/networks/leave/0.1/payload.js +393 -0
  306. package/dist/vtc/networks/leave/0.1/payload.js.map +1 -0
  307. package/dist/vtc/networks/list/0.1/payload.d.ts +713 -0
  308. package/dist/vtc/networks/list/0.1/payload.d.ts.map +1 -0
  309. package/dist/vtc/networks/list/0.1/payload.js +417 -0
  310. package/dist/vtc/networks/list/0.1/payload.js.map +1 -0
  311. package/dist/vtc/networks/notice/0.1/payload.d.ts +210 -0
  312. package/dist/vtc/networks/notice/0.1/payload.d.ts.map +1 -0
  313. package/dist/vtc/networks/notice/0.1/payload.js +116 -0
  314. package/dist/vtc/networks/notice/0.1/payload.js.map +1 -0
  315. package/dist/vtc/networks/repudiate/0.1/payload.d.ts +680 -0
  316. package/dist/vtc/networks/repudiate/0.1/payload.d.ts.map +1 -0
  317. package/dist/vtc/networks/repudiate/0.1/payload.js +400 -0
  318. package/dist/vtc/networks/repudiate/0.1/payload.js.map +1 -0
  319. package/dist/vtc/networks/show/0.1/payload.d.ts +650 -0
  320. package/dist/vtc/networks/show/0.1/payload.d.ts.map +1 -0
  321. package/dist/vtc/networks/show/0.1/payload.js +388 -0
  322. package/dist/vtc/networks/show/0.1/payload.js.map +1 -0
  323. package/package.json +1 -1
  324. package/src/_extends.ts +5 -0
  325. package/src/_shared/components.ts +293 -0
  326. package/src/git-ns/bridge/event/0.1/payload.ts +5 -5
  327. package/src/git-ns/bridge/event/0.2/payload.ts +5 -5
  328. package/src/git-ns/bridge/event/0.3/payload.ts +5 -5
  329. package/src/git-ns/bridge/event/0.4/payload.ts +5 -5
  330. package/src/git-ns/bridge/event/0.5/payload.ts +15 -3
  331. package/src/git-ns/bridge/event/0.6/payload.ts +1450 -0
  332. package/src/git-ns/bridge/job/0.1/payload.ts +5 -5
  333. package/src/git-ns/bridge/job/0.2/payload.ts +5 -5
  334. package/src/git-ns/bridge/job/0.3/payload.ts +5 -5
  335. package/src/git-ns/bridge/job/0.4/payload.ts +5 -5
  336. package/src/git-ns/bridge/job/0.5/payload.ts +5 -5
  337. package/src/git-ns/bridge/job/0.6/payload.ts +15 -3
  338. package/src/git-ns/bridge/job/0.7/payload.ts +744 -0
  339. package/src/git-ns/bridge/job/list/0.4/payload.ts +3 -3
  340. package/src/index.ts +123 -0
  341. package/src/notifications/_shared/0.1/notification.ts +23 -0
  342. package/src/notifications/notify/0.1/payload.ts +420 -0
  343. package/src/notifications/relay/0.1/payload.ts +220 -0
  344. package/src/voting/_shared/0.4/voting.ts +17 -0
  345. package/src/voting/election/register/0.1/payload.ts +5 -5
  346. package/src/voting/election/register/0.2/payload.ts +5 -5
  347. package/src/voting/election/register/0.3/payload.ts +14 -3
  348. package/src/voting/election/register/0.4/payload.ts +1307 -0
  349. package/src/voting/election/show/0.1/payload.ts +5 -5
  350. package/src/voting/election/show/0.2/payload.ts +5 -5
  351. package/src/voting/election/show/0.3/payload.ts +14 -3
  352. package/src/voting/election/show/0.4/payload.ts +1249 -0
  353. package/src/vta/notifications/_shared/0.1/held-notification.ts +17 -0
  354. package/src/vta/notifications/dismiss/0.1/payload.ts +214 -0
  355. package/src/vta/notifications/list/0.1/payload.ts +688 -0
  356. package/src/vta/notifications/show/0.1/payload.ts +630 -0
  357. package/src/vta/pcs/trustee/deal/0.2/payload.ts +5 -5
  358. package/src/vta/pcs/trustee/deal/0.3/payload.ts +5 -5
  359. package/src/vta/pcs/trustee/deal/0.4/payload.ts +14 -3
  360. package/src/vta/pcs/trustee/deal/0.5/payload.ts +1248 -0
  361. package/src/vta/pcs/trustee/enrol/0.1/payload.ts +5 -5
  362. package/src/vta/pcs/trustee/enrol/0.2/payload.ts +5 -5
  363. package/src/vta/pcs/trustee/enrol/0.3/payload.ts +14 -3
  364. package/src/vta/pcs/trustee/enrol/0.4/payload.ts +1207 -0
  365. package/src/vta/pcs/trustee/justify/0.2/payload.ts +5 -5
  366. package/src/vta/pcs/trustee/justify/0.3/payload.ts +5 -5
  367. package/src/vta/pcs/trustee/justify/0.4/payload.ts +14 -3
  368. package/src/vta/pcs/trustee/justify/0.5/payload.ts +1267 -0
  369. package/src/vta/pcs/trustee/keys/0.2/payload.ts +5 -5
  370. package/src/vta/pcs/trustee/keys/0.3/payload.ts +5 -5
  371. package/src/vta/pcs/trustee/keys/0.4/payload.ts +14 -3
  372. package/src/vta/pcs/trustee/keys/0.5/payload.ts +1294 -0
  373. package/src/vta/pcs/trustee/read/0.1/payload.ts +5 -5
  374. package/src/vta/pcs/trustee/read/0.2/payload.ts +5 -5
  375. package/src/vta/pcs/trustee/read/0.3/payload.ts +15 -3
  376. package/src/vta/pcs/trustee/read/0.4/payload.ts +385 -0
  377. package/src/vta/pcs/vote/0.1/payload.ts +5 -5
  378. package/src/vta/pcs/vote/0.2/payload.ts +5 -5
  379. package/src/vta/pcs/vote/0.3/payload.ts +14 -3
  380. package/src/vta/pcs/vote/0.4/payload.ts +1465 -0
  381. package/src/vta/pcs/vote-encrypted/0.2/payload.ts +5 -5
  382. package/src/vta/pcs/vote-encrypted/0.3/payload.ts +5 -5
  383. package/src/vta/pcs/vote-encrypted/0.4/payload.ts +14 -3
  384. package/src/vta/pcs/vote-encrypted/0.5/payload.ts +1469 -0
  385. package/src/vta/pcs/voter/accept/0.1/payload.ts +2 -2
  386. package/src/vta/pcs/voter/read/0.1/payload.ts +5 -5
  387. package/src/vta/pcs/voter/read/0.2/payload.ts +5 -5
  388. package/src/vta/pcs/voter/read/0.3/payload.ts +15 -3
  389. package/src/vta/pcs/voter/read/0.4/payload.ts +375 -0
  390. package/src/vta/pcs/voter/read/0.5/payload.ts +394 -0
  391. package/src/vta/pcs/voter/read/0.6/payload.ts +398 -0
  392. package/src/vta/pcs/voter/register/0.1/payload.ts +5 -5
  393. package/src/vta/pcs/voter/register/0.2/payload.ts +5 -5
  394. package/src/vta/pcs/voter/register/0.3/payload.ts +15 -3
  395. package/src/vta/pcs/voter/register/0.4/payload.ts +1478 -0
  396. package/src/vta/pcs/voter/register/0.5/payload.ts +1466 -0
  397. package/src/vtc/_shared/0.6/network-membership.ts +17 -0
  398. package/src/vtc/elections/create/0.1/payload.ts +5 -5
  399. package/src/vtc/elections/create/0.2/payload.ts +5 -5
  400. package/src/vtc/elections/create/0.3/payload.ts +5 -5
  401. package/src/vtc/elections/create/0.4/payload.ts +15 -3
  402. package/src/vtc/elections/create/0.5/payload.ts +1141 -0
  403. package/src/vtc/elections/list/0.1/payload.ts +5 -5
  404. package/src/vtc/elections/list/0.2/payload.ts +5 -5
  405. package/src/vtc/elections/list/0.3/payload.ts +15 -3
  406. package/src/vtc/elections/list/0.4/payload.ts +399 -0
  407. package/src/vtc/elections/list/0.5/payload.ts +387 -0
  408. package/src/vtc/elections/show/0.1/payload.ts +5 -5
  409. package/src/vtc/elections/show/0.2/payload.ts +5 -5
  410. package/src/vtc/elections/show/0.3/payload.ts +15 -3
  411. package/src/vtc/elections/show/0.4/payload.ts +2043 -0
  412. package/src/vtc/elections/show/0.5/payload.ts +2062 -0
  413. package/src/vtc/elections/show/0.6/payload.ts +2050 -0
  414. package/src/vtc/elections/tickets/issue/0.1/payload.ts +15 -3
  415. package/src/vtc/elections/tickets/issue/0.2/payload.ts +441 -0
  416. package/src/vtc/elections/tickets/issue/0.3/payload.ts +429 -0
  417. package/src/vtc/networks/evidence/0.1/payload.ts +290 -0
  418. package/src/vtc/networks/groups/register/0.1/payload.ts +446 -0
  419. package/src/vtc/networks/join/0.1/payload.ts +492 -0
  420. package/src/vtc/networks/leave/0.1/payload.ts +434 -0
  421. package/src/vtc/networks/list/0.1/payload.ts +463 -0
  422. package/src/vtc/networks/notice/0.1/payload.ts +172 -0
  423. package/src/vtc/networks/repudiate/0.1/payload.ts +445 -0
  424. package/src/vtc/networks/show/0.1/payload.ts +425 -0
@@ -0,0 +1,1248 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/trustee/deal/0.5/payload.schema.json
4
+ */
5
+
6
+ import type { BoardVisibility, ChoiceQuestion, ElectionId, Ext, Key_VotingV0_1 as Key, Manifest_VotingV0_4 as Manifest, Question, QuestionOption, RankingQuestion, Revote, RollRule_VotingV0_4 as RollRule, ScoreQuestion, SecrecyLevel, SignedRequest, TextQuestion, TrusteeCeremony, Trustees } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * The trustee's VTA deals its contribution to the election key and returns the voting/trustees/deal request signed as the trustee.
11
+ */
12
+ export interface VTAPCSTrusteeDealPayload {
13
+ /**
14
+ * The VTA context the trustee's keys live in.
15
+ */
16
+ contextId: string;
17
+ /**
18
+ * The community's DID.
19
+ */
20
+ community: string;
21
+ electionId: ElectionId;
22
+ /**
23
+ * The trustee's DID: a persona this VTA holds, named in the manifest's `trustees.dids`.
24
+ */
25
+ trustee: string;
26
+ manifest: Manifest;
27
+ /**
28
+ * The ceremony as the board holds it: voting/trustees/status's `steps`, passed on unchanged. The VTA verifies every step as its trustee's before taking it.
29
+ */
30
+ ceremony: TrusteeCeremony;
31
+ ext?: Ext;
32
+ }
33
+ export interface VTAPCSTrusteeDealResponsePayload {
34
+ document: DealDocument;
35
+ ext?: Ext;
36
+ }
37
+ /**
38
+ * The voting/trustees/deal request, signed as the trustee.
39
+ */
40
+ export interface DealDocument {
41
+ id: string;
42
+ type: "https://trusttasks.org/spec/voting/trustees/deal/0.1";
43
+ /**
44
+ * The signer.
45
+ */
46
+ issuer: string;
47
+ /**
48
+ * The ballot box.
49
+ */
50
+ recipient: string;
51
+ issuedAt: string;
52
+ expiresAt?: string;
53
+ /**
54
+ * That task's request payload.
55
+ */
56
+ payload: {};
57
+ /**
58
+ * A Data Integrity proof by an `authentication` key of `issuer`.
59
+ */
60
+ proof: {};
61
+ }
62
+
63
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
64
+ export type { BoardVisibility, ChoiceQuestion, ElectionId, Ext, Key, Manifest, Question, QuestionOption, RankingQuestion, Revote, RollRule, ScoreQuestion, SecrecyLevel, SignedRequest, TextQuestion, TrusteeCeremony, Trustees };
65
+
66
+ /** Trust Task type URI. */
67
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/trustee/deal/0.5" as const;
68
+
69
+ /**
70
+ * The earlier version of this specification that this one declares it
71
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
72
+ * `null`. Only the direct declaration — follow the chain with
73
+ * `extendsChain` / `readForSpec`.
74
+ */
75
+ export const EXTENDS: string | null = null;
76
+
77
+ /**
78
+ * Why this version is deprecated, or `null` while it is current. A
79
+ * superseded or retired version is still supported, and is withdrawn from
80
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
81
+ * Versions").
82
+ */
83
+ export const DEPRECATION: string | null = null;
84
+
85
+ /** Stable alias for this specification's request payload shape. */
86
+ export type Payload = VTAPCSTrusteeDealPayload;
87
+
88
+ /** Trust Task response type URI (request type URI + "#response"). */
89
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/trustee/deal/0.5#response" as const;
90
+
91
+ /** Stable alias for this specification's success-response payload shape. */
92
+ export type Response = VTAPCSTrusteeDealResponsePayload;
93
+
94
+ /**
95
+ * This specification's payload schema, as a value.
96
+ *
97
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
98
+ * rather than only as a `.json` file because TypeScript types are erased
99
+ * at runtime: without a schema a consumer has nothing to validate, and
100
+ * every REQUIRED payload member is optional in practice. Cross-file
101
+ * `$ref`s are already inlined, so it needs no resolver.
102
+ */
103
+ export const PAYLOAD_SCHEMA = {
104
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
105
+ "$id": "https://trusttasks.org/spec/vta/pcs/trustee/deal/0.5",
106
+ "title": "VTA PCS — Trustee Deal — payload",
107
+ "description": "The trustee's VTA deals its contribution to the election key and returns the voting/trustees/deal request signed as the trustee.",
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "contextId",
112
+ "community",
113
+ "electionId",
114
+ "trustee",
115
+ "manifest",
116
+ "ceremony"
117
+ ],
118
+ "properties": {
119
+ "contextId": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "maxLength": 256,
123
+ "description": "The VTA context the trustee's keys live in."
124
+ },
125
+ "community": {
126
+ "type": "string",
127
+ "minLength": 1,
128
+ "maxLength": 2048,
129
+ "description": "The community's DID."
130
+ },
131
+ "electionId": {
132
+ "$ref": "#/$defs/ElectionId"
133
+ },
134
+ "trustee": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "maxLength": 2048,
138
+ "description": "The trustee's DID: a persona this VTA holds, named in the manifest's `trustees.dids`."
139
+ },
140
+ "manifest": {
141
+ "$ref": "#/$defs/Manifest"
142
+ },
143
+ "ceremony": {
144
+ "$ref": "#/$defs/TrusteeCeremony",
145
+ "description": "The ceremony as the board holds it: voting/trustees/status's `steps`, passed on unchanged. The VTA verifies every step as its trustee's before taking it."
146
+ },
147
+ "ext": {
148
+ "$ref": "#/$defs/Ext"
149
+ }
150
+ },
151
+ "$defs": {
152
+ "Response": {
153
+ "$anchor": "response",
154
+ "title": "VTA PCS — Trustee Deal — response payload",
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "document"
159
+ ],
160
+ "properties": {
161
+ "document": {
162
+ "title": "DealDocument",
163
+ "description": "The voting/trustees/deal request, signed as the trustee.",
164
+ "type": "object",
165
+ "required": [
166
+ "id",
167
+ "type",
168
+ "issuer",
169
+ "recipient",
170
+ "issuedAt",
171
+ "payload",
172
+ "proof"
173
+ ],
174
+ "properties": {
175
+ "id": {
176
+ "type": "string",
177
+ "pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
178
+ },
179
+ "type": {
180
+ "const": "https://trusttasks.org/spec/voting/trustees/deal/0.1"
181
+ },
182
+ "issuer": {
183
+ "type": "string",
184
+ "minLength": 1,
185
+ "maxLength": 2048,
186
+ "description": "The signer."
187
+ },
188
+ "recipient": {
189
+ "type": "string",
190
+ "minLength": 1,
191
+ "maxLength": 2048,
192
+ "description": "The ballot box."
193
+ },
194
+ "issuedAt": {
195
+ "type": "string",
196
+ "format": "date-time"
197
+ },
198
+ "expiresAt": {
199
+ "type": "string",
200
+ "format": "date-time"
201
+ },
202
+ "payload": {
203
+ "type": "object",
204
+ "description": "That task's request payload."
205
+ },
206
+ "proof": {
207
+ "type": "object",
208
+ "description": "A Data Integrity proof by an `authentication` key of `issuer`."
209
+ }
210
+ }
211
+ },
212
+ "ext": {
213
+ "$ref": "#/$defs/Ext"
214
+ }
215
+ }
216
+ },
217
+ "Ext": {
218
+ "title": "Ext",
219
+ "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.",
220
+ "type": "object",
221
+ "minProperties": 1,
222
+ "additionalProperties": true,
223
+ "propertyNames": {
224
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
225
+ }
226
+ },
227
+ "TrusteeCeremony": {
228
+ "title": "TrusteeCeremony",
229
+ "description": "The trustees' ceremony as the board holds it: the `request` of every `trusteeStep` entry, in board order, each exactly as the ballot box received it (CONVENTIONS §9.6). Whoever acts on it verifies each step as its trustee's before taking it; nothing in it is believed for having been passed along.",
230
+ "type": "array",
231
+ "minItems": 1,
232
+ "maxItems": 4224,
233
+ "items": {
234
+ "$ref": "#/$defs/SignedRequest"
235
+ }
236
+ },
237
+ "SignedRequest": {
238
+ "title": "SignedRequest",
239
+ "description": "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.",
240
+ "type": "object",
241
+ "minProperties": 1
242
+ },
243
+ "Manifest": {
244
+ "title": "Manifest",
245
+ "description": "What an election asks and how it is decided (VTI-VOT-010). Its digest (`manifestDigest`) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, and every cast is bound to it (VTI-VOT-011).",
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "electionId",
250
+ "community",
251
+ "questions",
252
+ "secrecy",
253
+ "roll",
254
+ "registrationOpensAt",
255
+ "votingOpensAt",
256
+ "votingClosesAt",
257
+ "revote",
258
+ "board",
259
+ "ballotBox",
260
+ "binding",
261
+ "allowEarlyClose",
262
+ "resultsBeforeClose",
263
+ "textReleaseThreshold"
264
+ ],
265
+ "properties": {
266
+ "electionId": {
267
+ "$ref": "#/$defs/ElectionId"
268
+ },
269
+ "community": {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "maxLength": 2048,
273
+ "description": "The community's DID."
274
+ },
275
+ "title": {
276
+ "type": "string",
277
+ "maxLength": 512
278
+ },
279
+ "description": {
280
+ "type": "string",
281
+ "maxLength": 8192
282
+ },
283
+ "questions": {
284
+ "type": "array",
285
+ "minItems": 1,
286
+ "maxItems": 128,
287
+ "items": {
288
+ "$ref": "#/$defs/Question"
289
+ }
290
+ },
291
+ "secrecy": {
292
+ "$ref": "#/$defs/SecrecyLevel"
293
+ },
294
+ "roll": {
295
+ "$ref": "#/$defs/RollRule"
296
+ },
297
+ "registrationOpensAt": {
298
+ "type": "string",
299
+ "format": "date-time"
300
+ },
301
+ "votingOpensAt": {
302
+ "type": "string",
303
+ "format": "date-time"
304
+ },
305
+ "votingClosesAt": {
306
+ "type": "string",
307
+ "format": "date-time"
308
+ },
309
+ "revote": {
310
+ "$ref": "#/$defs/Revote"
311
+ },
312
+ "board": {
313
+ "type": "object",
314
+ "additionalProperties": false,
315
+ "required": [
316
+ "visibility",
317
+ "auditors"
318
+ ],
319
+ "properties": {
320
+ "visibility": {
321
+ "$ref": "#/$defs/BoardVisibility"
322
+ },
323
+ "auditors": {
324
+ "type": "array",
325
+ "items": {
326
+ "type": "string",
327
+ "minLength": 1,
328
+ "maxLength": 2048
329
+ },
330
+ "uniqueItems": true
331
+ }
332
+ }
333
+ },
334
+ "ballotBox": {
335
+ "type": "string",
336
+ "minLength": 1,
337
+ "maxLength": 2048,
338
+ "description": "The DID of the voting service that holds the board."
339
+ },
340
+ "trustees": {
341
+ "$ref": "#/$defs/Trustees"
342
+ },
343
+ "binding": {
344
+ "type": "boolean",
345
+ "description": "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081)."
346
+ },
347
+ "allowEarlyClose": {
348
+ "type": "boolean"
349
+ },
350
+ "resultsBeforeClose": {
351
+ "type": "boolean",
352
+ "description": "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061)."
353
+ },
354
+ "textReleaseThreshold": {
355
+ "type": "integer",
356
+ "minimum": 1,
357
+ "description": "Counted ballots required before any text answer is disclosed (VTI-VOT-065). At least 1, and SHOULD be at least 10: a written answer can identify its author by what it says or how it is phrased, and the fewer the ballots released together, the easier that is. Where it is below 10, the disclosure a member is shown before they request a ticket MUST say so, and MUST say that a written answer may identify its author (VTI-VOT-090)."
358
+ }
359
+ }
360
+ },
361
+ "Trustees": {
362
+ "title": "Trustees",
363
+ "description": "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.",
364
+ "type": "object",
365
+ "additionalProperties": false,
366
+ "required": [
367
+ "dids",
368
+ "threshold"
369
+ ],
370
+ "properties": {
371
+ "dids": {
372
+ "type": "array",
373
+ "minItems": 2,
374
+ "items": {
375
+ "type": "string",
376
+ "minLength": 1,
377
+ "maxLength": 2048
378
+ },
379
+ "uniqueItems": true
380
+ },
381
+ "threshold": {
382
+ "type": "integer",
383
+ "minimum": 2
384
+ }
385
+ }
386
+ },
387
+ "BoardVisibility": {
388
+ "title": "BoardVisibility",
389
+ "description": "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).",
390
+ "type": "string",
391
+ "enum": [
392
+ "public",
393
+ "private"
394
+ ]
395
+ },
396
+ "Revote": {
397
+ "title": "Revote",
398
+ "description": "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).",
399
+ "type": "string",
400
+ "enum": [
401
+ "replace",
402
+ "refuse"
403
+ ]
404
+ },
405
+ "RollRule": {
406
+ "title": "RollRule",
407
+ "description": "Who may be issued a ticket (VTI-VOT-021): the community's active members (`members`), its active members and the parties `listed` names (`membersAndListed`), only the parties `listed` names (`listed`), or the holders of a membership credential for the one DID `memberOf` names (`credential`), proven by presentation when the holder claims their ticket and never resolved when the election is created (VTI-VOT-025). `memberOf` is present exactly when `rule` is `credential`, and `listed` is never present with it.",
408
+ "type": "object",
409
+ "additionalProperties": false,
410
+ "required": [
411
+ "rule"
412
+ ],
413
+ "properties": {
414
+ "rule": {
415
+ "type": "string",
416
+ "enum": [
417
+ "members",
418
+ "membersAndListed",
419
+ "listed",
420
+ "credential"
421
+ ]
422
+ },
423
+ "listed": {
424
+ "type": "array",
425
+ "items": {
426
+ "type": "string",
427
+ "minLength": 1,
428
+ "maxLength": 2048,
429
+ "description": "A DID enfranchised by name."
430
+ },
431
+ "uniqueItems": true
432
+ },
433
+ "memberOf": {
434
+ "type": "string",
435
+ "minLength": 8,
436
+ "maxLength": 2048,
437
+ "pattern": "^did:[a-z0-9]+:\\S+$",
438
+ "description": "The DID whose membership credential admits its holder, under the `credential` rule: this community, one of its groups, or a party that is itself an active member of this community — holding a membership credential this community issued it — such as another community, a group of another community, or a network (VTI-VOT-026). Always a DID, never a group's local identifier or name. A community refuses to create an election naming any other DID (vtc/elections/create:rollUntrusted)."
439
+ }
440
+ },
441
+ "dependentSchemas": {
442
+ "rule": {
443
+ "anyOf": [
444
+ {
445
+ "required": [
446
+ "memberOf"
447
+ ]
448
+ },
449
+ {
450
+ "properties": {
451
+ "rule": {
452
+ "enum": [
453
+ "members",
454
+ "membersAndListed",
455
+ "listed"
456
+ ]
457
+ }
458
+ }
459
+ }
460
+ ]
461
+ },
462
+ "memberOf": {
463
+ "properties": {
464
+ "rule": {
465
+ "const": "credential"
466
+ }
467
+ },
468
+ "not": {
469
+ "required": [
470
+ "listed"
471
+ ]
472
+ }
473
+ }
474
+ }
475
+ },
476
+ "SecrecyLevel": {
477
+ "title": "SecrecyLevel",
478
+ "description": "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).",
479
+ "type": "string",
480
+ "enum": [
481
+ "open",
482
+ "sealed",
483
+ "talliedEncrypted"
484
+ ]
485
+ },
486
+ "Question": {
487
+ "title": "Question",
488
+ "description": "One question. Tagged union over `type`.",
489
+ "oneOf": [
490
+ {
491
+ "title": "ChoiceQuestion",
492
+ "description": "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.",
493
+ "type": "object",
494
+ "additionalProperties": false,
495
+ "required": [
496
+ "key",
497
+ "type",
498
+ "options",
499
+ "minSelections",
500
+ "maxSelections",
501
+ "optional"
502
+ ],
503
+ "properties": {
504
+ "key": {
505
+ "$ref": "#/$defs/Key"
506
+ },
507
+ "type": {
508
+ "const": "choice"
509
+ },
510
+ "text": {
511
+ "type": "string",
512
+ "maxLength": 2048
513
+ },
514
+ "options": {
515
+ "type": "array",
516
+ "minItems": 2,
517
+ "maxItems": 256,
518
+ "items": {
519
+ "$ref": "#/$defs/QuestionOption"
520
+ }
521
+ },
522
+ "minSelections": {
523
+ "type": "integer",
524
+ "minimum": 0
525
+ },
526
+ "maxSelections": {
527
+ "type": "integer",
528
+ "minimum": 1
529
+ },
530
+ "optional": {
531
+ "type": "boolean"
532
+ }
533
+ }
534
+ },
535
+ {
536
+ "title": "RankingQuestion",
537
+ "description": "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.",
538
+ "type": "object",
539
+ "additionalProperties": false,
540
+ "required": [
541
+ "key",
542
+ "type",
543
+ "options",
544
+ "partial",
545
+ "optional"
546
+ ],
547
+ "properties": {
548
+ "key": {
549
+ "$ref": "#/$defs/Key"
550
+ },
551
+ "type": {
552
+ "const": "ranking"
553
+ },
554
+ "text": {
555
+ "type": "string",
556
+ "maxLength": 2048
557
+ },
558
+ "options": {
559
+ "type": "array",
560
+ "minItems": 2,
561
+ "maxItems": 64,
562
+ "items": {
563
+ "$ref": "#/$defs/QuestionOption"
564
+ }
565
+ },
566
+ "partial": {
567
+ "type": "boolean"
568
+ },
569
+ "optional": {
570
+ "type": "boolean"
571
+ }
572
+ }
573
+ },
574
+ {
575
+ "title": "ScoreQuestion",
576
+ "description": "Give each option an integer score within [min, max].",
577
+ "type": "object",
578
+ "additionalProperties": false,
579
+ "required": [
580
+ "key",
581
+ "type",
582
+ "options",
583
+ "min",
584
+ "max",
585
+ "optional"
586
+ ],
587
+ "properties": {
588
+ "key": {
589
+ "$ref": "#/$defs/Key"
590
+ },
591
+ "type": {
592
+ "const": "score"
593
+ },
594
+ "text": {
595
+ "type": "string",
596
+ "maxLength": 2048
597
+ },
598
+ "options": {
599
+ "type": "array",
600
+ "minItems": 1,
601
+ "maxItems": 256,
602
+ "items": {
603
+ "$ref": "#/$defs/QuestionOption"
604
+ }
605
+ },
606
+ "min": {
607
+ "type": "integer"
608
+ },
609
+ "max": {
610
+ "type": "integer"
611
+ },
612
+ "optional": {
613
+ "type": "boolean"
614
+ }
615
+ }
616
+ },
617
+ {
618
+ "title": "TextQuestion",
619
+ "description": "Free text of at most `maxLength` characters.",
620
+ "type": "object",
621
+ "additionalProperties": false,
622
+ "required": [
623
+ "key",
624
+ "type",
625
+ "maxLength",
626
+ "optional"
627
+ ],
628
+ "properties": {
629
+ "key": {
630
+ "$ref": "#/$defs/Key"
631
+ },
632
+ "type": {
633
+ "const": "text"
634
+ },
635
+ "text": {
636
+ "type": "string",
637
+ "maxLength": 2048
638
+ },
639
+ "maxLength": {
640
+ "type": "integer",
641
+ "minimum": 1,
642
+ "maximum": 4096
643
+ },
644
+ "optional": {
645
+ "type": "boolean"
646
+ }
647
+ }
648
+ }
649
+ ]
650
+ },
651
+ "Key": {
652
+ "title": "Key",
653
+ "description": "A question or option key, unique within its manifest or question.",
654
+ "type": "string",
655
+ "pattern": "^[A-Za-z0-9._-]{1,64}$"
656
+ },
657
+ "QuestionOption": {
658
+ "title": "QuestionOption",
659
+ "type": "object",
660
+ "additionalProperties": false,
661
+ "required": [
662
+ "key"
663
+ ],
664
+ "properties": {
665
+ "key": {
666
+ "$ref": "#/$defs/Key"
667
+ },
668
+ "label": {
669
+ "type": "string",
670
+ "maxLength": 512,
671
+ "description": "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014)."
672
+ }
673
+ }
674
+ },
675
+ "ElectionId": {
676
+ "title": "ElectionId",
677
+ "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.",
678
+ "type": "string",
679
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
680
+ }
681
+ }
682
+ } as const;
683
+
684
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
685
+ export const RESPONSE_PAYLOAD_SCHEMA = {
686
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
687
+ "$ref": "#/$defs/Response",
688
+ "$defs": {
689
+ "Response": {
690
+ "$anchor": "response",
691
+ "title": "VTA PCS — Trustee Deal — response payload",
692
+ "type": "object",
693
+ "additionalProperties": false,
694
+ "required": [
695
+ "document"
696
+ ],
697
+ "properties": {
698
+ "document": {
699
+ "title": "DealDocument",
700
+ "description": "The voting/trustees/deal request, signed as the trustee.",
701
+ "type": "object",
702
+ "required": [
703
+ "id",
704
+ "type",
705
+ "issuer",
706
+ "recipient",
707
+ "issuedAt",
708
+ "payload",
709
+ "proof"
710
+ ],
711
+ "properties": {
712
+ "id": {
713
+ "type": "string",
714
+ "pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
715
+ },
716
+ "type": {
717
+ "const": "https://trusttasks.org/spec/voting/trustees/deal/0.1"
718
+ },
719
+ "issuer": {
720
+ "type": "string",
721
+ "minLength": 1,
722
+ "maxLength": 2048,
723
+ "description": "The signer."
724
+ },
725
+ "recipient": {
726
+ "type": "string",
727
+ "minLength": 1,
728
+ "maxLength": 2048,
729
+ "description": "The ballot box."
730
+ },
731
+ "issuedAt": {
732
+ "type": "string",
733
+ "format": "date-time"
734
+ },
735
+ "expiresAt": {
736
+ "type": "string",
737
+ "format": "date-time"
738
+ },
739
+ "payload": {
740
+ "type": "object",
741
+ "description": "That task's request payload."
742
+ },
743
+ "proof": {
744
+ "type": "object",
745
+ "description": "A Data Integrity proof by an `authentication` key of `issuer`."
746
+ }
747
+ }
748
+ },
749
+ "ext": {
750
+ "$ref": "#/$defs/Ext"
751
+ }
752
+ }
753
+ },
754
+ "Ext": {
755
+ "title": "Ext",
756
+ "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.",
757
+ "type": "object",
758
+ "minProperties": 1,
759
+ "additionalProperties": true,
760
+ "propertyNames": {
761
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
762
+ }
763
+ },
764
+ "TrusteeCeremony": {
765
+ "title": "TrusteeCeremony",
766
+ "description": "The trustees' ceremony as the board holds it: the `request` of every `trusteeStep` entry, in board order, each exactly as the ballot box received it (CONVENTIONS §9.6). Whoever acts on it verifies each step as its trustee's before taking it; nothing in it is believed for having been passed along.",
767
+ "type": "array",
768
+ "minItems": 1,
769
+ "maxItems": 4224,
770
+ "items": {
771
+ "$ref": "#/$defs/SignedRequest"
772
+ }
773
+ },
774
+ "SignedRequest": {
775
+ "title": "SignedRequest",
776
+ "description": "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.",
777
+ "type": "object",
778
+ "minProperties": 1
779
+ },
780
+ "Manifest": {
781
+ "title": "Manifest",
782
+ "description": "What an election asks and how it is decided (VTI-VOT-010). Its digest (`manifestDigest`) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, and every cast is bound to it (VTI-VOT-011).",
783
+ "type": "object",
784
+ "additionalProperties": false,
785
+ "required": [
786
+ "electionId",
787
+ "community",
788
+ "questions",
789
+ "secrecy",
790
+ "roll",
791
+ "registrationOpensAt",
792
+ "votingOpensAt",
793
+ "votingClosesAt",
794
+ "revote",
795
+ "board",
796
+ "ballotBox",
797
+ "binding",
798
+ "allowEarlyClose",
799
+ "resultsBeforeClose",
800
+ "textReleaseThreshold"
801
+ ],
802
+ "properties": {
803
+ "electionId": {
804
+ "$ref": "#/$defs/ElectionId"
805
+ },
806
+ "community": {
807
+ "type": "string",
808
+ "minLength": 1,
809
+ "maxLength": 2048,
810
+ "description": "The community's DID."
811
+ },
812
+ "title": {
813
+ "type": "string",
814
+ "maxLength": 512
815
+ },
816
+ "description": {
817
+ "type": "string",
818
+ "maxLength": 8192
819
+ },
820
+ "questions": {
821
+ "type": "array",
822
+ "minItems": 1,
823
+ "maxItems": 128,
824
+ "items": {
825
+ "$ref": "#/$defs/Question"
826
+ }
827
+ },
828
+ "secrecy": {
829
+ "$ref": "#/$defs/SecrecyLevel"
830
+ },
831
+ "roll": {
832
+ "$ref": "#/$defs/RollRule"
833
+ },
834
+ "registrationOpensAt": {
835
+ "type": "string",
836
+ "format": "date-time"
837
+ },
838
+ "votingOpensAt": {
839
+ "type": "string",
840
+ "format": "date-time"
841
+ },
842
+ "votingClosesAt": {
843
+ "type": "string",
844
+ "format": "date-time"
845
+ },
846
+ "revote": {
847
+ "$ref": "#/$defs/Revote"
848
+ },
849
+ "board": {
850
+ "type": "object",
851
+ "additionalProperties": false,
852
+ "required": [
853
+ "visibility",
854
+ "auditors"
855
+ ],
856
+ "properties": {
857
+ "visibility": {
858
+ "$ref": "#/$defs/BoardVisibility"
859
+ },
860
+ "auditors": {
861
+ "type": "array",
862
+ "items": {
863
+ "type": "string",
864
+ "minLength": 1,
865
+ "maxLength": 2048
866
+ },
867
+ "uniqueItems": true
868
+ }
869
+ }
870
+ },
871
+ "ballotBox": {
872
+ "type": "string",
873
+ "minLength": 1,
874
+ "maxLength": 2048,
875
+ "description": "The DID of the voting service that holds the board."
876
+ },
877
+ "trustees": {
878
+ "$ref": "#/$defs/Trustees"
879
+ },
880
+ "binding": {
881
+ "type": "boolean",
882
+ "description": "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081)."
883
+ },
884
+ "allowEarlyClose": {
885
+ "type": "boolean"
886
+ },
887
+ "resultsBeforeClose": {
888
+ "type": "boolean",
889
+ "description": "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061)."
890
+ },
891
+ "textReleaseThreshold": {
892
+ "type": "integer",
893
+ "minimum": 1,
894
+ "description": "Counted ballots required before any text answer is disclosed (VTI-VOT-065). At least 1, and SHOULD be at least 10: a written answer can identify its author by what it says or how it is phrased, and the fewer the ballots released together, the easier that is. Where it is below 10, the disclosure a member is shown before they request a ticket MUST say so, and MUST say that a written answer may identify its author (VTI-VOT-090)."
895
+ }
896
+ }
897
+ },
898
+ "Trustees": {
899
+ "title": "Trustees",
900
+ "description": "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.",
901
+ "type": "object",
902
+ "additionalProperties": false,
903
+ "required": [
904
+ "dids",
905
+ "threshold"
906
+ ],
907
+ "properties": {
908
+ "dids": {
909
+ "type": "array",
910
+ "minItems": 2,
911
+ "items": {
912
+ "type": "string",
913
+ "minLength": 1,
914
+ "maxLength": 2048
915
+ },
916
+ "uniqueItems": true
917
+ },
918
+ "threshold": {
919
+ "type": "integer",
920
+ "minimum": 2
921
+ }
922
+ }
923
+ },
924
+ "BoardVisibility": {
925
+ "title": "BoardVisibility",
926
+ "description": "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).",
927
+ "type": "string",
928
+ "enum": [
929
+ "public",
930
+ "private"
931
+ ]
932
+ },
933
+ "Revote": {
934
+ "title": "Revote",
935
+ "description": "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).",
936
+ "type": "string",
937
+ "enum": [
938
+ "replace",
939
+ "refuse"
940
+ ]
941
+ },
942
+ "RollRule": {
943
+ "title": "RollRule",
944
+ "description": "Who may be issued a ticket (VTI-VOT-021): the community's active members (`members`), its active members and the parties `listed` names (`membersAndListed`), only the parties `listed` names (`listed`), or the holders of a membership credential for the one DID `memberOf` names (`credential`), proven by presentation when the holder claims their ticket and never resolved when the election is created (VTI-VOT-025). `memberOf` is present exactly when `rule` is `credential`, and `listed` is never present with it.",
945
+ "type": "object",
946
+ "additionalProperties": false,
947
+ "required": [
948
+ "rule"
949
+ ],
950
+ "properties": {
951
+ "rule": {
952
+ "type": "string",
953
+ "enum": [
954
+ "members",
955
+ "membersAndListed",
956
+ "listed",
957
+ "credential"
958
+ ]
959
+ },
960
+ "listed": {
961
+ "type": "array",
962
+ "items": {
963
+ "type": "string",
964
+ "minLength": 1,
965
+ "maxLength": 2048,
966
+ "description": "A DID enfranchised by name."
967
+ },
968
+ "uniqueItems": true
969
+ },
970
+ "memberOf": {
971
+ "type": "string",
972
+ "minLength": 8,
973
+ "maxLength": 2048,
974
+ "pattern": "^did:[a-z0-9]+:\\S+$",
975
+ "description": "The DID whose membership credential admits its holder, under the `credential` rule: this community, one of its groups, or a party that is itself an active member of this community — holding a membership credential this community issued it — such as another community, a group of another community, or a network (VTI-VOT-026). Always a DID, never a group's local identifier or name. A community refuses to create an election naming any other DID (vtc/elections/create:rollUntrusted)."
976
+ }
977
+ },
978
+ "dependentSchemas": {
979
+ "rule": {
980
+ "anyOf": [
981
+ {
982
+ "required": [
983
+ "memberOf"
984
+ ]
985
+ },
986
+ {
987
+ "properties": {
988
+ "rule": {
989
+ "enum": [
990
+ "members",
991
+ "membersAndListed",
992
+ "listed"
993
+ ]
994
+ }
995
+ }
996
+ }
997
+ ]
998
+ },
999
+ "memberOf": {
1000
+ "properties": {
1001
+ "rule": {
1002
+ "const": "credential"
1003
+ }
1004
+ },
1005
+ "not": {
1006
+ "required": [
1007
+ "listed"
1008
+ ]
1009
+ }
1010
+ }
1011
+ }
1012
+ },
1013
+ "SecrecyLevel": {
1014
+ "title": "SecrecyLevel",
1015
+ "description": "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).",
1016
+ "type": "string",
1017
+ "enum": [
1018
+ "open",
1019
+ "sealed",
1020
+ "talliedEncrypted"
1021
+ ]
1022
+ },
1023
+ "Question": {
1024
+ "title": "Question",
1025
+ "description": "One question. Tagged union over `type`.",
1026
+ "oneOf": [
1027
+ {
1028
+ "title": "ChoiceQuestion",
1029
+ "description": "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.",
1030
+ "type": "object",
1031
+ "additionalProperties": false,
1032
+ "required": [
1033
+ "key",
1034
+ "type",
1035
+ "options",
1036
+ "minSelections",
1037
+ "maxSelections",
1038
+ "optional"
1039
+ ],
1040
+ "properties": {
1041
+ "key": {
1042
+ "$ref": "#/$defs/Key"
1043
+ },
1044
+ "type": {
1045
+ "const": "choice"
1046
+ },
1047
+ "text": {
1048
+ "type": "string",
1049
+ "maxLength": 2048
1050
+ },
1051
+ "options": {
1052
+ "type": "array",
1053
+ "minItems": 2,
1054
+ "maxItems": 256,
1055
+ "items": {
1056
+ "$ref": "#/$defs/QuestionOption"
1057
+ }
1058
+ },
1059
+ "minSelections": {
1060
+ "type": "integer",
1061
+ "minimum": 0
1062
+ },
1063
+ "maxSelections": {
1064
+ "type": "integer",
1065
+ "minimum": 1
1066
+ },
1067
+ "optional": {
1068
+ "type": "boolean"
1069
+ }
1070
+ }
1071
+ },
1072
+ {
1073
+ "title": "RankingQuestion",
1074
+ "description": "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.",
1075
+ "type": "object",
1076
+ "additionalProperties": false,
1077
+ "required": [
1078
+ "key",
1079
+ "type",
1080
+ "options",
1081
+ "partial",
1082
+ "optional"
1083
+ ],
1084
+ "properties": {
1085
+ "key": {
1086
+ "$ref": "#/$defs/Key"
1087
+ },
1088
+ "type": {
1089
+ "const": "ranking"
1090
+ },
1091
+ "text": {
1092
+ "type": "string",
1093
+ "maxLength": 2048
1094
+ },
1095
+ "options": {
1096
+ "type": "array",
1097
+ "minItems": 2,
1098
+ "maxItems": 64,
1099
+ "items": {
1100
+ "$ref": "#/$defs/QuestionOption"
1101
+ }
1102
+ },
1103
+ "partial": {
1104
+ "type": "boolean"
1105
+ },
1106
+ "optional": {
1107
+ "type": "boolean"
1108
+ }
1109
+ }
1110
+ },
1111
+ {
1112
+ "title": "ScoreQuestion",
1113
+ "description": "Give each option an integer score within [min, max].",
1114
+ "type": "object",
1115
+ "additionalProperties": false,
1116
+ "required": [
1117
+ "key",
1118
+ "type",
1119
+ "options",
1120
+ "min",
1121
+ "max",
1122
+ "optional"
1123
+ ],
1124
+ "properties": {
1125
+ "key": {
1126
+ "$ref": "#/$defs/Key"
1127
+ },
1128
+ "type": {
1129
+ "const": "score"
1130
+ },
1131
+ "text": {
1132
+ "type": "string",
1133
+ "maxLength": 2048
1134
+ },
1135
+ "options": {
1136
+ "type": "array",
1137
+ "minItems": 1,
1138
+ "maxItems": 256,
1139
+ "items": {
1140
+ "$ref": "#/$defs/QuestionOption"
1141
+ }
1142
+ },
1143
+ "min": {
1144
+ "type": "integer"
1145
+ },
1146
+ "max": {
1147
+ "type": "integer"
1148
+ },
1149
+ "optional": {
1150
+ "type": "boolean"
1151
+ }
1152
+ }
1153
+ },
1154
+ {
1155
+ "title": "TextQuestion",
1156
+ "description": "Free text of at most `maxLength` characters.",
1157
+ "type": "object",
1158
+ "additionalProperties": false,
1159
+ "required": [
1160
+ "key",
1161
+ "type",
1162
+ "maxLength",
1163
+ "optional"
1164
+ ],
1165
+ "properties": {
1166
+ "key": {
1167
+ "$ref": "#/$defs/Key"
1168
+ },
1169
+ "type": {
1170
+ "const": "text"
1171
+ },
1172
+ "text": {
1173
+ "type": "string",
1174
+ "maxLength": 2048
1175
+ },
1176
+ "maxLength": {
1177
+ "type": "integer",
1178
+ "minimum": 1,
1179
+ "maximum": 4096
1180
+ },
1181
+ "optional": {
1182
+ "type": "boolean"
1183
+ }
1184
+ }
1185
+ }
1186
+ ]
1187
+ },
1188
+ "Key": {
1189
+ "title": "Key",
1190
+ "description": "A question or option key, unique within its manifest or question.",
1191
+ "type": "string",
1192
+ "pattern": "^[A-Za-z0-9._-]{1,64}$"
1193
+ },
1194
+ "QuestionOption": {
1195
+ "title": "QuestionOption",
1196
+ "type": "object",
1197
+ "additionalProperties": false,
1198
+ "required": [
1199
+ "key"
1200
+ ],
1201
+ "properties": {
1202
+ "key": {
1203
+ "$ref": "#/$defs/Key"
1204
+ },
1205
+ "label": {
1206
+ "type": "string",
1207
+ "maxLength": 512,
1208
+ "description": "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014)."
1209
+ }
1210
+ }
1211
+ },
1212
+ "ElectionId": {
1213
+ "title": "ElectionId",
1214
+ "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.",
1215
+ "type": "string",
1216
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
1217
+ }
1218
+ }
1219
+ } as const;
1220
+
1221
+ /**
1222
+ * SPEC.md §7.2 policy for the request variant, from this specification's
1223
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
1224
+ * per-specification and cannot be derived from the document alone, and
1225
+ * item 2 needs the schema this carries.
1226
+ */
1227
+ export const SPEC = {
1228
+ typeUri: TYPE_URI,
1229
+ isBearer: false,
1230
+ isProofRequired: true,
1231
+ isRecipientRequired: true,
1232
+ isIssuedAtRequired: true,
1233
+ payloadSchema: PAYLOAD_SCHEMA,
1234
+ } as const;
1235
+
1236
+ /**
1237
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
1238
+ * tracks the *issuer* party's requirement because a response swaps the
1239
+ * parties (§7.3 item 5).
1240
+ */
1241
+ export const RESPONSE_SPEC = {
1242
+ typeUri: RESPONSE_TYPE_URI,
1243
+ isBearer: false,
1244
+ isProofRequired: false,
1245
+ isRecipientRequired: true,
1246
+ isIssuedAtRequired: true,
1247
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
1248
+ } as const;