@openvtc/trust-tasks 0.26.25 → 0.26.26
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 +54 -0
- package/dist/_shared/components.d.ts +207 -4
- 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 +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/voting/_shared/0.1/voting.d.ts +1 -1
- package/dist/voting/_shared/0.1/voting.d.ts.map +1 -1
- package/dist/voting/ballot/cast-encrypted/0.1/payload.d.ts +1166 -0
- package/dist/voting/ballot/cast-encrypted/0.1/payload.d.ts.map +1 -0
- package/dist/voting/ballot/cast-encrypted/0.1/payload.js +690 -0
- package/dist/voting/ballot/cast-encrypted/0.1/payload.js.map +1 -0
- package/dist/voting/board/read/0.1/payload.d.ts +2555 -719
- package/dist/voting/board/read/0.1/payload.d.ts.map +1 -1
- package/dist/voting/board/read/0.1/payload.js +1517 -391
- package/dist/voting/board/read/0.1/payload.js.map +1 -1
- package/dist/voting/election/register/0.1/payload.d.ts +4 -4
- package/dist/voting/election/register/0.1/payload.js +2 -2
- package/dist/voting/election/register/0.1/payload.js.map +1 -1
- package/dist/voting/election/show/0.1/payload.d.ts +4 -4
- package/dist/voting/election/show/0.1/payload.js +2 -2
- package/dist/voting/election/show/0.1/payload.js.map +1 -1
- package/dist/voting/trustees/confirm/0.1/payload.d.ts +620 -0
- package/dist/voting/trustees/confirm/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/confirm/0.1/payload.js +388 -0
- package/dist/voting/trustees/confirm/0.1/payload.js.map +1 -0
- package/dist/voting/trustees/deal/0.1/payload.d.ts +1032 -0
- package/dist/voting/trustees/deal/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/deal/0.1/payload.js +630 -0
- package/dist/voting/trustees/deal/0.1/payload.js.map +1 -0
- package/dist/voting/trustees/decrypt/0.1/payload.d.ts +1009 -0
- package/dist/voting/trustees/decrypt/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/decrypt/0.1/payload.js +623 -0
- package/dist/voting/trustees/decrypt/0.1/payload.js.map +1 -0
- package/dist/voting/trustees/enrol/0.1/payload.d.ts +792 -0
- package/dist/voting/trustees/enrol/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/enrol/0.1/payload.js +490 -0
- package/dist/voting/trustees/enrol/0.1/payload.js.map +1 -0
- package/dist/voting/trustees/justify/0.1/payload.d.ts +642 -0
- package/dist/voting/trustees/justify/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/justify/0.1/payload.js +402 -0
- package/dist/voting/trustees/justify/0.1/payload.js.map +1 -0
- package/dist/voting/trustees/status/0.1/payload.d.ts +1411 -0
- package/dist/voting/trustees/status/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/status/0.1/payload.js +822 -0
- package/dist/voting/trustees/status/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/deal/0.1/payload.d.ts +2005 -0
- package/dist/vta/pcs/trustee/deal/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/deal/0.1/payload.js +1176 -0
- package/dist/vta/pcs/trustee/deal/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.d.ts +736 -0
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.js +412 -0
- package/dist/vta/pcs/trustee/decrypt/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/enrol/0.1/payload.d.ts +1756 -0
- package/dist/vta/pcs/trustee/enrol/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/enrol/0.1/payload.js +1040 -0
- package/dist/vta/pcs/trustee/enrol/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/justify/0.1/payload.d.ts +504 -0
- package/dist/vta/pcs/trustee/justify/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/justify/0.1/payload.js +274 -0
- package/dist/vta/pcs/trustee/justify/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/keys/0.1/payload.d.ts +2501 -0
- package/dist/vta/pcs/trustee/keys/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/keys/0.1/payload.js +1455 -0
- package/dist/vta/pcs/trustee/keys/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/vote/0.1/payload.d.ts +4 -4
- package/dist/vta/pcs/vote/0.1/payload.js +2 -2
- package/dist/vta/pcs/vote/0.1/payload.js.map +1 -1
- package/dist/vta/pcs/vote-encrypted/0.1/payload.d.ts +2375 -0
- package/dist/vta/pcs/vote-encrypted/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/vote-encrypted/0.1/payload.js +1389 -0
- package/dist/vta/pcs/vote-encrypted/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/voter/register/0.1/payload.d.ts +4 -4
- package/dist/vta/pcs/voter/register/0.1/payload.js +2 -2
- package/dist/vta/pcs/voter/register/0.1/payload.js.map +1 -1
- package/dist/vtc/elections/create/0.1/payload.d.ts +4 -4
- package/dist/vtc/elections/create/0.1/payload.js +2 -2
- package/dist/vtc/elections/create/0.1/payload.js.map +1 -1
- package/dist/vtc/elections/show/0.1/payload.d.ts +4 -4
- package/dist/vtc/elections/show/0.1/payload.js +2 -2
- package/dist/vtc/elections/show/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +222 -4
- 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 +13 -0
- package/src/voting/_shared/0.1/voting.ts +1 -1
- package/src/voting/ballot/cast-encrypted/0.1/payload.ts +735 -0
- package/src/voting/board/read/0.1/payload.ts +1519 -393
- package/src/voting/election/register/0.1/payload.ts +2 -2
- package/src/voting/election/show/0.1/payload.ts +2 -2
- package/src/voting/trustees/confirm/0.1/payload.ts +429 -0
- package/src/voting/trustees/deal/0.1/payload.ts +665 -0
- package/src/voting/trustees/decrypt/0.1/payload.ts +663 -0
- package/src/voting/trustees/enrol/0.1/payload.ts +525 -0
- package/src/voting/trustees/justify/0.1/payload.ts +439 -0
- package/src/voting/trustees/status/0.1/payload.ts +890 -0
- package/src/vta/pcs/trustee/deal/0.1/payload.ts +1250 -0
- package/src/vta/pcs/trustee/decrypt/0.1/payload.ts +489 -0
- package/src/vta/pcs/trustee/enrol/0.1/payload.ts +1107 -0
- package/src/vta/pcs/trustee/justify/0.1/payload.ts +341 -0
- package/src/vta/pcs/trustee/keys/0.1/payload.ts +1545 -0
- package/src/vta/pcs/vote/0.1/payload.ts +2 -2
- package/src/vta/pcs/vote-encrypted/0.1/payload.ts +1455 -0
- package/src/vta/pcs/voter/register/0.1/payload.ts +2 -2
- package/src/vtc/elections/create/0.1/payload.ts +2 -2
- package/src/vtc/elections/show/0.1/payload.ts +2 -2
|
@@ -0,0 +1,1032 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/voting/trustees/deal/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { BoardHead, Dealing, DigestMultibase, ElectionId, ElectionState, ElectionSummary, ElGamalCiphertext, Ext, GroupElement, GroupScalar, SealedPayload, SealedShare, SigmaProof, TrusteeIndex, TrusteePhase } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* A trustee publishes its contribution to the election key: commitments to its polynomial and every trustee's share sealed to that trustee.
|
|
8
|
+
*/
|
|
9
|
+
export interface VotingTrusteesDealPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The community's DID: the registrar that registered the election.
|
|
12
|
+
*/
|
|
13
|
+
community: string;
|
|
14
|
+
electionId: ElectionId;
|
|
15
|
+
dealing: Dealing;
|
|
16
|
+
ext?: Ext;
|
|
17
|
+
}
|
|
18
|
+
export interface VotingTrusteesDealResponsePayload {
|
|
19
|
+
election: ElectionSummary;
|
|
20
|
+
phase: TrusteePhase;
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
24
|
+
export type { BoardHead, Dealing, DigestMultibase, ElectionId, ElectionState, ElectionSummary, ElGamalCiphertext, Ext, GroupElement, GroupScalar, SealedPayload, SealedShare, SigmaProof, TrusteeIndex, TrusteePhase };
|
|
25
|
+
/** Trust Task type URI. */
|
|
26
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/voting/trustees/deal/0.1";
|
|
27
|
+
/** Stable alias for this specification's request payload shape. */
|
|
28
|
+
export type Payload = VotingTrusteesDealPayload;
|
|
29
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
30
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/voting/trustees/deal/0.1#response";
|
|
31
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
32
|
+
export type Response = VotingTrusteesDealResponsePayload;
|
|
33
|
+
/**
|
|
34
|
+
* This specification's payload schema, as a value.
|
|
35
|
+
*
|
|
36
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
37
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
38
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
39
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
40
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
41
|
+
*/
|
|
42
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
43
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
44
|
+
readonly $id: "https://trusttasks.org/spec/voting/trustees/deal/0.1";
|
|
45
|
+
readonly title: "Voting — Trustees — Deal — payload";
|
|
46
|
+
readonly description: "A trustee publishes its contribution to the election key: commitments to its polynomial and every trustee's share sealed to that trustee.";
|
|
47
|
+
readonly type: "object";
|
|
48
|
+
readonly additionalProperties: false;
|
|
49
|
+
readonly required: readonly ["community", "electionId", "dealing"];
|
|
50
|
+
readonly properties: {
|
|
51
|
+
readonly community: {
|
|
52
|
+
readonly type: "string";
|
|
53
|
+
readonly minLength: 1;
|
|
54
|
+
readonly maxLength: 2048;
|
|
55
|
+
readonly description: "The community's DID: the registrar that registered the election.";
|
|
56
|
+
};
|
|
57
|
+
readonly electionId: {
|
|
58
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
59
|
+
};
|
|
60
|
+
readonly dealing: {
|
|
61
|
+
readonly $ref: "#/$defs/Dealing";
|
|
62
|
+
};
|
|
63
|
+
readonly ext: {
|
|
64
|
+
readonly $ref: "#/$defs/Ext";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
readonly $defs: {
|
|
68
|
+
readonly Response: {
|
|
69
|
+
readonly $anchor: "response";
|
|
70
|
+
readonly title: "Voting — Trustees — Deal — response payload";
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly additionalProperties: false;
|
|
73
|
+
readonly required: readonly ["election", "phase"];
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly election: {
|
|
76
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
77
|
+
};
|
|
78
|
+
readonly phase: {
|
|
79
|
+
readonly $ref: "#/$defs/TrusteePhase";
|
|
80
|
+
};
|
|
81
|
+
readonly ext: {
|
|
82
|
+
readonly $ref: "#/$defs/Ext";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
readonly Ext: {
|
|
87
|
+
readonly title: "Ext";
|
|
88
|
+
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.";
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly minProperties: 1;
|
|
91
|
+
readonly additionalProperties: true;
|
|
92
|
+
readonly propertyNames: {
|
|
93
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly TrusteePhase: {
|
|
97
|
+
readonly title: "TrusteePhase";
|
|
98
|
+
readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
|
|
101
|
+
};
|
|
102
|
+
readonly ElectionSummary: {
|
|
103
|
+
readonly title: "ElectionSummary";
|
|
104
|
+
readonly description: "A ballot box's view of one election.";
|
|
105
|
+
readonly type: "object";
|
|
106
|
+
readonly additionalProperties: false;
|
|
107
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
108
|
+
readonly properties: {
|
|
109
|
+
readonly electionId: {
|
|
110
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
111
|
+
};
|
|
112
|
+
readonly community: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly minLength: 1;
|
|
115
|
+
readonly maxLength: 2048;
|
|
116
|
+
};
|
|
117
|
+
readonly manifestDigest: {
|
|
118
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
119
|
+
};
|
|
120
|
+
readonly state: {
|
|
121
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
122
|
+
};
|
|
123
|
+
readonly ballotsAdmitted: {
|
|
124
|
+
readonly type: "integer";
|
|
125
|
+
readonly minimum: 0;
|
|
126
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
127
|
+
};
|
|
128
|
+
readonly head: {
|
|
129
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly BoardHead: {
|
|
134
|
+
readonly title: "BoardHead";
|
|
135
|
+
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.";
|
|
136
|
+
readonly type: "object";
|
|
137
|
+
readonly additionalProperties: false;
|
|
138
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
139
|
+
readonly properties: {
|
|
140
|
+
readonly electionId: {
|
|
141
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
142
|
+
};
|
|
143
|
+
readonly treeSize: {
|
|
144
|
+
readonly type: "integer";
|
|
145
|
+
readonly minimum: 0;
|
|
146
|
+
};
|
|
147
|
+
readonly rootHash: {
|
|
148
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
149
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
150
|
+
};
|
|
151
|
+
readonly issuedAt: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
readonly format: "date-time";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
readonly ElectionId: {
|
|
158
|
+
readonly title: "ElectionId";
|
|
159
|
+
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.";
|
|
160
|
+
readonly type: "string";
|
|
161
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
162
|
+
};
|
|
163
|
+
readonly DigestMultibase: {
|
|
164
|
+
readonly title: "DigestMultibase";
|
|
165
|
+
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`.";
|
|
166
|
+
readonly type: "string";
|
|
167
|
+
readonly minLength: 16;
|
|
168
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
169
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
170
|
+
};
|
|
171
|
+
readonly ElectionState: {
|
|
172
|
+
readonly title: "ElectionState";
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
175
|
+
};
|
|
176
|
+
readonly Dealing: {
|
|
177
|
+
readonly title: "Dealing";
|
|
178
|
+
readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
|
|
179
|
+
readonly type: "object";
|
|
180
|
+
readonly additionalProperties: false;
|
|
181
|
+
readonly required: readonly ["dealer", "commitments", "pok", "shares"];
|
|
182
|
+
readonly properties: {
|
|
183
|
+
readonly dealer: {
|
|
184
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
185
|
+
};
|
|
186
|
+
readonly commitments: {
|
|
187
|
+
readonly type: "array";
|
|
188
|
+
readonly minItems: 2;
|
|
189
|
+
readonly maxItems: 64;
|
|
190
|
+
readonly items: {
|
|
191
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly pok: {
|
|
195
|
+
readonly $ref: "#/$defs/SigmaProof";
|
|
196
|
+
};
|
|
197
|
+
readonly shares: {
|
|
198
|
+
readonly type: "array";
|
|
199
|
+
readonly minItems: 2;
|
|
200
|
+
readonly maxItems: 64;
|
|
201
|
+
readonly items: {
|
|
202
|
+
readonly $ref: "#/$defs/SealedShare";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
readonly SealedShare: {
|
|
208
|
+
readonly title: "SealedShare";
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
readonly required: readonly ["recipient", "share"];
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly recipient: {
|
|
214
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
215
|
+
};
|
|
216
|
+
readonly share: {
|
|
217
|
+
readonly $ref: "#/$defs/SealedPayload";
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
readonly SealedPayload: {
|
|
222
|
+
readonly title: "SealedPayload";
|
|
223
|
+
readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
|
|
224
|
+
readonly type: "object";
|
|
225
|
+
readonly additionalProperties: false;
|
|
226
|
+
readonly required: readonly ["kem", "body"];
|
|
227
|
+
readonly properties: {
|
|
228
|
+
readonly kem: {
|
|
229
|
+
readonly $ref: "#/$defs/ElGamalCiphertext";
|
|
230
|
+
};
|
|
231
|
+
readonly body: {
|
|
232
|
+
readonly type: "string";
|
|
233
|
+
readonly minLength: 2;
|
|
234
|
+
readonly maxLength: 131072;
|
|
235
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
readonly ElGamalCiphertext: {
|
|
240
|
+
readonly title: "ElGamalCiphertext";
|
|
241
|
+
readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
|
|
242
|
+
readonly type: "object";
|
|
243
|
+
readonly additionalProperties: false;
|
|
244
|
+
readonly required: readonly ["a", "b"];
|
|
245
|
+
readonly properties: {
|
|
246
|
+
readonly a: {
|
|
247
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
248
|
+
};
|
|
249
|
+
readonly b: {
|
|
250
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
readonly GroupElement: {
|
|
255
|
+
readonly title: "GroupElement";
|
|
256
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
257
|
+
readonly type: "string";
|
|
258
|
+
readonly minLength: 2;
|
|
259
|
+
readonly maxLength: 64;
|
|
260
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
261
|
+
};
|
|
262
|
+
readonly TrusteeIndex: {
|
|
263
|
+
readonly title: "TrusteeIndex";
|
|
264
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
265
|
+
readonly type: "integer";
|
|
266
|
+
readonly minimum: 1;
|
|
267
|
+
readonly maximum: 64;
|
|
268
|
+
};
|
|
269
|
+
readonly SigmaProof: {
|
|
270
|
+
readonly title: "SigmaProof";
|
|
271
|
+
readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
|
|
272
|
+
readonly type: "object";
|
|
273
|
+
readonly additionalProperties: false;
|
|
274
|
+
readonly required: readonly ["c", "z"];
|
|
275
|
+
readonly properties: {
|
|
276
|
+
readonly c: {
|
|
277
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
278
|
+
};
|
|
279
|
+
readonly z: {
|
|
280
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
readonly GroupScalar: {
|
|
285
|
+
readonly title: "GroupScalar";
|
|
286
|
+
readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
|
|
287
|
+
readonly type: "string";
|
|
288
|
+
readonly minLength: 2;
|
|
289
|
+
readonly maxLength: 64;
|
|
290
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
295
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
296
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
297
|
+
readonly $ref: "#/$defs/Response";
|
|
298
|
+
readonly $defs: {
|
|
299
|
+
readonly Response: {
|
|
300
|
+
readonly $anchor: "response";
|
|
301
|
+
readonly title: "Voting — Trustees — Deal — response payload";
|
|
302
|
+
readonly type: "object";
|
|
303
|
+
readonly additionalProperties: false;
|
|
304
|
+
readonly required: readonly ["election", "phase"];
|
|
305
|
+
readonly properties: {
|
|
306
|
+
readonly election: {
|
|
307
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
308
|
+
};
|
|
309
|
+
readonly phase: {
|
|
310
|
+
readonly $ref: "#/$defs/TrusteePhase";
|
|
311
|
+
};
|
|
312
|
+
readonly ext: {
|
|
313
|
+
readonly $ref: "#/$defs/Ext";
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly Ext: {
|
|
318
|
+
readonly title: "Ext";
|
|
319
|
+
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.";
|
|
320
|
+
readonly type: "object";
|
|
321
|
+
readonly minProperties: 1;
|
|
322
|
+
readonly additionalProperties: true;
|
|
323
|
+
readonly propertyNames: {
|
|
324
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly TrusteePhase: {
|
|
328
|
+
readonly title: "TrusteePhase";
|
|
329
|
+
readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
|
|
330
|
+
readonly type: "string";
|
|
331
|
+
readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
|
|
332
|
+
};
|
|
333
|
+
readonly ElectionSummary: {
|
|
334
|
+
readonly title: "ElectionSummary";
|
|
335
|
+
readonly description: "A ballot box's view of one election.";
|
|
336
|
+
readonly type: "object";
|
|
337
|
+
readonly additionalProperties: false;
|
|
338
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
339
|
+
readonly properties: {
|
|
340
|
+
readonly electionId: {
|
|
341
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
342
|
+
};
|
|
343
|
+
readonly community: {
|
|
344
|
+
readonly type: "string";
|
|
345
|
+
readonly minLength: 1;
|
|
346
|
+
readonly maxLength: 2048;
|
|
347
|
+
};
|
|
348
|
+
readonly manifestDigest: {
|
|
349
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
350
|
+
};
|
|
351
|
+
readonly state: {
|
|
352
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
353
|
+
};
|
|
354
|
+
readonly ballotsAdmitted: {
|
|
355
|
+
readonly type: "integer";
|
|
356
|
+
readonly minimum: 0;
|
|
357
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
358
|
+
};
|
|
359
|
+
readonly head: {
|
|
360
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
readonly BoardHead: {
|
|
365
|
+
readonly title: "BoardHead";
|
|
366
|
+
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.";
|
|
367
|
+
readonly type: "object";
|
|
368
|
+
readonly additionalProperties: false;
|
|
369
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
370
|
+
readonly properties: {
|
|
371
|
+
readonly electionId: {
|
|
372
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
373
|
+
};
|
|
374
|
+
readonly treeSize: {
|
|
375
|
+
readonly type: "integer";
|
|
376
|
+
readonly minimum: 0;
|
|
377
|
+
};
|
|
378
|
+
readonly rootHash: {
|
|
379
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
380
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
381
|
+
};
|
|
382
|
+
readonly issuedAt: {
|
|
383
|
+
readonly type: "string";
|
|
384
|
+
readonly format: "date-time";
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
readonly ElectionId: {
|
|
389
|
+
readonly title: "ElectionId";
|
|
390
|
+
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.";
|
|
391
|
+
readonly type: "string";
|
|
392
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
393
|
+
};
|
|
394
|
+
readonly DigestMultibase: {
|
|
395
|
+
readonly title: "DigestMultibase";
|
|
396
|
+
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`.";
|
|
397
|
+
readonly type: "string";
|
|
398
|
+
readonly minLength: 16;
|
|
399
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
400
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
401
|
+
};
|
|
402
|
+
readonly ElectionState: {
|
|
403
|
+
readonly title: "ElectionState";
|
|
404
|
+
readonly type: "string";
|
|
405
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
406
|
+
};
|
|
407
|
+
readonly Dealing: {
|
|
408
|
+
readonly title: "Dealing";
|
|
409
|
+
readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
|
|
410
|
+
readonly type: "object";
|
|
411
|
+
readonly additionalProperties: false;
|
|
412
|
+
readonly required: readonly ["dealer", "commitments", "pok", "shares"];
|
|
413
|
+
readonly properties: {
|
|
414
|
+
readonly dealer: {
|
|
415
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
416
|
+
};
|
|
417
|
+
readonly commitments: {
|
|
418
|
+
readonly type: "array";
|
|
419
|
+
readonly minItems: 2;
|
|
420
|
+
readonly maxItems: 64;
|
|
421
|
+
readonly items: {
|
|
422
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly pok: {
|
|
426
|
+
readonly $ref: "#/$defs/SigmaProof";
|
|
427
|
+
};
|
|
428
|
+
readonly shares: {
|
|
429
|
+
readonly type: "array";
|
|
430
|
+
readonly minItems: 2;
|
|
431
|
+
readonly maxItems: 64;
|
|
432
|
+
readonly items: {
|
|
433
|
+
readonly $ref: "#/$defs/SealedShare";
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
readonly SealedShare: {
|
|
439
|
+
readonly title: "SealedShare";
|
|
440
|
+
readonly type: "object";
|
|
441
|
+
readonly additionalProperties: false;
|
|
442
|
+
readonly required: readonly ["recipient", "share"];
|
|
443
|
+
readonly properties: {
|
|
444
|
+
readonly recipient: {
|
|
445
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
446
|
+
};
|
|
447
|
+
readonly share: {
|
|
448
|
+
readonly $ref: "#/$defs/SealedPayload";
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
readonly SealedPayload: {
|
|
453
|
+
readonly title: "SealedPayload";
|
|
454
|
+
readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
|
|
455
|
+
readonly type: "object";
|
|
456
|
+
readonly additionalProperties: false;
|
|
457
|
+
readonly required: readonly ["kem", "body"];
|
|
458
|
+
readonly properties: {
|
|
459
|
+
readonly kem: {
|
|
460
|
+
readonly $ref: "#/$defs/ElGamalCiphertext";
|
|
461
|
+
};
|
|
462
|
+
readonly body: {
|
|
463
|
+
readonly type: "string";
|
|
464
|
+
readonly minLength: 2;
|
|
465
|
+
readonly maxLength: 131072;
|
|
466
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
readonly ElGamalCiphertext: {
|
|
471
|
+
readonly title: "ElGamalCiphertext";
|
|
472
|
+
readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
|
|
473
|
+
readonly type: "object";
|
|
474
|
+
readonly additionalProperties: false;
|
|
475
|
+
readonly required: readonly ["a", "b"];
|
|
476
|
+
readonly properties: {
|
|
477
|
+
readonly a: {
|
|
478
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
479
|
+
};
|
|
480
|
+
readonly b: {
|
|
481
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
readonly GroupElement: {
|
|
486
|
+
readonly title: "GroupElement";
|
|
487
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
488
|
+
readonly type: "string";
|
|
489
|
+
readonly minLength: 2;
|
|
490
|
+
readonly maxLength: 64;
|
|
491
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
492
|
+
};
|
|
493
|
+
readonly TrusteeIndex: {
|
|
494
|
+
readonly title: "TrusteeIndex";
|
|
495
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
496
|
+
readonly type: "integer";
|
|
497
|
+
readonly minimum: 1;
|
|
498
|
+
readonly maximum: 64;
|
|
499
|
+
};
|
|
500
|
+
readonly SigmaProof: {
|
|
501
|
+
readonly title: "SigmaProof";
|
|
502
|
+
readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
|
|
503
|
+
readonly type: "object";
|
|
504
|
+
readonly additionalProperties: false;
|
|
505
|
+
readonly required: readonly ["c", "z"];
|
|
506
|
+
readonly properties: {
|
|
507
|
+
readonly c: {
|
|
508
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
509
|
+
};
|
|
510
|
+
readonly z: {
|
|
511
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
readonly GroupScalar: {
|
|
516
|
+
readonly title: "GroupScalar";
|
|
517
|
+
readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
|
|
518
|
+
readonly type: "string";
|
|
519
|
+
readonly minLength: 2;
|
|
520
|
+
readonly maxLength: 64;
|
|
521
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
527
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
528
|
+
* per-specification and cannot be derived from the document alone, and
|
|
529
|
+
* item 2 needs the schema this carries.
|
|
530
|
+
*/
|
|
531
|
+
export declare const SPEC: {
|
|
532
|
+
readonly typeUri: "https://trusttasks.org/spec/voting/trustees/deal/0.1";
|
|
533
|
+
readonly isBearer: false;
|
|
534
|
+
readonly isProofRequired: true;
|
|
535
|
+
readonly isRecipientRequired: true;
|
|
536
|
+
readonly isIssuedAtRequired: true;
|
|
537
|
+
readonly payloadSchema: {
|
|
538
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
539
|
+
readonly $id: "https://trusttasks.org/spec/voting/trustees/deal/0.1";
|
|
540
|
+
readonly title: "Voting — Trustees — Deal — payload";
|
|
541
|
+
readonly description: "A trustee publishes its contribution to the election key: commitments to its polynomial and every trustee's share sealed to that trustee.";
|
|
542
|
+
readonly type: "object";
|
|
543
|
+
readonly additionalProperties: false;
|
|
544
|
+
readonly required: readonly ["community", "electionId", "dealing"];
|
|
545
|
+
readonly properties: {
|
|
546
|
+
readonly community: {
|
|
547
|
+
readonly type: "string";
|
|
548
|
+
readonly minLength: 1;
|
|
549
|
+
readonly maxLength: 2048;
|
|
550
|
+
readonly description: "The community's DID: the registrar that registered the election.";
|
|
551
|
+
};
|
|
552
|
+
readonly electionId: {
|
|
553
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
554
|
+
};
|
|
555
|
+
readonly dealing: {
|
|
556
|
+
readonly $ref: "#/$defs/Dealing";
|
|
557
|
+
};
|
|
558
|
+
readonly ext: {
|
|
559
|
+
readonly $ref: "#/$defs/Ext";
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
readonly $defs: {
|
|
563
|
+
readonly Response: {
|
|
564
|
+
readonly $anchor: "response";
|
|
565
|
+
readonly title: "Voting — Trustees — Deal — response payload";
|
|
566
|
+
readonly type: "object";
|
|
567
|
+
readonly additionalProperties: false;
|
|
568
|
+
readonly required: readonly ["election", "phase"];
|
|
569
|
+
readonly properties: {
|
|
570
|
+
readonly election: {
|
|
571
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
572
|
+
};
|
|
573
|
+
readonly phase: {
|
|
574
|
+
readonly $ref: "#/$defs/TrusteePhase";
|
|
575
|
+
};
|
|
576
|
+
readonly ext: {
|
|
577
|
+
readonly $ref: "#/$defs/Ext";
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
readonly Ext: {
|
|
582
|
+
readonly title: "Ext";
|
|
583
|
+
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.";
|
|
584
|
+
readonly type: "object";
|
|
585
|
+
readonly minProperties: 1;
|
|
586
|
+
readonly additionalProperties: true;
|
|
587
|
+
readonly propertyNames: {
|
|
588
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
readonly TrusteePhase: {
|
|
592
|
+
readonly title: "TrusteePhase";
|
|
593
|
+
readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
|
|
594
|
+
readonly type: "string";
|
|
595
|
+
readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
|
|
596
|
+
};
|
|
597
|
+
readonly ElectionSummary: {
|
|
598
|
+
readonly title: "ElectionSummary";
|
|
599
|
+
readonly description: "A ballot box's view of one election.";
|
|
600
|
+
readonly type: "object";
|
|
601
|
+
readonly additionalProperties: false;
|
|
602
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
603
|
+
readonly properties: {
|
|
604
|
+
readonly electionId: {
|
|
605
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
606
|
+
};
|
|
607
|
+
readonly community: {
|
|
608
|
+
readonly type: "string";
|
|
609
|
+
readonly minLength: 1;
|
|
610
|
+
readonly maxLength: 2048;
|
|
611
|
+
};
|
|
612
|
+
readonly manifestDigest: {
|
|
613
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
614
|
+
};
|
|
615
|
+
readonly state: {
|
|
616
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
617
|
+
};
|
|
618
|
+
readonly ballotsAdmitted: {
|
|
619
|
+
readonly type: "integer";
|
|
620
|
+
readonly minimum: 0;
|
|
621
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
622
|
+
};
|
|
623
|
+
readonly head: {
|
|
624
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
readonly BoardHead: {
|
|
629
|
+
readonly title: "BoardHead";
|
|
630
|
+
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.";
|
|
631
|
+
readonly type: "object";
|
|
632
|
+
readonly additionalProperties: false;
|
|
633
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
634
|
+
readonly properties: {
|
|
635
|
+
readonly electionId: {
|
|
636
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
637
|
+
};
|
|
638
|
+
readonly treeSize: {
|
|
639
|
+
readonly type: "integer";
|
|
640
|
+
readonly minimum: 0;
|
|
641
|
+
};
|
|
642
|
+
readonly rootHash: {
|
|
643
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
644
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
645
|
+
};
|
|
646
|
+
readonly issuedAt: {
|
|
647
|
+
readonly type: "string";
|
|
648
|
+
readonly format: "date-time";
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
readonly ElectionId: {
|
|
653
|
+
readonly title: "ElectionId";
|
|
654
|
+
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.";
|
|
655
|
+
readonly type: "string";
|
|
656
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
657
|
+
};
|
|
658
|
+
readonly DigestMultibase: {
|
|
659
|
+
readonly title: "DigestMultibase";
|
|
660
|
+
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`.";
|
|
661
|
+
readonly type: "string";
|
|
662
|
+
readonly minLength: 16;
|
|
663
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
664
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
665
|
+
};
|
|
666
|
+
readonly ElectionState: {
|
|
667
|
+
readonly title: "ElectionState";
|
|
668
|
+
readonly type: "string";
|
|
669
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
670
|
+
};
|
|
671
|
+
readonly Dealing: {
|
|
672
|
+
readonly title: "Dealing";
|
|
673
|
+
readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
|
|
674
|
+
readonly type: "object";
|
|
675
|
+
readonly additionalProperties: false;
|
|
676
|
+
readonly required: readonly ["dealer", "commitments", "pok", "shares"];
|
|
677
|
+
readonly properties: {
|
|
678
|
+
readonly dealer: {
|
|
679
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
680
|
+
};
|
|
681
|
+
readonly commitments: {
|
|
682
|
+
readonly type: "array";
|
|
683
|
+
readonly minItems: 2;
|
|
684
|
+
readonly maxItems: 64;
|
|
685
|
+
readonly items: {
|
|
686
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
readonly pok: {
|
|
690
|
+
readonly $ref: "#/$defs/SigmaProof";
|
|
691
|
+
};
|
|
692
|
+
readonly shares: {
|
|
693
|
+
readonly type: "array";
|
|
694
|
+
readonly minItems: 2;
|
|
695
|
+
readonly maxItems: 64;
|
|
696
|
+
readonly items: {
|
|
697
|
+
readonly $ref: "#/$defs/SealedShare";
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
readonly SealedShare: {
|
|
703
|
+
readonly title: "SealedShare";
|
|
704
|
+
readonly type: "object";
|
|
705
|
+
readonly additionalProperties: false;
|
|
706
|
+
readonly required: readonly ["recipient", "share"];
|
|
707
|
+
readonly properties: {
|
|
708
|
+
readonly recipient: {
|
|
709
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
710
|
+
};
|
|
711
|
+
readonly share: {
|
|
712
|
+
readonly $ref: "#/$defs/SealedPayload";
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
readonly SealedPayload: {
|
|
717
|
+
readonly title: "SealedPayload";
|
|
718
|
+
readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
|
|
719
|
+
readonly type: "object";
|
|
720
|
+
readonly additionalProperties: false;
|
|
721
|
+
readonly required: readonly ["kem", "body"];
|
|
722
|
+
readonly properties: {
|
|
723
|
+
readonly kem: {
|
|
724
|
+
readonly $ref: "#/$defs/ElGamalCiphertext";
|
|
725
|
+
};
|
|
726
|
+
readonly body: {
|
|
727
|
+
readonly type: "string";
|
|
728
|
+
readonly minLength: 2;
|
|
729
|
+
readonly maxLength: 131072;
|
|
730
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
readonly ElGamalCiphertext: {
|
|
735
|
+
readonly title: "ElGamalCiphertext";
|
|
736
|
+
readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
|
|
737
|
+
readonly type: "object";
|
|
738
|
+
readonly additionalProperties: false;
|
|
739
|
+
readonly required: readonly ["a", "b"];
|
|
740
|
+
readonly properties: {
|
|
741
|
+
readonly a: {
|
|
742
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
743
|
+
};
|
|
744
|
+
readonly b: {
|
|
745
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
readonly GroupElement: {
|
|
750
|
+
readonly title: "GroupElement";
|
|
751
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
752
|
+
readonly type: "string";
|
|
753
|
+
readonly minLength: 2;
|
|
754
|
+
readonly maxLength: 64;
|
|
755
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
756
|
+
};
|
|
757
|
+
readonly TrusteeIndex: {
|
|
758
|
+
readonly title: "TrusteeIndex";
|
|
759
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
760
|
+
readonly type: "integer";
|
|
761
|
+
readonly minimum: 1;
|
|
762
|
+
readonly maximum: 64;
|
|
763
|
+
};
|
|
764
|
+
readonly SigmaProof: {
|
|
765
|
+
readonly title: "SigmaProof";
|
|
766
|
+
readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
|
|
767
|
+
readonly type: "object";
|
|
768
|
+
readonly additionalProperties: false;
|
|
769
|
+
readonly required: readonly ["c", "z"];
|
|
770
|
+
readonly properties: {
|
|
771
|
+
readonly c: {
|
|
772
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
773
|
+
};
|
|
774
|
+
readonly z: {
|
|
775
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
readonly GroupScalar: {
|
|
780
|
+
readonly title: "GroupScalar";
|
|
781
|
+
readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
|
|
782
|
+
readonly type: "string";
|
|
783
|
+
readonly minLength: 2;
|
|
784
|
+
readonly maxLength: 64;
|
|
785
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
};
|
|
790
|
+
/**
|
|
791
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
792
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
793
|
+
* parties (§7.3 item 5).
|
|
794
|
+
*/
|
|
795
|
+
export declare const RESPONSE_SPEC: {
|
|
796
|
+
readonly typeUri: "https://trusttasks.org/spec/voting/trustees/deal/0.1#response";
|
|
797
|
+
readonly isBearer: false;
|
|
798
|
+
readonly isProofRequired: true;
|
|
799
|
+
readonly isRecipientRequired: true;
|
|
800
|
+
readonly isIssuedAtRequired: true;
|
|
801
|
+
readonly payloadSchema: {
|
|
802
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
803
|
+
readonly $ref: "#/$defs/Response";
|
|
804
|
+
readonly $defs: {
|
|
805
|
+
readonly Response: {
|
|
806
|
+
readonly $anchor: "response";
|
|
807
|
+
readonly title: "Voting — Trustees — Deal — response payload";
|
|
808
|
+
readonly type: "object";
|
|
809
|
+
readonly additionalProperties: false;
|
|
810
|
+
readonly required: readonly ["election", "phase"];
|
|
811
|
+
readonly properties: {
|
|
812
|
+
readonly election: {
|
|
813
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
814
|
+
};
|
|
815
|
+
readonly phase: {
|
|
816
|
+
readonly $ref: "#/$defs/TrusteePhase";
|
|
817
|
+
};
|
|
818
|
+
readonly ext: {
|
|
819
|
+
readonly $ref: "#/$defs/Ext";
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
readonly Ext: {
|
|
824
|
+
readonly title: "Ext";
|
|
825
|
+
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.";
|
|
826
|
+
readonly type: "object";
|
|
827
|
+
readonly minProperties: 1;
|
|
828
|
+
readonly additionalProperties: true;
|
|
829
|
+
readonly propertyNames: {
|
|
830
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
readonly TrusteePhase: {
|
|
834
|
+
readonly title: "TrusteePhase";
|
|
835
|
+
readonly description: "`enrolling`: transport keys are being published. `dealing`: dealings are. `confirming`: each trustee confirms or complains. `keyed`: the election key is formed. `decrypting`: voting has closed and partial decryptions are being published. `done`: every target is decrypted. `failed`: the key could not be formed in time.";
|
|
836
|
+
readonly type: "string";
|
|
837
|
+
readonly enum: readonly ["enrolling", "dealing", "confirming", "keyed", "decrypting", "done", "failed"];
|
|
838
|
+
};
|
|
839
|
+
readonly ElectionSummary: {
|
|
840
|
+
readonly title: "ElectionSummary";
|
|
841
|
+
readonly description: "A ballot box's view of one election.";
|
|
842
|
+
readonly type: "object";
|
|
843
|
+
readonly additionalProperties: false;
|
|
844
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
845
|
+
readonly properties: {
|
|
846
|
+
readonly electionId: {
|
|
847
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
848
|
+
};
|
|
849
|
+
readonly community: {
|
|
850
|
+
readonly type: "string";
|
|
851
|
+
readonly minLength: 1;
|
|
852
|
+
readonly maxLength: 2048;
|
|
853
|
+
};
|
|
854
|
+
readonly manifestDigest: {
|
|
855
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
856
|
+
};
|
|
857
|
+
readonly state: {
|
|
858
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
859
|
+
};
|
|
860
|
+
readonly ballotsAdmitted: {
|
|
861
|
+
readonly type: "integer";
|
|
862
|
+
readonly minimum: 0;
|
|
863
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
864
|
+
};
|
|
865
|
+
readonly head: {
|
|
866
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
readonly BoardHead: {
|
|
871
|
+
readonly title: "BoardHead";
|
|
872
|
+
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.";
|
|
873
|
+
readonly type: "object";
|
|
874
|
+
readonly additionalProperties: false;
|
|
875
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
876
|
+
readonly properties: {
|
|
877
|
+
readonly electionId: {
|
|
878
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
879
|
+
};
|
|
880
|
+
readonly treeSize: {
|
|
881
|
+
readonly type: "integer";
|
|
882
|
+
readonly minimum: 0;
|
|
883
|
+
};
|
|
884
|
+
readonly rootHash: {
|
|
885
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
886
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
887
|
+
};
|
|
888
|
+
readonly issuedAt: {
|
|
889
|
+
readonly type: "string";
|
|
890
|
+
readonly format: "date-time";
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
readonly ElectionId: {
|
|
895
|
+
readonly title: "ElectionId";
|
|
896
|
+
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.";
|
|
897
|
+
readonly type: "string";
|
|
898
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
899
|
+
};
|
|
900
|
+
readonly DigestMultibase: {
|
|
901
|
+
readonly title: "DigestMultibase";
|
|
902
|
+
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`.";
|
|
903
|
+
readonly type: "string";
|
|
904
|
+
readonly minLength: 16;
|
|
905
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
906
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
907
|
+
};
|
|
908
|
+
readonly ElectionState: {
|
|
909
|
+
readonly title: "ElectionState";
|
|
910
|
+
readonly type: "string";
|
|
911
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
912
|
+
};
|
|
913
|
+
readonly Dealing: {
|
|
914
|
+
readonly title: "Dealing";
|
|
915
|
+
readonly description: "A trustee's contribution to the election key: Feldman commitments to its polynomial, a proof of knowledge of the constant term, and one share per trustee sealed to that trustee's transport key (CONVENTIONS §9.6).";
|
|
916
|
+
readonly type: "object";
|
|
917
|
+
readonly additionalProperties: false;
|
|
918
|
+
readonly required: readonly ["dealer", "commitments", "pok", "shares"];
|
|
919
|
+
readonly properties: {
|
|
920
|
+
readonly dealer: {
|
|
921
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
922
|
+
};
|
|
923
|
+
readonly commitments: {
|
|
924
|
+
readonly type: "array";
|
|
925
|
+
readonly minItems: 2;
|
|
926
|
+
readonly maxItems: 64;
|
|
927
|
+
readonly items: {
|
|
928
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
readonly pok: {
|
|
932
|
+
readonly $ref: "#/$defs/SigmaProof";
|
|
933
|
+
};
|
|
934
|
+
readonly shares: {
|
|
935
|
+
readonly type: "array";
|
|
936
|
+
readonly minItems: 2;
|
|
937
|
+
readonly maxItems: 64;
|
|
938
|
+
readonly items: {
|
|
939
|
+
readonly $ref: "#/$defs/SealedShare";
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
readonly SealedShare: {
|
|
945
|
+
readonly title: "SealedShare";
|
|
946
|
+
readonly type: "object";
|
|
947
|
+
readonly additionalProperties: false;
|
|
948
|
+
readonly required: readonly ["recipient", "share"];
|
|
949
|
+
readonly properties: {
|
|
950
|
+
readonly recipient: {
|
|
951
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
952
|
+
};
|
|
953
|
+
readonly share: {
|
|
954
|
+
readonly $ref: "#/$defs/SealedPayload";
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
readonly SealedPayload: {
|
|
959
|
+
readonly title: "SealedPayload";
|
|
960
|
+
readonly description: "Bytes sealed to a key: a random group element encrypted as `kem`, and the bytes under ChaCha20-Poly1305 with a key derived from it, multibase base58btc (CONVENTIONS §9.4).";
|
|
961
|
+
readonly type: "object";
|
|
962
|
+
readonly additionalProperties: false;
|
|
963
|
+
readonly required: readonly ["kem", "body"];
|
|
964
|
+
readonly properties: {
|
|
965
|
+
readonly kem: {
|
|
966
|
+
readonly $ref: "#/$defs/ElGamalCiphertext";
|
|
967
|
+
};
|
|
968
|
+
readonly body: {
|
|
969
|
+
readonly type: "string";
|
|
970
|
+
readonly minLength: 2;
|
|
971
|
+
readonly maxLength: 131072;
|
|
972
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
973
|
+
};
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
readonly ElGamalCiphertext: {
|
|
977
|
+
readonly title: "ElGamalCiphertext";
|
|
978
|
+
readonly description: "`(a, b) = (r·G, M + r·Y)` under the election key `Y` (CONVENTIONS §9.2).";
|
|
979
|
+
readonly type: "object";
|
|
980
|
+
readonly additionalProperties: false;
|
|
981
|
+
readonly required: readonly ["a", "b"];
|
|
982
|
+
readonly properties: {
|
|
983
|
+
readonly a: {
|
|
984
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
985
|
+
};
|
|
986
|
+
readonly b: {
|
|
987
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
};
|
|
991
|
+
readonly GroupElement: {
|
|
992
|
+
readonly title: "GroupElement";
|
|
993
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
994
|
+
readonly type: "string";
|
|
995
|
+
readonly minLength: 2;
|
|
996
|
+
readonly maxLength: 64;
|
|
997
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
998
|
+
};
|
|
999
|
+
readonly TrusteeIndex: {
|
|
1000
|
+
readonly title: "TrusteeIndex";
|
|
1001
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
1002
|
+
readonly type: "integer";
|
|
1003
|
+
readonly minimum: 1;
|
|
1004
|
+
readonly maximum: 64;
|
|
1005
|
+
};
|
|
1006
|
+
readonly SigmaProof: {
|
|
1007
|
+
readonly title: "SigmaProof";
|
|
1008
|
+
readonly description: "A non-interactive sigma proof as its challenge and response `(c, z)` (Schnorr or Chaum–Pedersen; CONVENTIONS §9.3).";
|
|
1009
|
+
readonly type: "object";
|
|
1010
|
+
readonly additionalProperties: false;
|
|
1011
|
+
readonly required: readonly ["c", "z"];
|
|
1012
|
+
readonly properties: {
|
|
1013
|
+
readonly c: {
|
|
1014
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
1015
|
+
};
|
|
1016
|
+
readonly z: {
|
|
1017
|
+
readonly $ref: "#/$defs/GroupScalar";
|
|
1018
|
+
};
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
readonly GroupScalar: {
|
|
1022
|
+
readonly title: "GroupScalar";
|
|
1023
|
+
readonly description: "A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase base58btc (CONVENTIONS §9.1).";
|
|
1024
|
+
readonly type: "string";
|
|
1025
|
+
readonly minLength: 2;
|
|
1026
|
+
readonly maxLength: 64;
|
|
1027
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
//# sourceMappingURL=payload.d.ts.map
|