@openvtc/trust-tasks 0.26.20 → 0.26.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -0
- package/dist/_shared/components.d.ts +328 -17
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +4 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +4 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +4 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +4 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/voting/_shared/0.1/voting.d.ts +16 -0
- package/dist/voting/_shared/0.1/voting.d.ts.map +1 -0
- package/dist/voting/_shared/0.1/voting.js +6 -0
- package/dist/voting/_shared/0.1/voting.js.map +1 -0
- package/dist/voting/ballot/cast/0.1/payload.d.ts +887 -0
- package/dist/voting/ballot/cast/0.1/payload.d.ts.map +1 -0
- package/dist/voting/ballot/cast/0.1/payload.js +506 -0
- package/dist/voting/ballot/cast/0.1/payload.js.map +1 -0
- package/dist/voting/board/consistency/0.1/payload.d.ts +389 -0
- package/dist/voting/board/consistency/0.1/payload.d.ts.map +1 -0
- package/dist/voting/board/consistency/0.1/payload.js +218 -0
- package/dist/voting/board/consistency/0.1/payload.js.map +1 -0
- package/dist/voting/board/head/0.1/payload.d.ts +380 -0
- package/dist/voting/board/head/0.1/payload.d.ts.map +1 -0
- package/dist/voting/board/head/0.1/payload.js +224 -0
- package/dist/voting/board/head/0.1/payload.js.map +1 -0
- package/dist/voting/board/inclusion/0.1/payload.d.ts +449 -0
- package/dist/voting/board/inclusion/0.1/payload.d.ts.map +1 -0
- package/dist/voting/board/inclusion/0.1/payload.js +246 -0
- package/dist/voting/board/inclusion/0.1/payload.js.map +1 -0
- package/dist/voting/board/read/0.1/payload.d.ts +1596 -0
- package/dist/voting/board/read/0.1/payload.d.ts.map +1 -0
- package/dist/voting/board/read/0.1/payload.js +920 -0
- package/dist/voting/board/read/0.1/payload.js.map +1 -0
- package/dist/voting/election/cancel/0.1/payload.d.ts +540 -0
- package/dist/voting/election/cancel/0.1/payload.d.ts.map +1 -0
- package/dist/voting/election/cancel/0.1/payload.js +331 -0
- package/dist/voting/election/cancel/0.1/payload.js.map +1 -0
- package/dist/voting/election/close/0.1/payload.d.ts +540 -0
- package/dist/voting/election/close/0.1/payload.d.ts.map +1 -0
- package/dist/voting/election/close/0.1/payload.js +330 -0
- package/dist/voting/election/close/0.1/payload.js.map +1 -0
- package/dist/voting/election/register/0.1/payload.d.ts +1920 -0
- package/dist/voting/election/register/0.1/payload.d.ts.map +1 -0
- package/dist/voting/election/register/0.1/payload.js +1166 -0
- package/dist/voting/election/register/0.1/payload.js.map +1 -0
- package/dist/voting/election/show/0.1/payload.d.ts +1824 -0
- package/dist/voting/election/show/0.1/payload.d.ts.map +1 -0
- package/dist/voting/election/show/0.1/payload.js +1112 -0
- package/dist/voting/election/show/0.1/payload.js.map +1 -0
- package/dist/voting/result/show/0.1/payload.d.ts +849 -0
- package/dist/voting/result/show/0.1/payload.d.ts.map +1 -0
- package/dist/voting/result/show/0.1/payload.js +498 -0
- package/dist/voting/result/show/0.1/payload.js.map +1 -0
- package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
- package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
- package/dist/vta/_shared/0.4/pcs-engine.d.ts +1 -1
- package/dist/vta/_shared/0.4/pcs-engine.d.ts.map +1 -1
- package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
- package/dist/vta/pcs/applications/create/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/applications/create/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/applications/show/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/applications/show/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/attest/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/attest/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/prove/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/prove/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/root-accept/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/root-accept/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/vetter/show/0.1/payload.d.ts +1 -1
- package/dist/vta/pcs/vetter/show/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/vote/0.1/payload.d.ts +2208 -0
- package/dist/vta/pcs/vote/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/vote/0.1/payload.js +1282 -0
- package/dist/vta/pcs/vote/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/voter/accept/0.1/payload.d.ts +450 -0
- package/dist/vta/pcs/voter/accept/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/accept/0.1/payload.js +247 -0
- package/dist/vta/pcs/voter/accept/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/voter/receipt/0.1/payload.d.ts +531 -0
- package/dist/vta/pcs/voter/receipt/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/receipt/0.1/payload.js +301 -0
- package/dist/vta/pcs/voter/receipt/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/voter/register/0.1/payload.d.ts +1934 -0
- package/dist/vta/pcs/voter/register/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/register/0.1/payload.js +1133 -0
- package/dist/vta/pcs/voter/register/0.1/payload.js.map +1 -0
- package/dist/vtc/directory/card/present/0.1/payload.d.ts +2 -2
- package/dist/vtc/directory/card/present/0.1/payload.js +1 -1
- package/dist/vtc/directory/card/present/0.1/payload.js.map +1 -1
- package/dist/vtc/elections/cancel/0.1/payload.d.ts +301 -0
- package/dist/vtc/elections/cancel/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/cancel/0.1/payload.js +183 -0
- package/dist/vtc/elections/cancel/0.1/payload.js.map +1 -0
- package/dist/vtc/elections/certify/0.1/payload.d.ts +914 -0
- package/dist/vtc/elections/certify/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/certify/0.1/payload.js +512 -0
- package/dist/vtc/elections/certify/0.1/payload.js.map +1 -0
- package/dist/vtc/elections/close/0.1/payload.d.ts +301 -0
- package/dist/vtc/elections/close/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/close/0.1/payload.js +182 -0
- package/dist/vtc/elections/close/0.1/payload.js.map +1 -0
- package/dist/vtc/elections/create/0.1/payload.d.ts +1656 -0
- package/dist/vtc/elections/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/create/0.1/payload.js +994 -0
- package/dist/vtc/elections/create/0.1/payload.js.map +1 -0
- package/dist/vtc/elections/list/0.1/payload.d.ts +521 -0
- package/dist/vtc/elections/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/list/0.1/payload.js +290 -0
- package/dist/vtc/elections/list/0.1/payload.js.map +1 -0
- package/dist/vtc/elections/show/0.1/payload.d.ts +2688 -0
- package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/show/0.1/payload.js +1581 -0
- package/dist/vtc/elections/show/0.1/payload.js.map +1 -0
- package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts +597 -0
- package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/tickets/issue/0.1/payload.js +318 -0
- package/dist/vtc/elections/tickets/issue/0.1/payload.js.map +1 -0
- package/dist/vtc/groups/create/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/create/0.1/payload.js +2 -2
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/list/0.1/payload.js +2 -2
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/managers/add/0.1/payload.d.ts +337 -0
- package/dist/vtc/groups/managers/add/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/groups/managers/add/0.1/payload.js +184 -0
- package/dist/vtc/groups/managers/add/0.1/payload.js.map +1 -0
- package/dist/vtc/groups/managers/remove/0.1/payload.d.ts +337 -0
- package/dist/vtc/groups/managers/remove/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/groups/managers/remove/0.1/payload.js +184 -0
- package/dist/vtc/groups/managers/remove/0.1/payload.js.map +1 -0
- package/dist/vtc/groups/show/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/show/0.1/payload.js +2 -2
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/update/0.1/payload.js +2 -2
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +332 -17
- package/src/device/list/0.1/payload.ts +4 -2
- package/src/device/list/0.2/payload.ts +4 -2
- package/src/device/register/0.1/payload.ts +4 -2
- package/src/device/register/0.2/payload.ts +4 -2
- package/src/index.ts +24 -0
- package/src/voting/_shared/0.1/voting.ts +17 -0
- package/src/voting/ballot/cast/0.1/payload.ts +560 -0
- package/src/voting/board/consistency/0.1/payload.ts +264 -0
- package/src/voting/board/head/0.1/payload.ts +257 -0
- package/src/voting/board/inclusion/0.1/payload.ts +300 -0
- package/src/voting/board/read/0.1/payload.ts +981 -0
- package/src/voting/election/cancel/0.1/payload.ts +368 -0
- package/src/voting/election/close/0.1/payload.ts +367 -0
- package/src/voting/election/register/0.1/payload.ts +1207 -0
- package/src/voting/election/show/0.1/payload.ts +1149 -0
- package/src/voting/result/show/0.1/payload.ts +536 -0
- package/src/vta/_shared/0.1/app-state-record.ts +1 -1
- package/src/vta/_shared/0.4/pcs-engine.ts +1 -1
- package/src/vta/app-state/delete/1.0/payload.ts +1 -1
- package/src/vta/app-state/get/1.0/payload.ts +1 -1
- package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
- package/src/vta/app-state/list/1.0/payload.ts +1 -1
- package/src/vta/app-state/put/1.0/payload.ts +1 -1
- package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
- package/src/vta/pcs/applications/create/0.1/payload.ts +1 -1
- package/src/vta/pcs/applications/show/0.1/payload.ts +1 -1
- package/src/vta/pcs/attest/0.1/payload.ts +1 -1
- package/src/vta/pcs/prove/0.1/payload.ts +1 -1
- package/src/vta/pcs/root-accept/0.1/payload.ts +1 -1
- package/src/vta/pcs/tokens/abandon/0.1/payload.ts +1 -1
- package/src/vta/pcs/tokens/accept/0.1/payload.ts +1 -1
- package/src/vta/pcs/verify-attestation/0.1/payload.ts +1 -1
- package/src/vta/pcs/vetter/show/0.1/payload.ts +1 -1
- package/src/vta/pcs/vote/0.1/payload.ts +1365 -0
- package/src/vta/pcs/voter/accept/0.1/payload.ts +306 -0
- package/src/vta/pcs/voter/receipt/0.1/payload.ts +367 -0
- package/src/vta/pcs/voter/register/0.1/payload.ts +1211 -0
- package/src/vtc/directory/card/present/0.1/payload.ts +1 -1
- package/src/vtc/elections/cancel/0.1/payload.ts +223 -0
- package/src/vtc/elections/certify/0.1/payload.ts +565 -0
- package/src/vtc/elections/close/0.1/payload.ts +222 -0
- package/src/vtc/elections/create/0.1/payload.ts +1041 -0
- package/src/vtc/elections/list/0.1/payload.ts +371 -0
- package/src/vtc/elections/show/0.1/payload.ts +1671 -0
- package/src/vtc/elections/tickets/issue/0.1/payload.ts +394 -0
- package/src/vtc/groups/create/0.1/payload.ts +2 -2
- package/src/vtc/groups/list/0.1/payload.ts +2 -2
- package/src/vtc/groups/managers/add/0.1/payload.ts +230 -0
- package/src/vtc/groups/managers/remove/0.1/payload.ts +230 -0
- package/src/vtc/groups/show/0.1/payload.ts +2 -2
- package/src/vtc/groups/update/0.1/payload.ts +2 -2
|
@@ -0,0 +1,914 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/elections/certify/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { BoardHead, DigestMultibase, ElectionId, ElectionResult, Ext, Key_VotingV0_1 as Key, QuestionResult } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* An administrator has the community verify a tallied election's board for itself and certify its result. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCElectionsCertifyPayload {
|
|
10
|
+
electionId: ElectionId;
|
|
11
|
+
/**
|
|
12
|
+
* Attestations from auditors the manifest names in `board.auditors`, to be certified with the result.
|
|
13
|
+
*
|
|
14
|
+
* @maxItems 32
|
|
15
|
+
*/
|
|
16
|
+
auditAttestations?: {}[];
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Success response to vtc/elections/certify/0.1: the result the community verified and certified.
|
|
21
|
+
*/
|
|
22
|
+
export interface VTCElectionsCertifyResponsePayload {
|
|
23
|
+
electionId: ElectionId;
|
|
24
|
+
/**
|
|
25
|
+
* The result the community recomputed from the board, equal to the ballot box's.
|
|
26
|
+
*/
|
|
27
|
+
result: ElectionResult;
|
|
28
|
+
/**
|
|
29
|
+
* The board head the community verified: the head as it stood at close, which the result counts exactly.
|
|
30
|
+
*/
|
|
31
|
+
head: BoardHead;
|
|
32
|
+
certifiedAt: string;
|
|
33
|
+
/**
|
|
34
|
+
* The attestations certified with the result; empty when none was given.
|
|
35
|
+
*
|
|
36
|
+
* @maxItems 32
|
|
37
|
+
*/
|
|
38
|
+
auditAttestations: {}[];
|
|
39
|
+
ext?: Ext;
|
|
40
|
+
}
|
|
41
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
42
|
+
export type { BoardHead, DigestMultibase, ElectionId, ElectionResult, Ext, Key, QuestionResult };
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/elections/certify/0.1";
|
|
45
|
+
/** Stable alias for this specification's request payload shape. */
|
|
46
|
+
export type Payload = VTCElectionsCertifyPayload;
|
|
47
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
48
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/elections/certify/0.1#response";
|
|
49
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
50
|
+
export type Response = VTCElectionsCertifyResponsePayload;
|
|
51
|
+
/**
|
|
52
|
+
* This specification's payload schema, as a value.
|
|
53
|
+
*
|
|
54
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
55
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
56
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
57
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
58
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
59
|
+
*/
|
|
60
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
61
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
62
|
+
readonly $id: "https://trusttasks.org/spec/vtc/elections/certify/0.1";
|
|
63
|
+
readonly title: "VTC Elections — Certify — payload";
|
|
64
|
+
readonly description: "An administrator has the community verify a tallied election's board for itself and certify its result. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly additionalProperties: false;
|
|
67
|
+
readonly required: readonly ["electionId"];
|
|
68
|
+
readonly properties: {
|
|
69
|
+
readonly electionId: {
|
|
70
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
71
|
+
};
|
|
72
|
+
readonly auditAttestations: {
|
|
73
|
+
readonly type: "array";
|
|
74
|
+
readonly maxItems: 32;
|
|
75
|
+
readonly items: {
|
|
76
|
+
readonly type: "object";
|
|
77
|
+
readonly description: "A verifiable credential, as its auditor issued it, attesting the auditor's own recount of this election's board (VTI-VOT-073). Kept exactly as received.";
|
|
78
|
+
};
|
|
79
|
+
readonly description: "Attestations from auditors the manifest names in `board.auditors`, to be certified with the result.";
|
|
80
|
+
};
|
|
81
|
+
readonly ext: {
|
|
82
|
+
readonly $ref: "#/$defs/Ext";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly $defs: {
|
|
86
|
+
readonly Response: {
|
|
87
|
+
readonly $anchor: "response";
|
|
88
|
+
readonly title: "VTC Elections — Certify — response payload";
|
|
89
|
+
readonly description: "Success response to vtc/elections/certify/0.1: the result the community verified and certified.";
|
|
90
|
+
readonly type: "object";
|
|
91
|
+
readonly additionalProperties: false;
|
|
92
|
+
readonly required: readonly ["electionId", "result", "head", "certifiedAt", "auditAttestations"];
|
|
93
|
+
readonly properties: {
|
|
94
|
+
readonly electionId: {
|
|
95
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
96
|
+
};
|
|
97
|
+
readonly result: {
|
|
98
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
99
|
+
readonly description: "The result the community recomputed from the board, equal to the ballot box's.";
|
|
100
|
+
};
|
|
101
|
+
readonly head: {
|
|
102
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
103
|
+
readonly description: "The board head the community verified: the head as it stood at close, which the result counts exactly.";
|
|
104
|
+
};
|
|
105
|
+
readonly certifiedAt: {
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly format: "date-time";
|
|
108
|
+
readonly maxLength: 64;
|
|
109
|
+
};
|
|
110
|
+
readonly auditAttestations: {
|
|
111
|
+
readonly type: "array";
|
|
112
|
+
readonly maxItems: 32;
|
|
113
|
+
readonly items: {
|
|
114
|
+
readonly type: "object";
|
|
115
|
+
readonly description: "An auditor's attestation the community verified, as received.";
|
|
116
|
+
};
|
|
117
|
+
readonly description: "The attestations certified with the result; empty when none was given.";
|
|
118
|
+
};
|
|
119
|
+
readonly ext: {
|
|
120
|
+
readonly $ref: "#/$defs/Ext";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly Ext: {
|
|
125
|
+
readonly title: "Ext";
|
|
126
|
+
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.";
|
|
127
|
+
readonly type: "object";
|
|
128
|
+
readonly minProperties: 1;
|
|
129
|
+
readonly additionalProperties: true;
|
|
130
|
+
readonly propertyNames: {
|
|
131
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly BoardHead: {
|
|
135
|
+
readonly title: "BoardHead";
|
|
136
|
+
readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
|
|
137
|
+
readonly type: "object";
|
|
138
|
+
readonly additionalProperties: false;
|
|
139
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
140
|
+
readonly properties: {
|
|
141
|
+
readonly electionId: {
|
|
142
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
143
|
+
};
|
|
144
|
+
readonly treeSize: {
|
|
145
|
+
readonly type: "integer";
|
|
146
|
+
readonly minimum: 0;
|
|
147
|
+
};
|
|
148
|
+
readonly rootHash: {
|
|
149
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
150
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
151
|
+
};
|
|
152
|
+
readonly issuedAt: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly format: "date-time";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly ElectionId: {
|
|
159
|
+
readonly title: "ElectionId";
|
|
160
|
+
readonly description: "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.";
|
|
161
|
+
readonly type: "string";
|
|
162
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
163
|
+
};
|
|
164
|
+
readonly DigestMultibase: {
|
|
165
|
+
readonly title: "DigestMultibase";
|
|
166
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
readonly minLength: 16;
|
|
169
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
170
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
171
|
+
};
|
|
172
|
+
readonly ElectionResult: {
|
|
173
|
+
readonly title: "ElectionResult";
|
|
174
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
175
|
+
readonly type: "object";
|
|
176
|
+
readonly additionalProperties: false;
|
|
177
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
178
|
+
readonly properties: {
|
|
179
|
+
readonly electionId: {
|
|
180
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
181
|
+
};
|
|
182
|
+
readonly manifestDigest: {
|
|
183
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
184
|
+
};
|
|
185
|
+
readonly ballotsCounted: {
|
|
186
|
+
readonly type: "integer";
|
|
187
|
+
readonly minimum: 0;
|
|
188
|
+
};
|
|
189
|
+
readonly questions: {
|
|
190
|
+
readonly type: "array";
|
|
191
|
+
readonly items: {
|
|
192
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly head: {
|
|
196
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
197
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
readonly QuestionResult: {
|
|
202
|
+
readonly title: "QuestionResult";
|
|
203
|
+
readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
|
|
204
|
+
readonly type: "object";
|
|
205
|
+
readonly additionalProperties: false;
|
|
206
|
+
readonly required: readonly ["question", "abstained"];
|
|
207
|
+
readonly properties: {
|
|
208
|
+
readonly question: {
|
|
209
|
+
readonly $ref: "#/$defs/Key";
|
|
210
|
+
};
|
|
211
|
+
readonly abstained: {
|
|
212
|
+
readonly type: "integer";
|
|
213
|
+
readonly minimum: 0;
|
|
214
|
+
};
|
|
215
|
+
readonly choice: {
|
|
216
|
+
readonly type: "object";
|
|
217
|
+
readonly propertyNames: {
|
|
218
|
+
readonly $ref: "#/$defs/Key";
|
|
219
|
+
};
|
|
220
|
+
readonly additionalProperties: {
|
|
221
|
+
readonly type: "integer";
|
|
222
|
+
readonly minimum: 0;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
readonly ranking: {
|
|
226
|
+
readonly type: "object";
|
|
227
|
+
readonly propertyNames: {
|
|
228
|
+
readonly $ref: "#/$defs/Key";
|
|
229
|
+
};
|
|
230
|
+
readonly additionalProperties: {
|
|
231
|
+
readonly type: "array";
|
|
232
|
+
readonly items: {
|
|
233
|
+
readonly type: "integer";
|
|
234
|
+
readonly minimum: 0;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
readonly score: {
|
|
239
|
+
readonly type: "object";
|
|
240
|
+
readonly propertyNames: {
|
|
241
|
+
readonly $ref: "#/$defs/Key";
|
|
242
|
+
};
|
|
243
|
+
readonly additionalProperties: {
|
|
244
|
+
readonly type: "object";
|
|
245
|
+
readonly additionalProperties: false;
|
|
246
|
+
readonly required: readonly ["sum", "count"];
|
|
247
|
+
readonly properties: {
|
|
248
|
+
readonly sum: {
|
|
249
|
+
readonly type: "integer";
|
|
250
|
+
};
|
|
251
|
+
readonly count: {
|
|
252
|
+
readonly type: "integer";
|
|
253
|
+
readonly minimum: 0;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
readonly text: {
|
|
259
|
+
readonly type: "array";
|
|
260
|
+
readonly items: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly maxLength: 4096;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly withheld: {
|
|
266
|
+
readonly type: "boolean";
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly Key: {
|
|
271
|
+
readonly title: "Key";
|
|
272
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
279
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
280
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
281
|
+
readonly $ref: "#/$defs/Response";
|
|
282
|
+
readonly $defs: {
|
|
283
|
+
readonly Response: {
|
|
284
|
+
readonly $anchor: "response";
|
|
285
|
+
readonly title: "VTC Elections — Certify — response payload";
|
|
286
|
+
readonly description: "Success response to vtc/elections/certify/0.1: the result the community verified and certified.";
|
|
287
|
+
readonly type: "object";
|
|
288
|
+
readonly additionalProperties: false;
|
|
289
|
+
readonly required: readonly ["electionId", "result", "head", "certifiedAt", "auditAttestations"];
|
|
290
|
+
readonly properties: {
|
|
291
|
+
readonly electionId: {
|
|
292
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
293
|
+
};
|
|
294
|
+
readonly result: {
|
|
295
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
296
|
+
readonly description: "The result the community recomputed from the board, equal to the ballot box's.";
|
|
297
|
+
};
|
|
298
|
+
readonly head: {
|
|
299
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
300
|
+
readonly description: "The board head the community verified: the head as it stood at close, which the result counts exactly.";
|
|
301
|
+
};
|
|
302
|
+
readonly certifiedAt: {
|
|
303
|
+
readonly type: "string";
|
|
304
|
+
readonly format: "date-time";
|
|
305
|
+
readonly maxLength: 64;
|
|
306
|
+
};
|
|
307
|
+
readonly auditAttestations: {
|
|
308
|
+
readonly type: "array";
|
|
309
|
+
readonly maxItems: 32;
|
|
310
|
+
readonly items: {
|
|
311
|
+
readonly type: "object";
|
|
312
|
+
readonly description: "An auditor's attestation the community verified, as received.";
|
|
313
|
+
};
|
|
314
|
+
readonly description: "The attestations certified with the result; empty when none was given.";
|
|
315
|
+
};
|
|
316
|
+
readonly ext: {
|
|
317
|
+
readonly $ref: "#/$defs/Ext";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
readonly Ext: {
|
|
322
|
+
readonly title: "Ext";
|
|
323
|
+
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.";
|
|
324
|
+
readonly type: "object";
|
|
325
|
+
readonly minProperties: 1;
|
|
326
|
+
readonly additionalProperties: true;
|
|
327
|
+
readonly propertyNames: {
|
|
328
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
readonly BoardHead: {
|
|
332
|
+
readonly title: "BoardHead";
|
|
333
|
+
readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
|
|
334
|
+
readonly type: "object";
|
|
335
|
+
readonly additionalProperties: false;
|
|
336
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
337
|
+
readonly properties: {
|
|
338
|
+
readonly electionId: {
|
|
339
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
340
|
+
};
|
|
341
|
+
readonly treeSize: {
|
|
342
|
+
readonly type: "integer";
|
|
343
|
+
readonly minimum: 0;
|
|
344
|
+
};
|
|
345
|
+
readonly rootHash: {
|
|
346
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
347
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
348
|
+
};
|
|
349
|
+
readonly issuedAt: {
|
|
350
|
+
readonly type: "string";
|
|
351
|
+
readonly format: "date-time";
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
readonly ElectionId: {
|
|
356
|
+
readonly title: "ElectionId";
|
|
357
|
+
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.";
|
|
358
|
+
readonly type: "string";
|
|
359
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
360
|
+
};
|
|
361
|
+
readonly DigestMultibase: {
|
|
362
|
+
readonly title: "DigestMultibase";
|
|
363
|
+
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`.";
|
|
364
|
+
readonly type: "string";
|
|
365
|
+
readonly minLength: 16;
|
|
366
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
367
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
368
|
+
};
|
|
369
|
+
readonly ElectionResult: {
|
|
370
|
+
readonly title: "ElectionResult";
|
|
371
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
372
|
+
readonly type: "object";
|
|
373
|
+
readonly additionalProperties: false;
|
|
374
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
375
|
+
readonly properties: {
|
|
376
|
+
readonly electionId: {
|
|
377
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
378
|
+
};
|
|
379
|
+
readonly manifestDigest: {
|
|
380
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
381
|
+
};
|
|
382
|
+
readonly ballotsCounted: {
|
|
383
|
+
readonly type: "integer";
|
|
384
|
+
readonly minimum: 0;
|
|
385
|
+
};
|
|
386
|
+
readonly questions: {
|
|
387
|
+
readonly type: "array";
|
|
388
|
+
readonly items: {
|
|
389
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
readonly head: {
|
|
393
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
394
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
readonly QuestionResult: {
|
|
399
|
+
readonly title: "QuestionResult";
|
|
400
|
+
readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
|
|
401
|
+
readonly type: "object";
|
|
402
|
+
readonly additionalProperties: false;
|
|
403
|
+
readonly required: readonly ["question", "abstained"];
|
|
404
|
+
readonly properties: {
|
|
405
|
+
readonly question: {
|
|
406
|
+
readonly $ref: "#/$defs/Key";
|
|
407
|
+
};
|
|
408
|
+
readonly abstained: {
|
|
409
|
+
readonly type: "integer";
|
|
410
|
+
readonly minimum: 0;
|
|
411
|
+
};
|
|
412
|
+
readonly choice: {
|
|
413
|
+
readonly type: "object";
|
|
414
|
+
readonly propertyNames: {
|
|
415
|
+
readonly $ref: "#/$defs/Key";
|
|
416
|
+
};
|
|
417
|
+
readonly additionalProperties: {
|
|
418
|
+
readonly type: "integer";
|
|
419
|
+
readonly minimum: 0;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
readonly ranking: {
|
|
423
|
+
readonly type: "object";
|
|
424
|
+
readonly propertyNames: {
|
|
425
|
+
readonly $ref: "#/$defs/Key";
|
|
426
|
+
};
|
|
427
|
+
readonly additionalProperties: {
|
|
428
|
+
readonly type: "array";
|
|
429
|
+
readonly items: {
|
|
430
|
+
readonly type: "integer";
|
|
431
|
+
readonly minimum: 0;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
readonly score: {
|
|
436
|
+
readonly type: "object";
|
|
437
|
+
readonly propertyNames: {
|
|
438
|
+
readonly $ref: "#/$defs/Key";
|
|
439
|
+
};
|
|
440
|
+
readonly additionalProperties: {
|
|
441
|
+
readonly type: "object";
|
|
442
|
+
readonly additionalProperties: false;
|
|
443
|
+
readonly required: readonly ["sum", "count"];
|
|
444
|
+
readonly properties: {
|
|
445
|
+
readonly sum: {
|
|
446
|
+
readonly type: "integer";
|
|
447
|
+
};
|
|
448
|
+
readonly count: {
|
|
449
|
+
readonly type: "integer";
|
|
450
|
+
readonly minimum: 0;
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
readonly text: {
|
|
456
|
+
readonly type: "array";
|
|
457
|
+
readonly items: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
readonly maxLength: 4096;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
readonly withheld: {
|
|
463
|
+
readonly type: "boolean";
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
readonly Key: {
|
|
468
|
+
readonly title: "Key";
|
|
469
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
477
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
478
|
+
* per-specification and cannot be derived from the document alone, and
|
|
479
|
+
* item 2 needs the schema this carries.
|
|
480
|
+
*/
|
|
481
|
+
export declare const SPEC: {
|
|
482
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/elections/certify/0.1";
|
|
483
|
+
readonly isBearer: false;
|
|
484
|
+
readonly isProofRequired: true;
|
|
485
|
+
readonly isRecipientRequired: true;
|
|
486
|
+
readonly isIssuedAtRequired: true;
|
|
487
|
+
readonly payloadSchema: {
|
|
488
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
489
|
+
readonly $id: "https://trusttasks.org/spec/vtc/elections/certify/0.1";
|
|
490
|
+
readonly title: "VTC Elections — Certify — payload";
|
|
491
|
+
readonly description: "An administrator has the community verify a tallied election's board for itself and certify its result. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
492
|
+
readonly type: "object";
|
|
493
|
+
readonly additionalProperties: false;
|
|
494
|
+
readonly required: readonly ["electionId"];
|
|
495
|
+
readonly properties: {
|
|
496
|
+
readonly electionId: {
|
|
497
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
498
|
+
};
|
|
499
|
+
readonly auditAttestations: {
|
|
500
|
+
readonly type: "array";
|
|
501
|
+
readonly maxItems: 32;
|
|
502
|
+
readonly items: {
|
|
503
|
+
readonly type: "object";
|
|
504
|
+
readonly description: "A verifiable credential, as its auditor issued it, attesting the auditor's own recount of this election's board (VTI-VOT-073). Kept exactly as received.";
|
|
505
|
+
};
|
|
506
|
+
readonly description: "Attestations from auditors the manifest names in `board.auditors`, to be certified with the result.";
|
|
507
|
+
};
|
|
508
|
+
readonly ext: {
|
|
509
|
+
readonly $ref: "#/$defs/Ext";
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
readonly $defs: {
|
|
513
|
+
readonly Response: {
|
|
514
|
+
readonly $anchor: "response";
|
|
515
|
+
readonly title: "VTC Elections — Certify — response payload";
|
|
516
|
+
readonly description: "Success response to vtc/elections/certify/0.1: the result the community verified and certified.";
|
|
517
|
+
readonly type: "object";
|
|
518
|
+
readonly additionalProperties: false;
|
|
519
|
+
readonly required: readonly ["electionId", "result", "head", "certifiedAt", "auditAttestations"];
|
|
520
|
+
readonly properties: {
|
|
521
|
+
readonly electionId: {
|
|
522
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
523
|
+
};
|
|
524
|
+
readonly result: {
|
|
525
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
526
|
+
readonly description: "The result the community recomputed from the board, equal to the ballot box's.";
|
|
527
|
+
};
|
|
528
|
+
readonly head: {
|
|
529
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
530
|
+
readonly description: "The board head the community verified: the head as it stood at close, which the result counts exactly.";
|
|
531
|
+
};
|
|
532
|
+
readonly certifiedAt: {
|
|
533
|
+
readonly type: "string";
|
|
534
|
+
readonly format: "date-time";
|
|
535
|
+
readonly maxLength: 64;
|
|
536
|
+
};
|
|
537
|
+
readonly auditAttestations: {
|
|
538
|
+
readonly type: "array";
|
|
539
|
+
readonly maxItems: 32;
|
|
540
|
+
readonly items: {
|
|
541
|
+
readonly type: "object";
|
|
542
|
+
readonly description: "An auditor's attestation the community verified, as received.";
|
|
543
|
+
};
|
|
544
|
+
readonly description: "The attestations certified with the result; empty when none was given.";
|
|
545
|
+
};
|
|
546
|
+
readonly ext: {
|
|
547
|
+
readonly $ref: "#/$defs/Ext";
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
readonly Ext: {
|
|
552
|
+
readonly title: "Ext";
|
|
553
|
+
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.";
|
|
554
|
+
readonly type: "object";
|
|
555
|
+
readonly minProperties: 1;
|
|
556
|
+
readonly additionalProperties: true;
|
|
557
|
+
readonly propertyNames: {
|
|
558
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
readonly BoardHead: {
|
|
562
|
+
readonly title: "BoardHead";
|
|
563
|
+
readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
|
|
564
|
+
readonly type: "object";
|
|
565
|
+
readonly additionalProperties: false;
|
|
566
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
567
|
+
readonly properties: {
|
|
568
|
+
readonly electionId: {
|
|
569
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
570
|
+
};
|
|
571
|
+
readonly treeSize: {
|
|
572
|
+
readonly type: "integer";
|
|
573
|
+
readonly minimum: 0;
|
|
574
|
+
};
|
|
575
|
+
readonly rootHash: {
|
|
576
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
577
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
578
|
+
};
|
|
579
|
+
readonly issuedAt: {
|
|
580
|
+
readonly type: "string";
|
|
581
|
+
readonly format: "date-time";
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
readonly ElectionId: {
|
|
586
|
+
readonly title: "ElectionId";
|
|
587
|
+
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.";
|
|
588
|
+
readonly type: "string";
|
|
589
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
590
|
+
};
|
|
591
|
+
readonly DigestMultibase: {
|
|
592
|
+
readonly title: "DigestMultibase";
|
|
593
|
+
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`.";
|
|
594
|
+
readonly type: "string";
|
|
595
|
+
readonly minLength: 16;
|
|
596
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
597
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
598
|
+
};
|
|
599
|
+
readonly ElectionResult: {
|
|
600
|
+
readonly title: "ElectionResult";
|
|
601
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
602
|
+
readonly type: "object";
|
|
603
|
+
readonly additionalProperties: false;
|
|
604
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
605
|
+
readonly properties: {
|
|
606
|
+
readonly electionId: {
|
|
607
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
608
|
+
};
|
|
609
|
+
readonly manifestDigest: {
|
|
610
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
611
|
+
};
|
|
612
|
+
readonly ballotsCounted: {
|
|
613
|
+
readonly type: "integer";
|
|
614
|
+
readonly minimum: 0;
|
|
615
|
+
};
|
|
616
|
+
readonly questions: {
|
|
617
|
+
readonly type: "array";
|
|
618
|
+
readonly items: {
|
|
619
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
readonly head: {
|
|
623
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
624
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
readonly QuestionResult: {
|
|
629
|
+
readonly title: "QuestionResult";
|
|
630
|
+
readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
|
|
631
|
+
readonly type: "object";
|
|
632
|
+
readonly additionalProperties: false;
|
|
633
|
+
readonly required: readonly ["question", "abstained"];
|
|
634
|
+
readonly properties: {
|
|
635
|
+
readonly question: {
|
|
636
|
+
readonly $ref: "#/$defs/Key";
|
|
637
|
+
};
|
|
638
|
+
readonly abstained: {
|
|
639
|
+
readonly type: "integer";
|
|
640
|
+
readonly minimum: 0;
|
|
641
|
+
};
|
|
642
|
+
readonly choice: {
|
|
643
|
+
readonly type: "object";
|
|
644
|
+
readonly propertyNames: {
|
|
645
|
+
readonly $ref: "#/$defs/Key";
|
|
646
|
+
};
|
|
647
|
+
readonly additionalProperties: {
|
|
648
|
+
readonly type: "integer";
|
|
649
|
+
readonly minimum: 0;
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
readonly ranking: {
|
|
653
|
+
readonly type: "object";
|
|
654
|
+
readonly propertyNames: {
|
|
655
|
+
readonly $ref: "#/$defs/Key";
|
|
656
|
+
};
|
|
657
|
+
readonly additionalProperties: {
|
|
658
|
+
readonly type: "array";
|
|
659
|
+
readonly items: {
|
|
660
|
+
readonly type: "integer";
|
|
661
|
+
readonly minimum: 0;
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
readonly score: {
|
|
666
|
+
readonly type: "object";
|
|
667
|
+
readonly propertyNames: {
|
|
668
|
+
readonly $ref: "#/$defs/Key";
|
|
669
|
+
};
|
|
670
|
+
readonly additionalProperties: {
|
|
671
|
+
readonly type: "object";
|
|
672
|
+
readonly additionalProperties: false;
|
|
673
|
+
readonly required: readonly ["sum", "count"];
|
|
674
|
+
readonly properties: {
|
|
675
|
+
readonly sum: {
|
|
676
|
+
readonly type: "integer";
|
|
677
|
+
};
|
|
678
|
+
readonly count: {
|
|
679
|
+
readonly type: "integer";
|
|
680
|
+
readonly minimum: 0;
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
readonly text: {
|
|
686
|
+
readonly type: "array";
|
|
687
|
+
readonly items: {
|
|
688
|
+
readonly type: "string";
|
|
689
|
+
readonly maxLength: 4096;
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
readonly withheld: {
|
|
693
|
+
readonly type: "boolean";
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
};
|
|
697
|
+
readonly Key: {
|
|
698
|
+
readonly title: "Key";
|
|
699
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
700
|
+
readonly type: "string";
|
|
701
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
/**
|
|
707
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
708
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
709
|
+
* parties (§7.3 item 5).
|
|
710
|
+
*/
|
|
711
|
+
export declare const RESPONSE_SPEC: {
|
|
712
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/elections/certify/0.1#response";
|
|
713
|
+
readonly isBearer: false;
|
|
714
|
+
readonly isProofRequired: true;
|
|
715
|
+
readonly isRecipientRequired: true;
|
|
716
|
+
readonly isIssuedAtRequired: true;
|
|
717
|
+
readonly payloadSchema: {
|
|
718
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
719
|
+
readonly $ref: "#/$defs/Response";
|
|
720
|
+
readonly $defs: {
|
|
721
|
+
readonly Response: {
|
|
722
|
+
readonly $anchor: "response";
|
|
723
|
+
readonly title: "VTC Elections — Certify — response payload";
|
|
724
|
+
readonly description: "Success response to vtc/elections/certify/0.1: the result the community verified and certified.";
|
|
725
|
+
readonly type: "object";
|
|
726
|
+
readonly additionalProperties: false;
|
|
727
|
+
readonly required: readonly ["electionId", "result", "head", "certifiedAt", "auditAttestations"];
|
|
728
|
+
readonly properties: {
|
|
729
|
+
readonly electionId: {
|
|
730
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
731
|
+
};
|
|
732
|
+
readonly result: {
|
|
733
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
734
|
+
readonly description: "The result the community recomputed from the board, equal to the ballot box's.";
|
|
735
|
+
};
|
|
736
|
+
readonly head: {
|
|
737
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
738
|
+
readonly description: "The board head the community verified: the head as it stood at close, which the result counts exactly.";
|
|
739
|
+
};
|
|
740
|
+
readonly certifiedAt: {
|
|
741
|
+
readonly type: "string";
|
|
742
|
+
readonly format: "date-time";
|
|
743
|
+
readonly maxLength: 64;
|
|
744
|
+
};
|
|
745
|
+
readonly auditAttestations: {
|
|
746
|
+
readonly type: "array";
|
|
747
|
+
readonly maxItems: 32;
|
|
748
|
+
readonly items: {
|
|
749
|
+
readonly type: "object";
|
|
750
|
+
readonly description: "An auditor's attestation the community verified, as received.";
|
|
751
|
+
};
|
|
752
|
+
readonly description: "The attestations certified with the result; empty when none was given.";
|
|
753
|
+
};
|
|
754
|
+
readonly ext: {
|
|
755
|
+
readonly $ref: "#/$defs/Ext";
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
readonly Ext: {
|
|
760
|
+
readonly title: "Ext";
|
|
761
|
+
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.";
|
|
762
|
+
readonly type: "object";
|
|
763
|
+
readonly minProperties: 1;
|
|
764
|
+
readonly additionalProperties: true;
|
|
765
|
+
readonly propertyNames: {
|
|
766
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
readonly BoardHead: {
|
|
770
|
+
readonly title: "BoardHead";
|
|
771
|
+
readonly description: "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.";
|
|
772
|
+
readonly type: "object";
|
|
773
|
+
readonly additionalProperties: false;
|
|
774
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
775
|
+
readonly properties: {
|
|
776
|
+
readonly electionId: {
|
|
777
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
778
|
+
};
|
|
779
|
+
readonly treeSize: {
|
|
780
|
+
readonly type: "integer";
|
|
781
|
+
readonly minimum: 0;
|
|
782
|
+
};
|
|
783
|
+
readonly rootHash: {
|
|
784
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
785
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
786
|
+
};
|
|
787
|
+
readonly issuedAt: {
|
|
788
|
+
readonly type: "string";
|
|
789
|
+
readonly format: "date-time";
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
readonly ElectionId: {
|
|
794
|
+
readonly title: "ElectionId";
|
|
795
|
+
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.";
|
|
796
|
+
readonly type: "string";
|
|
797
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
798
|
+
};
|
|
799
|
+
readonly DigestMultibase: {
|
|
800
|
+
readonly title: "DigestMultibase";
|
|
801
|
+
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`.";
|
|
802
|
+
readonly type: "string";
|
|
803
|
+
readonly minLength: 16;
|
|
804
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
805
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
806
|
+
};
|
|
807
|
+
readonly ElectionResult: {
|
|
808
|
+
readonly title: "ElectionResult";
|
|
809
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
810
|
+
readonly type: "object";
|
|
811
|
+
readonly additionalProperties: false;
|
|
812
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
813
|
+
readonly properties: {
|
|
814
|
+
readonly electionId: {
|
|
815
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
816
|
+
};
|
|
817
|
+
readonly manifestDigest: {
|
|
818
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
819
|
+
};
|
|
820
|
+
readonly ballotsCounted: {
|
|
821
|
+
readonly type: "integer";
|
|
822
|
+
readonly minimum: 0;
|
|
823
|
+
};
|
|
824
|
+
readonly questions: {
|
|
825
|
+
readonly type: "array";
|
|
826
|
+
readonly items: {
|
|
827
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
readonly head: {
|
|
831
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
832
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
readonly QuestionResult: {
|
|
837
|
+
readonly title: "QuestionResult";
|
|
838
|
+
readonly description: "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.";
|
|
839
|
+
readonly type: "object";
|
|
840
|
+
readonly additionalProperties: false;
|
|
841
|
+
readonly required: readonly ["question", "abstained"];
|
|
842
|
+
readonly properties: {
|
|
843
|
+
readonly question: {
|
|
844
|
+
readonly $ref: "#/$defs/Key";
|
|
845
|
+
};
|
|
846
|
+
readonly abstained: {
|
|
847
|
+
readonly type: "integer";
|
|
848
|
+
readonly minimum: 0;
|
|
849
|
+
};
|
|
850
|
+
readonly choice: {
|
|
851
|
+
readonly type: "object";
|
|
852
|
+
readonly propertyNames: {
|
|
853
|
+
readonly $ref: "#/$defs/Key";
|
|
854
|
+
};
|
|
855
|
+
readonly additionalProperties: {
|
|
856
|
+
readonly type: "integer";
|
|
857
|
+
readonly minimum: 0;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly ranking: {
|
|
861
|
+
readonly type: "object";
|
|
862
|
+
readonly propertyNames: {
|
|
863
|
+
readonly $ref: "#/$defs/Key";
|
|
864
|
+
};
|
|
865
|
+
readonly additionalProperties: {
|
|
866
|
+
readonly type: "array";
|
|
867
|
+
readonly items: {
|
|
868
|
+
readonly type: "integer";
|
|
869
|
+
readonly minimum: 0;
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
readonly score: {
|
|
874
|
+
readonly type: "object";
|
|
875
|
+
readonly propertyNames: {
|
|
876
|
+
readonly $ref: "#/$defs/Key";
|
|
877
|
+
};
|
|
878
|
+
readonly additionalProperties: {
|
|
879
|
+
readonly type: "object";
|
|
880
|
+
readonly additionalProperties: false;
|
|
881
|
+
readonly required: readonly ["sum", "count"];
|
|
882
|
+
readonly properties: {
|
|
883
|
+
readonly sum: {
|
|
884
|
+
readonly type: "integer";
|
|
885
|
+
};
|
|
886
|
+
readonly count: {
|
|
887
|
+
readonly type: "integer";
|
|
888
|
+
readonly minimum: 0;
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
readonly text: {
|
|
894
|
+
readonly type: "array";
|
|
895
|
+
readonly items: {
|
|
896
|
+
readonly type: "string";
|
|
897
|
+
readonly maxLength: 4096;
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
readonly withheld: {
|
|
901
|
+
readonly type: "boolean";
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
readonly Key: {
|
|
906
|
+
readonly title: "Key";
|
|
907
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
908
|
+
readonly type: "string";
|
|
909
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
910
|
+
};
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
};
|
|
914
|
+
//# sourceMappingURL=payload.d.ts.map
|