@openvtc/trust-tasks 0.28.8 → 0.28.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -0
- package/dist/_extends.d.ts.map +1 -1
- package/dist/_extends.js +5 -0
- package/dist/_extends.js.map +1 -1
- package/dist/_shared/components.d.ts +288 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/git-ns/bridge/event/0.1/payload.d.ts +4 -4
- package/dist/git-ns/bridge/event/0.1/payload.js +1 -1
- package/dist/git-ns/bridge/event/0.2/payload.d.ts +4 -4
- package/dist/git-ns/bridge/event/0.2/payload.js +1 -1
- package/dist/git-ns/bridge/event/0.3/payload.d.ts +4 -4
- package/dist/git-ns/bridge/event/0.3/payload.js +1 -1
- package/dist/git-ns/bridge/event/0.4/payload.d.ts +4 -4
- package/dist/git-ns/bridge/event/0.4/payload.js +1 -1
- package/dist/git-ns/bridge/event/0.5/payload.d.ts +14 -2
- package/dist/git-ns/bridge/event/0.5/payload.d.ts.map +1 -1
- package/dist/git-ns/bridge/event/0.5/payload.js +1 -1
- package/dist/git-ns/bridge/event/0.5/payload.js.map +1 -1
- package/dist/git-ns/bridge/event/0.6/payload.d.ts +2067 -0
- package/dist/git-ns/bridge/event/0.6/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/event/0.6/payload.js +1119 -0
- package/dist/git-ns/bridge/event/0.6/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/0.1/payload.d.ts +4 -4
- package/dist/git-ns/bridge/job/0.1/payload.js +1 -1
- package/dist/git-ns/bridge/job/0.2/payload.d.ts +4 -4
- package/dist/git-ns/bridge/job/0.2/payload.js +1 -1
- package/dist/git-ns/bridge/job/0.3/payload.d.ts +4 -4
- package/dist/git-ns/bridge/job/0.3/payload.js +1 -1
- package/dist/git-ns/bridge/job/0.4/payload.d.ts +4 -4
- package/dist/git-ns/bridge/job/0.4/payload.js +1 -1
- package/dist/git-ns/bridge/job/0.5/payload.d.ts +4 -4
- package/dist/git-ns/bridge/job/0.5/payload.js +1 -1
- package/dist/git-ns/bridge/job/0.6/payload.d.ts +14 -2
- package/dist/git-ns/bridge/job/0.6/payload.d.ts.map +1 -1
- package/dist/git-ns/bridge/job/0.6/payload.js +1 -1
- package/dist/git-ns/bridge/job/0.6/payload.js.map +1 -1
- package/dist/git-ns/bridge/job/0.7/payload.d.ts +1120 -0
- package/dist/git-ns/bridge/job/0.7/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.7/payload.js +608 -0
- package/dist/git-ns/bridge/job/0.7/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/list/0.4/payload.d.ts +5 -5
- package/dist/git-ns/bridge/job/list/0.4/payload.js +2 -2
- package/dist/index.d.ts +123 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -1
- package/dist/notifications/_shared/0.1/notification.d.ts +22 -0
- package/dist/notifications/_shared/0.1/notification.d.ts.map +1 -0
- package/dist/notifications/_shared/0.1/notification.js +6 -0
- package/dist/notifications/_shared/0.1/notification.js.map +1 -0
- package/dist/notifications/notify/0.1/payload.d.ts +652 -0
- package/dist/notifications/notify/0.1/payload.d.ts.map +1 -0
- package/dist/notifications/notify/0.1/payload.js +383 -0
- package/dist/notifications/notify/0.1/payload.js.map +1 -0
- package/dist/notifications/relay/0.1/payload.d.ts +309 -0
- package/dist/notifications/relay/0.1/payload.d.ts.map +1 -0
- package/dist/notifications/relay/0.1/payload.js +179 -0
- package/dist/notifications/relay/0.1/payload.js.map +1 -0
- package/dist/voting/_shared/0.4/voting.d.ts +16 -0
- package/dist/voting/_shared/0.4/voting.d.ts.map +1 -0
- package/dist/voting/_shared/0.4/voting.js +6 -0
- package/dist/voting/_shared/0.4/voting.js.map +1 -0
- package/dist/voting/election/register/0.1/payload.d.ts +4 -4
- package/dist/voting/election/register/0.1/payload.js +1 -1
- package/dist/voting/election/register/0.2/payload.d.ts +4 -4
- package/dist/voting/election/register/0.2/payload.js +1 -1
- package/dist/voting/election/register/0.3/payload.d.ts +13 -2
- package/dist/voting/election/register/0.3/payload.d.ts.map +1 -1
- package/dist/voting/election/register/0.3/payload.js +1 -1
- package/dist/voting/election/register/0.3/payload.js.map +1 -1
- package/dist/voting/election/register/0.4/payload.d.ts +2054 -0
- package/dist/voting/election/register/0.4/payload.d.ts.map +1 -0
- package/dist/voting/election/register/0.4/payload.js +1264 -0
- package/dist/voting/election/register/0.4/payload.js.map +1 -0
- package/dist/voting/election/show/0.1/payload.d.ts +4 -4
- package/dist/voting/election/show/0.1/payload.js +1 -1
- package/dist/voting/election/show/0.2/payload.d.ts +4 -4
- package/dist/voting/election/show/0.2/payload.js +1 -1
- package/dist/voting/election/show/0.3/payload.d.ts +13 -2
- package/dist/voting/election/show/0.3/payload.d.ts.map +1 -1
- package/dist/voting/election/show/0.3/payload.js +1 -1
- package/dist/voting/election/show/0.3/payload.js.map +1 -1
- package/dist/voting/election/show/0.4/payload.d.ts +1958 -0
- package/dist/voting/election/show/0.4/payload.d.ts.map +1 -0
- package/dist/voting/election/show/0.4/payload.js +1210 -0
- package/dist/voting/election/show/0.4/payload.js.map +1 -0
- package/dist/vta/notifications/_shared/0.1/held-notification.d.ts +16 -0
- package/dist/vta/notifications/_shared/0.1/held-notification.d.ts.map +1 -0
- package/dist/vta/notifications/_shared/0.1/held-notification.js +6 -0
- package/dist/vta/notifications/_shared/0.1/held-notification.js.map +1 -0
- package/dist/vta/notifications/dismiss/0.1/payload.d.ts +300 -0
- package/dist/vta/notifications/dismiss/0.1/payload.d.ts.map +1 -0
- package/dist/vta/notifications/dismiss/0.1/payload.js +179 -0
- package/dist/vta/notifications/dismiss/0.1/payload.js.map +1 -0
- package/dist/vta/notifications/list/0.1/payload.d.ts +1100 -0
- package/dist/vta/notifications/list/0.1/payload.d.ts.map +1 -0
- package/dist/vta/notifications/list/0.1/payload.js +627 -0
- package/dist/vta/notifications/list/0.1/payload.js.map +1 -0
- package/dist/vta/notifications/show/0.1/payload.d.ts +1004 -0
- package/dist/vta/notifications/show/0.1/payload.d.ts.map +1 -0
- package/dist/vta/notifications/show/0.1/payload.js +595 -0
- package/dist/vta/notifications/show/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/deal/0.2/payload.js +1 -1
- package/dist/vta/pcs/trustee/deal/0.3/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/deal/0.3/payload.js +1 -1
- package/dist/vta/pcs/trustee/deal/0.4/payload.d.ts +13 -2
- package/dist/vta/pcs/trustee/deal/0.4/payload.d.ts.map +1 -1
- package/dist/vta/pcs/trustee/deal/0.4/payload.js +1 -1
- package/dist/vta/pcs/trustee/deal/0.4/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/deal/0.5/payload.d.ts +1966 -0
- package/dist/vta/pcs/trustee/deal/0.5/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/deal/0.5/payload.js +1175 -0
- package/dist/vta/pcs/trustee/deal/0.5/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/enrol/0.1/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/enrol/0.1/payload.js +1 -1
- package/dist/vta/pcs/trustee/enrol/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/enrol/0.2/payload.js +1 -1
- package/dist/vta/pcs/trustee/enrol/0.3/payload.d.ts +13 -2
- package/dist/vta/pcs/trustee/enrol/0.3/payload.d.ts.map +1 -1
- package/dist/vta/pcs/trustee/enrol/0.3/payload.js +1 -1
- package/dist/vta/pcs/trustee/enrol/0.3/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/enrol/0.4/payload.d.ts +1890 -0
- package/dist/vta/pcs/trustee/enrol/0.4/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/enrol/0.4/payload.js +1138 -0
- package/dist/vta/pcs/trustee/enrol/0.4/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/justify/0.2/payload.js +1 -1
- package/dist/vta/pcs/trustee/justify/0.3/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/justify/0.3/payload.js +1 -1
- package/dist/vta/pcs/trustee/justify/0.4/payload.d.ts +13 -2
- package/dist/vta/pcs/trustee/justify/0.4/payload.d.ts.map +1 -1
- package/dist/vta/pcs/trustee/justify/0.4/payload.js +1 -1
- package/dist/vta/pcs/trustee/justify/0.4/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/justify/0.5/payload.d.ts +2001 -0
- package/dist/vta/pcs/trustee/justify/0.5/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/justify/0.5/payload.js +1193 -0
- package/dist/vta/pcs/trustee/justify/0.5/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/keys/0.2/payload.js +1 -1
- package/dist/vta/pcs/trustee/keys/0.3/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/keys/0.3/payload.js +1 -1
- package/dist/vta/pcs/trustee/keys/0.4/payload.d.ts +13 -2
- package/dist/vta/pcs/trustee/keys/0.4/payload.d.ts.map +1 -1
- package/dist/vta/pcs/trustee/keys/0.4/payload.js +1 -1
- package/dist/vta/pcs/trustee/keys/0.4/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/keys/0.5/payload.d.ts +2046 -0
- package/dist/vta/pcs/trustee/keys/0.5/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/keys/0.5/payload.js +1213 -0
- package/dist/vta/pcs/trustee/keys/0.5/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/read/0.1/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/read/0.1/payload.js +1 -1
- package/dist/vta/pcs/trustee/read/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/trustee/read/0.2/payload.js +1 -1
- package/dist/vta/pcs/trustee/read/0.3/payload.d.ts +14 -2
- package/dist/vta/pcs/trustee/read/0.3/payload.d.ts.map +1 -1
- package/dist/vta/pcs/trustee/read/0.3/payload.js +1 -1
- package/dist/vta/pcs/trustee/read/0.3/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/read/0.4/payload.d.ts +540 -0
- package/dist/vta/pcs/trustee/read/0.4/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/read/0.4/payload.js +304 -0
- package/dist/vta/pcs/trustee/read/0.4/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 +1 -1
- package/dist/vta/pcs/vote/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/vote/0.2/payload.js +1 -1
- package/dist/vta/pcs/vote/0.3/payload.d.ts +13 -2
- package/dist/vta/pcs/vote/0.3/payload.d.ts.map +1 -1
- package/dist/vta/pcs/vote/0.3/payload.js +1 -1
- package/dist/vta/pcs/vote/0.3/payload.js.map +1 -1
- package/dist/vta/pcs/vote/0.4/payload.d.ts +2342 -0
- package/dist/vta/pcs/vote/0.4/payload.d.ts.map +1 -0
- package/dist/vta/pcs/vote/0.4/payload.js +1380 -0
- package/dist/vta/pcs/vote/0.4/payload.js.map +1 -0
- package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/vote-encrypted/0.2/payload.js +1 -1
- package/dist/vta/pcs/vote-encrypted/0.3/payload.d.ts +4 -4
- package/dist/vta/pcs/vote-encrypted/0.3/payload.js +1 -1
- package/dist/vta/pcs/vote-encrypted/0.4/payload.d.ts +13 -2
- package/dist/vta/pcs/vote-encrypted/0.4/payload.d.ts.map +1 -1
- package/dist/vta/pcs/vote-encrypted/0.4/payload.js +1 -1
- package/dist/vta/pcs/vote-encrypted/0.4/payload.js.map +1 -1
- package/dist/vta/pcs/vote-encrypted/0.5/payload.d.ts +2362 -0
- package/dist/vta/pcs/vote-encrypted/0.5/payload.d.ts.map +1 -0
- package/dist/vta/pcs/vote-encrypted/0.5/payload.js +1398 -0
- package/dist/vta/pcs/vote-encrypted/0.5/payload.js.map +1 -0
- package/dist/vta/pcs/voter/accept/0.1/payload.d.ts +3 -3
- package/dist/vta/pcs/voter/accept/0.1/payload.js +1 -1
- package/dist/vta/pcs/voter/read/0.1/payload.d.ts +4 -4
- package/dist/vta/pcs/voter/read/0.1/payload.js +1 -1
- package/dist/vta/pcs/voter/read/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/voter/read/0.2/payload.js +1 -1
- package/dist/vta/pcs/voter/read/0.3/payload.d.ts +14 -2
- package/dist/vta/pcs/voter/read/0.3/payload.d.ts.map +1 -1
- package/dist/vta/pcs/voter/read/0.3/payload.js +1 -1
- package/dist/vta/pcs/voter/read/0.3/payload.js.map +1 -1
- package/dist/vta/pcs/voter/read/0.4/payload.d.ts +515 -0
- package/dist/vta/pcs/voter/read/0.4/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/read/0.4/payload.js +285 -0
- package/dist/vta/pcs/voter/read/0.4/payload.js.map +1 -0
- package/dist/vta/pcs/voter/read/0.5/payload.d.ts +549 -0
- package/dist/vta/pcs/voter/read/0.5/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/read/0.5/payload.js +300 -0
- package/dist/vta/pcs/voter/read/0.5/payload.js.map +1 -0
- package/dist/vta/pcs/voter/read/0.6/payload.d.ts +561 -0
- package/dist/vta/pcs/voter/read/0.6/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/read/0.6/payload.js +312 -0
- package/dist/vta/pcs/voter/read/0.6/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 +1 -1
- package/dist/vta/pcs/voter/register/0.2/payload.d.ts +4 -4
- package/dist/vta/pcs/voter/register/0.2/payload.js +1 -1
- package/dist/vta/pcs/voter/register/0.3/payload.d.ts +14 -2
- package/dist/vta/pcs/voter/register/0.3/payload.d.ts.map +1 -1
- package/dist/vta/pcs/voter/register/0.3/payload.js +1 -1
- package/dist/vta/pcs/voter/register/0.3/payload.js.map +1 -1
- package/dist/vta/pcs/voter/register/0.4/payload.d.ts +2324 -0
- package/dist/vta/pcs/voter/register/0.4/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/register/0.4/payload.js +1352 -0
- package/dist/vta/pcs/voter/register/0.4/payload.js.map +1 -0
- package/dist/vta/pcs/voter/register/0.5/payload.d.ts +2312 -0
- package/dist/vta/pcs/voter/register/0.5/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/register/0.5/payload.js +1352 -0
- package/dist/vta/pcs/voter/register/0.5/payload.js.map +1 -0
- package/dist/vtc/_shared/0.6/network-membership.d.ts +16 -0
- package/dist/vtc/_shared/0.6/network-membership.d.ts.map +1 -0
- package/dist/vtc/_shared/0.6/network-membership.js +6 -0
- package/dist/vtc/_shared/0.6/network-membership.js.map +1 -0
- package/dist/vtc/elections/create/0.1/payload.d.ts +4 -4
- package/dist/vtc/elections/create/0.1/payload.js +1 -1
- package/dist/vtc/elections/create/0.2/payload.d.ts +4 -4
- package/dist/vtc/elections/create/0.2/payload.js +1 -1
- package/dist/vtc/elections/create/0.3/payload.d.ts +4 -4
- package/dist/vtc/elections/create/0.3/payload.js +1 -1
- package/dist/vtc/elections/create/0.4/payload.d.ts +14 -2
- package/dist/vtc/elections/create/0.4/payload.d.ts.map +1 -1
- package/dist/vtc/elections/create/0.4/payload.js +1 -1
- package/dist/vtc/elections/create/0.4/payload.js.map +1 -1
- package/dist/vtc/elections/create/0.5/payload.d.ts +1790 -0
- package/dist/vtc/elections/create/0.5/payload.d.ts.map +1 -0
- package/dist/vtc/elections/create/0.5/payload.js +1092 -0
- package/dist/vtc/elections/create/0.5/payload.js.map +1 -0
- package/dist/vtc/elections/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/elections/list/0.1/payload.js +1 -1
- package/dist/vtc/elections/list/0.2/payload.d.ts +4 -4
- package/dist/vtc/elections/list/0.2/payload.js +1 -1
- package/dist/vtc/elections/list/0.3/payload.d.ts +14 -2
- package/dist/vtc/elections/list/0.3/payload.d.ts.map +1 -1
- package/dist/vtc/elections/list/0.3/payload.js +1 -1
- package/dist/vtc/elections/list/0.3/payload.js.map +1 -1
- package/dist/vtc/elections/list/0.4/payload.d.ts +547 -0
- package/dist/vtc/elections/list/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/elections/list/0.4/payload.js +304 -0
- package/dist/vtc/elections/list/0.4/payload.js.map +1 -0
- package/dist/vtc/elections/list/0.5/payload.d.ts +535 -0
- package/dist/vtc/elections/list/0.5/payload.d.ts.map +1 -0
- package/dist/vtc/elections/list/0.5/payload.js +304 -0
- package/dist/vtc/elections/list/0.5/payload.js.map +1 -0
- package/dist/vtc/elections/show/0.1/payload.d.ts +4 -4
- package/dist/vtc/elections/show/0.1/payload.js +1 -1
- package/dist/vtc/elections/show/0.2/payload.d.ts +4 -4
- package/dist/vtc/elections/show/0.2/payload.js +1 -1
- package/dist/vtc/elections/show/0.3/payload.d.ts +14 -2
- package/dist/vtc/elections/show/0.3/payload.d.ts.map +1 -1
- package/dist/vtc/elections/show/0.3/payload.js +1 -1
- package/dist/vtc/elections/show/0.3/payload.js.map +1 -1
- package/dist/vtc/elections/show/0.4/payload.d.ts +3290 -0
- package/dist/vtc/elections/show/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/elections/show/0.4/payload.js +1931 -0
- package/dist/vtc/elections/show/0.4/payload.js.map +1 -0
- package/dist/vtc/elections/show/0.5/payload.d.ts +3318 -0
- package/dist/vtc/elections/show/0.5/payload.d.ts.map +1 -0
- package/dist/vtc/elections/show/0.5/payload.js +1946 -0
- package/dist/vtc/elections/show/0.5/payload.js.map +1 -0
- package/dist/vtc/elections/show/0.6/payload.d.ts +3306 -0
- package/dist/vtc/elections/show/0.6/payload.d.ts.map +1 -0
- package/dist/vtc/elections/show/0.6/payload.js +1946 -0
- package/dist/vtc/elections/show/0.6/payload.js.map +1 -0
- package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts +14 -2
- package/dist/vtc/elections/tickets/issue/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/elections/tickets/issue/0.1/payload.js +1 -1
- package/dist/vtc/elections/tickets/issue/0.1/payload.js.map +1 -1
- package/dist/vtc/elections/tickets/issue/0.2/payload.d.ts +651 -0
- package/dist/vtc/elections/tickets/issue/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/elections/tickets/issue/0.2/payload.js +347 -0
- package/dist/vtc/elections/tickets/issue/0.2/payload.js.map +1 -0
- package/dist/vtc/elections/tickets/issue/0.3/payload.d.ts +639 -0
- package/dist/vtc/elections/tickets/issue/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/elections/tickets/issue/0.3/payload.js +347 -0
- package/dist/vtc/elections/tickets/issue/0.3/payload.js.map +1 -0
- package/dist/vtc/networks/evidence/0.1/payload.d.ts +412 -0
- package/dist/vtc/networks/evidence/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/evidence/0.1/payload.js +233 -0
- package/dist/vtc/networks/evidence/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/groups/register/0.1/payload.d.ts +680 -0
- package/dist/vtc/networks/groups/register/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/groups/register/0.1/payload.js +401 -0
- package/dist/vtc/networks/groups/register/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/join/0.1/payload.d.ts +760 -0
- package/dist/vtc/networks/join/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/join/0.1/payload.js +445 -0
- package/dist/vtc/networks/join/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/leave/0.1/payload.d.ts +664 -0
- package/dist/vtc/networks/leave/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/leave/0.1/payload.js +393 -0
- package/dist/vtc/networks/leave/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/list/0.1/payload.d.ts +713 -0
- package/dist/vtc/networks/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/list/0.1/payload.js +417 -0
- package/dist/vtc/networks/list/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/notice/0.1/payload.d.ts +210 -0
- package/dist/vtc/networks/notice/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/notice/0.1/payload.js +116 -0
- package/dist/vtc/networks/notice/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/repudiate/0.1/payload.d.ts +680 -0
- package/dist/vtc/networks/repudiate/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/repudiate/0.1/payload.js +400 -0
- package/dist/vtc/networks/repudiate/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/show/0.1/payload.d.ts +650 -0
- package/dist/vtc/networks/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/show/0.1/payload.js +388 -0
- package/dist/vtc/networks/show/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_extends.ts +5 -0
- package/src/_shared/components.ts +293 -0
- package/src/git-ns/bridge/event/0.1/payload.ts +5 -5
- package/src/git-ns/bridge/event/0.2/payload.ts +5 -5
- package/src/git-ns/bridge/event/0.3/payload.ts +5 -5
- package/src/git-ns/bridge/event/0.4/payload.ts +5 -5
- package/src/git-ns/bridge/event/0.5/payload.ts +15 -3
- package/src/git-ns/bridge/event/0.6/payload.ts +1450 -0
- package/src/git-ns/bridge/job/0.1/payload.ts +5 -5
- package/src/git-ns/bridge/job/0.2/payload.ts +5 -5
- package/src/git-ns/bridge/job/0.3/payload.ts +5 -5
- package/src/git-ns/bridge/job/0.4/payload.ts +5 -5
- package/src/git-ns/bridge/job/0.5/payload.ts +5 -5
- package/src/git-ns/bridge/job/0.6/payload.ts +15 -3
- package/src/git-ns/bridge/job/0.7/payload.ts +744 -0
- package/src/git-ns/bridge/job/list/0.4/payload.ts +3 -3
- package/src/index.ts +123 -0
- package/src/notifications/_shared/0.1/notification.ts +23 -0
- package/src/notifications/notify/0.1/payload.ts +420 -0
- package/src/notifications/relay/0.1/payload.ts +220 -0
- package/src/voting/_shared/0.4/voting.ts +17 -0
- package/src/voting/election/register/0.1/payload.ts +5 -5
- package/src/voting/election/register/0.2/payload.ts +5 -5
- package/src/voting/election/register/0.3/payload.ts +14 -3
- package/src/voting/election/register/0.4/payload.ts +1307 -0
- package/src/voting/election/show/0.1/payload.ts +5 -5
- package/src/voting/election/show/0.2/payload.ts +5 -5
- package/src/voting/election/show/0.3/payload.ts +14 -3
- package/src/voting/election/show/0.4/payload.ts +1249 -0
- package/src/vta/notifications/_shared/0.1/held-notification.ts +17 -0
- package/src/vta/notifications/dismiss/0.1/payload.ts +214 -0
- package/src/vta/notifications/list/0.1/payload.ts +688 -0
- package/src/vta/notifications/show/0.1/payload.ts +630 -0
- package/src/vta/pcs/trustee/deal/0.2/payload.ts +5 -5
- package/src/vta/pcs/trustee/deal/0.3/payload.ts +5 -5
- package/src/vta/pcs/trustee/deal/0.4/payload.ts +14 -3
- package/src/vta/pcs/trustee/deal/0.5/payload.ts +1248 -0
- package/src/vta/pcs/trustee/enrol/0.1/payload.ts +5 -5
- package/src/vta/pcs/trustee/enrol/0.2/payload.ts +5 -5
- package/src/vta/pcs/trustee/enrol/0.3/payload.ts +14 -3
- package/src/vta/pcs/trustee/enrol/0.4/payload.ts +1207 -0
- package/src/vta/pcs/trustee/justify/0.2/payload.ts +5 -5
- package/src/vta/pcs/trustee/justify/0.3/payload.ts +5 -5
- package/src/vta/pcs/trustee/justify/0.4/payload.ts +14 -3
- package/src/vta/pcs/trustee/justify/0.5/payload.ts +1267 -0
- package/src/vta/pcs/trustee/keys/0.2/payload.ts +5 -5
- package/src/vta/pcs/trustee/keys/0.3/payload.ts +5 -5
- package/src/vta/pcs/trustee/keys/0.4/payload.ts +14 -3
- package/src/vta/pcs/trustee/keys/0.5/payload.ts +1294 -0
- package/src/vta/pcs/trustee/read/0.1/payload.ts +5 -5
- package/src/vta/pcs/trustee/read/0.2/payload.ts +5 -5
- package/src/vta/pcs/trustee/read/0.3/payload.ts +15 -3
- package/src/vta/pcs/trustee/read/0.4/payload.ts +385 -0
- package/src/vta/pcs/vote/0.1/payload.ts +5 -5
- package/src/vta/pcs/vote/0.2/payload.ts +5 -5
- package/src/vta/pcs/vote/0.3/payload.ts +14 -3
- package/src/vta/pcs/vote/0.4/payload.ts +1465 -0
- package/src/vta/pcs/vote-encrypted/0.2/payload.ts +5 -5
- package/src/vta/pcs/vote-encrypted/0.3/payload.ts +5 -5
- package/src/vta/pcs/vote-encrypted/0.4/payload.ts +14 -3
- package/src/vta/pcs/vote-encrypted/0.5/payload.ts +1469 -0
- package/src/vta/pcs/voter/accept/0.1/payload.ts +2 -2
- package/src/vta/pcs/voter/read/0.1/payload.ts +5 -5
- package/src/vta/pcs/voter/read/0.2/payload.ts +5 -5
- package/src/vta/pcs/voter/read/0.3/payload.ts +15 -3
- package/src/vta/pcs/voter/read/0.4/payload.ts +375 -0
- package/src/vta/pcs/voter/read/0.5/payload.ts +394 -0
- package/src/vta/pcs/voter/read/0.6/payload.ts +398 -0
- package/src/vta/pcs/voter/register/0.1/payload.ts +5 -5
- package/src/vta/pcs/voter/register/0.2/payload.ts +5 -5
- package/src/vta/pcs/voter/register/0.3/payload.ts +15 -3
- package/src/vta/pcs/voter/register/0.4/payload.ts +1478 -0
- package/src/vta/pcs/voter/register/0.5/payload.ts +1466 -0
- package/src/vtc/_shared/0.6/network-membership.ts +17 -0
- package/src/vtc/elections/create/0.1/payload.ts +5 -5
- package/src/vtc/elections/create/0.2/payload.ts +5 -5
- package/src/vtc/elections/create/0.3/payload.ts +5 -5
- package/src/vtc/elections/create/0.4/payload.ts +15 -3
- package/src/vtc/elections/create/0.5/payload.ts +1141 -0
- package/src/vtc/elections/list/0.1/payload.ts +5 -5
- package/src/vtc/elections/list/0.2/payload.ts +5 -5
- package/src/vtc/elections/list/0.3/payload.ts +15 -3
- package/src/vtc/elections/list/0.4/payload.ts +399 -0
- package/src/vtc/elections/list/0.5/payload.ts +387 -0
- package/src/vtc/elections/show/0.1/payload.ts +5 -5
- package/src/vtc/elections/show/0.2/payload.ts +5 -5
- package/src/vtc/elections/show/0.3/payload.ts +15 -3
- package/src/vtc/elections/show/0.4/payload.ts +2043 -0
- package/src/vtc/elections/show/0.5/payload.ts +2062 -0
- package/src/vtc/elections/show/0.6/payload.ts +2050 -0
- package/src/vtc/elections/tickets/issue/0.1/payload.ts +15 -3
- package/src/vtc/elections/tickets/issue/0.2/payload.ts +441 -0
- package/src/vtc/elections/tickets/issue/0.3/payload.ts +429 -0
- package/src/vtc/networks/evidence/0.1/payload.ts +290 -0
- package/src/vtc/networks/groups/register/0.1/payload.ts +446 -0
- package/src/vtc/networks/join/0.1/payload.ts +492 -0
- package/src/vtc/networks/leave/0.1/payload.ts +434 -0
- package/src/vtc/networks/list/0.1/payload.ts +463 -0
- package/src/vtc/networks/notice/0.1/payload.ts +172 -0
- package/src/vtc/networks/repudiate/0.1/payload.ts +445 -0
- package/src/vtc/networks/show/0.1/payload.ts +425 -0
|
@@ -0,0 +1,3306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/elections/show/0.6/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { BoardHead, BoardVisibility, ChoiceQuestion, DigestMultibase, Disclosure_VotingV0_4 as Disclosure, ElectionId, ElectionKey, ElectionResult, Ext, GroupElement, Key_VotingV0_1 as Key, Manifest_VotingV0_4 as Manifest, Multibase_VotingV0_1 as Multibase, Question, QuestionOption, QuestionResult, RankingQuestion, Revote, RollCredentialDisclosure, RollRule_VotingV0_4 as RollRule, ScoreQuestion, SecrecyLevel, SignedRequest, TextQuestion, TrusteeCeremony, TrusteeIndex, Trustees, VotingParameters } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* An election's state as its registrar holds it: the ballot box's `ElectionState` once the ballot box has registered the election, or, before that, `pendingRegistration` (the community is still delivering the registration) or `registrationRefused` (the ballot box refused it on a later delivery, and only a cancellation clears it). The first six values are the ballot box's `ElectionState` (voting/_shared/0.1).
|
|
8
|
+
*/
|
|
9
|
+
export type RegistrarState = "registered" | "registration" | "voting" | "closed" | "tallied" | "cancelled" | "pendingRegistration" | "registrationRefused";
|
|
10
|
+
/**
|
|
11
|
+
* A member or an administrator reads one election of the community whole: its manifest, state, voting parameters, disclosure, the board checkpoints the community kept and, once certified, the certified result. Where the election's credential roll names a member party, a reader the community holds no record of reads it by presenting their membership credential for that party. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
12
|
+
*/
|
|
13
|
+
export interface VTCElectionsShowPayload {
|
|
14
|
+
electionId: ElectionId;
|
|
15
|
+
/**
|
|
16
|
+
* Only where the reader means to read an election whose `credential` roll (voting/_shared/0.4 `RollRule`) names a member party — a party other than the community and its groups — and the community's records do not otherwise admit them: the reader's presentation of its membership credential for the party `roll.memberOf` names, made by the credential's subject — who signs this document — and bound to this document (VTI-VOT-015, checked as VTI-VOT-025 requires). The community verifies it before, and without reference to, the election the request names, answering `indeterminate` whatever the election where a status list, a trust registry or the issuer's DID document cannot be obtained; it uses the outcome only for such an election, and discards the presentation once it has decided. Without one that passes, such an election is answered `electionUnknown`.
|
|
17
|
+
*/
|
|
18
|
+
presentation?: {} | string;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Success response to vtc/elections/show/0.6: one election, whole.
|
|
23
|
+
*/
|
|
24
|
+
export interface VTCElectionsShowResponsePayload {
|
|
25
|
+
manifest: Manifest;
|
|
26
|
+
/**
|
|
27
|
+
* The SHA-256 multihash of the RFC 8785 (JCS) canonicalization of `manifest`. A ticket request names it, and every cast is bound to it.
|
|
28
|
+
*/
|
|
29
|
+
manifestDigest: DigestMultibase;
|
|
30
|
+
state: RegistrarState;
|
|
31
|
+
/**
|
|
32
|
+
* The community's voting parameters the election's tickets are issued under (VTI-VOT-020).
|
|
33
|
+
*/
|
|
34
|
+
parameters: VotingParameters;
|
|
35
|
+
/**
|
|
36
|
+
* How the election is run, generated from the manifest and the community's configuration (VTI-VOT-090). Always present: a member reads it before requesting a ticket.
|
|
37
|
+
*/
|
|
38
|
+
disclosure: Disclosure;
|
|
39
|
+
/**
|
|
40
|
+
* The board heads the community has kept, oldest first. Empty until the community has read a head.
|
|
41
|
+
*
|
|
42
|
+
* @maxItems 256
|
|
43
|
+
*/
|
|
44
|
+
checkpoints: Checkpoint[];
|
|
45
|
+
/**
|
|
46
|
+
* How many tickets the community has issued for the election. Present only to a caller holding vtc.elections.manage.
|
|
47
|
+
*/
|
|
48
|
+
ticketsIssued?: number;
|
|
49
|
+
/**
|
|
50
|
+
* The key a sealed or tallied-encrypted election's ballots are encrypted under, once its trustees have formed it (CONVENTIONS §9.6).
|
|
51
|
+
*/
|
|
52
|
+
electionKey?: ElectionKey;
|
|
53
|
+
certified?: Certification;
|
|
54
|
+
ext?: Ext;
|
|
55
|
+
/**
|
|
56
|
+
* With electionKey: the trustees' signed steps it forms from, through the board's electionKey entry, each exactly as received. A voter's VTA forms the key itself from these (vta/pcs/vote-encrypted/0.5).
|
|
57
|
+
*/
|
|
58
|
+
ceremony?: TrusteeCeremony;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A board head the community read from the ballot box and kept, with the ballot box's signed document that carried it. Certification proves the board's final head consistent with every checkpoint, so a ballot box that rewrote its board after a checkpoint is caught.
|
|
62
|
+
*/
|
|
63
|
+
export interface Checkpoint {
|
|
64
|
+
head: BoardHead;
|
|
65
|
+
/**
|
|
66
|
+
* The ballot box's signed voting/board/head `#response` document whose payload carries `head`, kept whole and exactly as received — proof included — so anyone can verify it against the ballot box's DID without trusting the community.
|
|
67
|
+
*/
|
|
68
|
+
document: {};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Present once the community has certified the result.
|
|
72
|
+
*/
|
|
73
|
+
export interface Certification {
|
|
74
|
+
result: ElectionResult;
|
|
75
|
+
certifiedAt: string;
|
|
76
|
+
/**
|
|
77
|
+
* @maxItems 32
|
|
78
|
+
*/
|
|
79
|
+
auditAttestations: {}[];
|
|
80
|
+
}
|
|
81
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
82
|
+
export type { BoardHead, BoardVisibility, ChoiceQuestion, DigestMultibase, Disclosure, ElectionId, ElectionKey, ElectionResult, Ext, GroupElement, Key, Manifest, Multibase, Question, QuestionOption, QuestionResult, RankingQuestion, Revote, RollCredentialDisclosure, RollRule, ScoreQuestion, SecrecyLevel, SignedRequest, TextQuestion, TrusteeCeremony, TrusteeIndex, Trustees, VotingParameters };
|
|
83
|
+
/** Trust Task type URI. */
|
|
84
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/elections/show/0.6";
|
|
85
|
+
/**
|
|
86
|
+
* The earlier version of this specification that this one declares it
|
|
87
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
88
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
89
|
+
* `extendsChain` / `readForSpec`.
|
|
90
|
+
*/
|
|
91
|
+
export declare const EXTENDS: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
94
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
95
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
96
|
+
* Versions").
|
|
97
|
+
*/
|
|
98
|
+
export declare const DEPRECATION: string | null;
|
|
99
|
+
/** Stable alias for this specification's request payload shape. */
|
|
100
|
+
export type Payload = VTCElectionsShowPayload;
|
|
101
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
102
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/elections/show/0.6#response";
|
|
103
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
104
|
+
export type Response = VTCElectionsShowResponsePayload;
|
|
105
|
+
/**
|
|
106
|
+
* This specification's payload schema, as a value.
|
|
107
|
+
*
|
|
108
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
109
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
110
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
111
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
112
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
113
|
+
*/
|
|
114
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
115
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
116
|
+
readonly $id: "https://trusttasks.org/spec/vtc/elections/show/0.6";
|
|
117
|
+
readonly title: "VTC Elections — Show — payload";
|
|
118
|
+
readonly description: "A member or an administrator reads one election of the community whole: its manifest, state, voting parameters, disclosure, the board checkpoints the community kept and, once certified, the certified result. Where the election's credential roll names a member party, a reader the community holds no record of reads it by presenting their membership credential for that party. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
119
|
+
readonly type: "object";
|
|
120
|
+
readonly additionalProperties: false;
|
|
121
|
+
readonly required: readonly ["electionId"];
|
|
122
|
+
readonly properties: {
|
|
123
|
+
readonly electionId: {
|
|
124
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
125
|
+
};
|
|
126
|
+
readonly presentation: {
|
|
127
|
+
readonly description: "Only where the reader means to read an election whose `credential` roll (voting/_shared/0.4 `RollRule`) names a member party — a party other than the community and its groups — and the community's records do not otherwise admit them: the reader's presentation of its membership credential for the party `roll.memberOf` names, made by the credential's subject — who signs this document — and bound to this document (VTI-VOT-015, checked as VTI-VOT-025 requires). The community verifies it before, and without reference to, the election the request names, answering `indeterminate` whatever the election where a status list, a trust registry or the issuer's DID document cannot be obtained; it uses the outcome only for such an election, and discards the presentation once it has decided. Without one that passes, such an election is answered `electionUnknown`.";
|
|
128
|
+
readonly anyOf: readonly [{
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly description: "A W3C Verifiable Presentation whose `nonce` is this document's `id` and whose `domain` is the community's DID, both signed by its holder's Data Integrity proof.";
|
|
131
|
+
}, {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
readonly minLength: 1;
|
|
134
|
+
readonly maxLength: 65536;
|
|
135
|
+
readonly description: "A compact presentation: an SD-JWT with a key-binding JWT whose `nonce` is this document's `id` and `aud` the community's DID.";
|
|
136
|
+
}];
|
|
137
|
+
};
|
|
138
|
+
readonly ext: {
|
|
139
|
+
readonly $ref: "#/$defs/Ext";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly $defs: {
|
|
143
|
+
readonly RegistrarState: {
|
|
144
|
+
readonly title: "RegistrarState";
|
|
145
|
+
readonly description: "An election's state as its registrar holds it: the ballot box's `ElectionState` once the ballot box has registered the election, or, before that, `pendingRegistration` (the community is still delivering the registration) or `registrationRefused` (the ballot box refused it on a later delivery, and only a cancellation clears it). The first six values are the ballot box's `ElectionState` (voting/_shared/0.1).";
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled", "pendingRegistration", "registrationRefused"];
|
|
148
|
+
};
|
|
149
|
+
readonly Checkpoint: {
|
|
150
|
+
readonly title: "Checkpoint";
|
|
151
|
+
readonly description: "A board head the community read from the ballot box and kept, with the ballot box's signed document that carried it. Certification proves the board's final head consistent with every checkpoint, so a ballot box that rewrote its board after a checkpoint is caught.";
|
|
152
|
+
readonly type: "object";
|
|
153
|
+
readonly additionalProperties: false;
|
|
154
|
+
readonly required: readonly ["head", "document"];
|
|
155
|
+
readonly properties: {
|
|
156
|
+
readonly head: {
|
|
157
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
158
|
+
};
|
|
159
|
+
readonly document: {
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
readonly description: "The ballot box's signed voting/board/head `#response` document whose payload carries `head`, kept whole and exactly as received — proof included — so anyone can verify it against the ballot box's DID without trusting the community.";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
readonly Certification: {
|
|
166
|
+
readonly title: "Certification";
|
|
167
|
+
readonly description: "The community's certification of the election's result, as vtc/elections/certify recorded it.";
|
|
168
|
+
readonly type: "object";
|
|
169
|
+
readonly additionalProperties: false;
|
|
170
|
+
readonly required: readonly ["result", "certifiedAt", "auditAttestations"];
|
|
171
|
+
readonly properties: {
|
|
172
|
+
readonly result: {
|
|
173
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
174
|
+
};
|
|
175
|
+
readonly certifiedAt: {
|
|
176
|
+
readonly type: "string";
|
|
177
|
+
readonly format: "date-time";
|
|
178
|
+
readonly maxLength: 64;
|
|
179
|
+
};
|
|
180
|
+
readonly auditAttestations: {
|
|
181
|
+
readonly type: "array";
|
|
182
|
+
readonly maxItems: 32;
|
|
183
|
+
readonly items: {
|
|
184
|
+
readonly type: "object";
|
|
185
|
+
readonly description: "A verifiable credential from an auditor the manifest names, as received.";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly Response: {
|
|
191
|
+
readonly $anchor: "response";
|
|
192
|
+
readonly title: "VTC Elections — Show — response payload";
|
|
193
|
+
readonly description: "Success response to vtc/elections/show/0.6: one election, whole.";
|
|
194
|
+
readonly type: "object";
|
|
195
|
+
readonly additionalProperties: false;
|
|
196
|
+
readonly required: readonly ["manifest", "manifestDigest", "state", "parameters", "disclosure", "checkpoints"];
|
|
197
|
+
readonly properties: {
|
|
198
|
+
readonly manifest: {
|
|
199
|
+
readonly $ref: "#/$defs/Manifest";
|
|
200
|
+
};
|
|
201
|
+
readonly manifestDigest: {
|
|
202
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
203
|
+
readonly description: "The SHA-256 multihash of the RFC 8785 (JCS) canonicalization of `manifest`. A ticket request names it, and every cast is bound to it.";
|
|
204
|
+
};
|
|
205
|
+
readonly state: {
|
|
206
|
+
readonly $ref: "#/$defs/RegistrarState";
|
|
207
|
+
};
|
|
208
|
+
readonly parameters: {
|
|
209
|
+
readonly $ref: "#/$defs/VotingParameters";
|
|
210
|
+
readonly description: "The community's voting parameters the election's tickets are issued under (VTI-VOT-020).";
|
|
211
|
+
};
|
|
212
|
+
readonly disclosure: {
|
|
213
|
+
readonly $ref: "#/$defs/Disclosure";
|
|
214
|
+
readonly description: "How the election is run, generated from the manifest and the community's configuration (VTI-VOT-090). Always present: a member reads it before requesting a ticket.";
|
|
215
|
+
};
|
|
216
|
+
readonly checkpoints: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly maxItems: 256;
|
|
219
|
+
readonly items: {
|
|
220
|
+
readonly $ref: "#/$defs/Checkpoint";
|
|
221
|
+
};
|
|
222
|
+
readonly description: "The board heads the community has kept, oldest first. Empty until the community has read a head.";
|
|
223
|
+
};
|
|
224
|
+
readonly ticketsIssued: {
|
|
225
|
+
readonly type: "integer";
|
|
226
|
+
readonly minimum: 0;
|
|
227
|
+
readonly description: "How many tickets the community has issued for the election. Present only to a caller holding vtc.elections.manage.";
|
|
228
|
+
};
|
|
229
|
+
readonly electionKey: {
|
|
230
|
+
readonly $ref: "#/$defs/ElectionKey";
|
|
231
|
+
readonly description: "The key a sealed or tallied-encrypted election's ballots are encrypted under, once its trustees have formed it (CONVENTIONS §9.6).";
|
|
232
|
+
};
|
|
233
|
+
readonly certified: {
|
|
234
|
+
readonly $ref: "#/$defs/Certification";
|
|
235
|
+
readonly description: "Present once the community has certified the result.";
|
|
236
|
+
};
|
|
237
|
+
readonly ext: {
|
|
238
|
+
readonly $ref: "#/$defs/Ext";
|
|
239
|
+
};
|
|
240
|
+
readonly ceremony: {
|
|
241
|
+
readonly $ref: "#/$defs/TrusteeCeremony";
|
|
242
|
+
readonly description: "With electionKey: the trustees' signed steps it forms from, through the board's electionKey entry, each exactly as received. A voter's VTA forms the key itself from these (vta/pcs/vote-encrypted/0.5).";
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly TrusteeCeremony: {
|
|
247
|
+
readonly title: "TrusteeCeremony";
|
|
248
|
+
readonly description: "The trustees' ceremony as the board holds it: the `request` of every `trusteeStep` entry, in board order, each exactly as the ballot box received it (CONVENTIONS §9.6). Whoever acts on it verifies each step as its trustee's before taking it; nothing in it is believed for having been passed along.";
|
|
249
|
+
readonly type: "array";
|
|
250
|
+
readonly minItems: 1;
|
|
251
|
+
readonly maxItems: 4224;
|
|
252
|
+
readonly items: {
|
|
253
|
+
readonly $ref: "#/$defs/SignedRequest";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
readonly SignedRequest: {
|
|
257
|
+
readonly title: "SignedRequest";
|
|
258
|
+
readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
|
|
259
|
+
readonly type: "object";
|
|
260
|
+
readonly minProperties: 1;
|
|
261
|
+
};
|
|
262
|
+
readonly Ext: {
|
|
263
|
+
readonly title: "Ext";
|
|
264
|
+
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.";
|
|
265
|
+
readonly type: "object";
|
|
266
|
+
readonly minProperties: 1;
|
|
267
|
+
readonly additionalProperties: true;
|
|
268
|
+
readonly propertyNames: {
|
|
269
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly ElectionKey: {
|
|
273
|
+
readonly title: "ElectionKey";
|
|
274
|
+
readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
|
|
275
|
+
readonly type: "object";
|
|
276
|
+
readonly additionalProperties: false;
|
|
277
|
+
readonly required: readonly ["key", "qualified", "verification"];
|
|
278
|
+
readonly properties: {
|
|
279
|
+
readonly key: {
|
|
280
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
281
|
+
};
|
|
282
|
+
readonly qualified: {
|
|
283
|
+
readonly type: "array";
|
|
284
|
+
readonly minItems: 1;
|
|
285
|
+
readonly maxItems: 64;
|
|
286
|
+
readonly items: {
|
|
287
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
288
|
+
};
|
|
289
|
+
readonly description: "The dealers whose dealings the key is formed from.";
|
|
290
|
+
};
|
|
291
|
+
readonly verification: {
|
|
292
|
+
readonly type: "array";
|
|
293
|
+
readonly minItems: 2;
|
|
294
|
+
readonly maxItems: 64;
|
|
295
|
+
readonly items: {
|
|
296
|
+
readonly type: "object";
|
|
297
|
+
readonly additionalProperties: false;
|
|
298
|
+
readonly required: readonly ["trustee", "key"];
|
|
299
|
+
readonly properties: {
|
|
300
|
+
readonly trustee: {
|
|
301
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
302
|
+
};
|
|
303
|
+
readonly key: {
|
|
304
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
readonly GroupElement: {
|
|
312
|
+
readonly title: "GroupElement";
|
|
313
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
314
|
+
readonly type: "string";
|
|
315
|
+
readonly minLength: 2;
|
|
316
|
+
readonly maxLength: 64;
|
|
317
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
318
|
+
};
|
|
319
|
+
readonly TrusteeIndex: {
|
|
320
|
+
readonly title: "TrusteeIndex";
|
|
321
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
322
|
+
readonly type: "integer";
|
|
323
|
+
readonly minimum: 1;
|
|
324
|
+
readonly maximum: 64;
|
|
325
|
+
};
|
|
326
|
+
readonly Disclosure: {
|
|
327
|
+
readonly title: "Disclosure";
|
|
328
|
+
readonly description: "The statement a community publishes, and shows a member before they request a ticket, about how one election is run (VTI-VOT-090). Generated from the election's manifest and the community's configuration, never written by hand. Under a `credential` roll it also says whose membership credential counts (`rollCredential`).";
|
|
329
|
+
readonly type: "object";
|
|
330
|
+
readonly additionalProperties: false;
|
|
331
|
+
readonly required: readonly ["ballotBox", "ballotBoxOperator", "sameOperator", "boardVisibility", "auditors", "revote", "coercionResistance"];
|
|
332
|
+
readonly properties: {
|
|
333
|
+
readonly ballotBox: {
|
|
334
|
+
readonly type: "string";
|
|
335
|
+
readonly minLength: 1;
|
|
336
|
+
readonly maxLength: 2048;
|
|
337
|
+
readonly description: "The ballot box's DID.";
|
|
338
|
+
};
|
|
339
|
+
readonly ballotBoxOperator: {
|
|
340
|
+
readonly type: "string";
|
|
341
|
+
readonly minLength: 1;
|
|
342
|
+
readonly maxLength: 512;
|
|
343
|
+
readonly description: "Who operates the ballot box, as the community names them.";
|
|
344
|
+
};
|
|
345
|
+
readonly sameOperator: {
|
|
346
|
+
readonly type: "boolean";
|
|
347
|
+
readonly description: "Whether the party operating the community's VTC also operates the ballot box.";
|
|
348
|
+
};
|
|
349
|
+
readonly trustees: {
|
|
350
|
+
readonly $ref: "#/$defs/Trustees";
|
|
351
|
+
};
|
|
352
|
+
readonly boardVisibility: {
|
|
353
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
354
|
+
};
|
|
355
|
+
readonly auditors: {
|
|
356
|
+
readonly type: "array";
|
|
357
|
+
readonly items: {
|
|
358
|
+
readonly type: "string";
|
|
359
|
+
readonly minLength: 1;
|
|
360
|
+
readonly maxLength: 2048;
|
|
361
|
+
};
|
|
362
|
+
readonly uniqueItems: true;
|
|
363
|
+
};
|
|
364
|
+
readonly revote: {
|
|
365
|
+
readonly $ref: "#/$defs/Revote";
|
|
366
|
+
};
|
|
367
|
+
readonly rollCredential: {
|
|
368
|
+
readonly $ref: "#/$defs/RollCredentialDisclosure";
|
|
369
|
+
};
|
|
370
|
+
readonly coercionResistance: {
|
|
371
|
+
readonly const: false;
|
|
372
|
+
readonly description: "Always false: a voter can prove how they voted, so the community cannot protect a member against being made to vote a certain way.";
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
readonly RollCredentialDisclosure: {
|
|
377
|
+
readonly title: "RollCredentialDisclosure";
|
|
378
|
+
readonly description: "Under a `credential` roll, whose membership credential admits a party to a ticket, as a member is shown it before they claim one (VTI-VOT-090): the DID the roll names, what kind of party it is to this community, and its name as the community knows it. Present in a disclosure exactly when the election's roll rule is `credential`.";
|
|
379
|
+
readonly type: "object";
|
|
380
|
+
readonly additionalProperties: false;
|
|
381
|
+
readonly required: readonly ["memberOf", "memberOfKind"];
|
|
382
|
+
readonly properties: {
|
|
383
|
+
readonly memberOf: {
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly minLength: 8;
|
|
386
|
+
readonly maxLength: 2048;
|
|
387
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
388
|
+
readonly description: "The manifest's `roll.memberOf`.";
|
|
389
|
+
};
|
|
390
|
+
readonly memberOfKind: {
|
|
391
|
+
readonly type: "string";
|
|
392
|
+
readonly enum: readonly ["thisCommunity", "communityGroup", "memberParty"];
|
|
393
|
+
readonly description: "`thisCommunity`: the community itself. `communityGroup`: one of the community's own groups, whose membership credentials it authorizes the group to issue (VTI-DIR-083). `memberParty`: a party outside the community that is itself an active member of it — another community, a group of another community, or a network — whose own membership credentials admit their holders (VTI-VOT-026).";
|
|
394
|
+
};
|
|
395
|
+
readonly memberOfName: {
|
|
396
|
+
readonly type: "string";
|
|
397
|
+
readonly minLength: 1;
|
|
398
|
+
readonly maxLength: 512;
|
|
399
|
+
readonly description: "The name the community shows for the party `memberOf` names: the group's name, or the member party's name as the community's records hold it. Absent where showing it would disclose more than the group's visibility admits (VTI-DIR-070).";
|
|
400
|
+
};
|
|
401
|
+
readonly presenterDisclosed: {
|
|
402
|
+
readonly const: true;
|
|
403
|
+
readonly description: "Always true: claiming a ticket shows the community the presenter's membership credential for `memberOf`, so the community learns that the presenter is a member of that party.";
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
readonly Revote: {
|
|
408
|
+
readonly title: "Revote";
|
|
409
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
412
|
+
};
|
|
413
|
+
readonly BoardVisibility: {
|
|
414
|
+
readonly title: "BoardVisibility";
|
|
415
|
+
readonly description: "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).";
|
|
416
|
+
readonly type: "string";
|
|
417
|
+
readonly enum: readonly ["public", "private"];
|
|
418
|
+
};
|
|
419
|
+
readonly Trustees: {
|
|
420
|
+
readonly title: "Trustees";
|
|
421
|
+
readonly description: "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.";
|
|
422
|
+
readonly type: "object";
|
|
423
|
+
readonly additionalProperties: false;
|
|
424
|
+
readonly required: readonly ["dids", "threshold"];
|
|
425
|
+
readonly properties: {
|
|
426
|
+
readonly dids: {
|
|
427
|
+
readonly type: "array";
|
|
428
|
+
readonly minItems: 2;
|
|
429
|
+
readonly items: {
|
|
430
|
+
readonly type: "string";
|
|
431
|
+
readonly minLength: 1;
|
|
432
|
+
readonly maxLength: 2048;
|
|
433
|
+
};
|
|
434
|
+
readonly uniqueItems: true;
|
|
435
|
+
};
|
|
436
|
+
readonly threshold: {
|
|
437
|
+
readonly type: "integer";
|
|
438
|
+
readonly minimum: 2;
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
readonly VotingParameters: {
|
|
443
|
+
readonly title: "VotingParameters";
|
|
444
|
+
readonly description: "The community's published voting parameters: the PCS suite and the voting verification key tickets are issued under (VTI-VOT-020). Distinct from its hidden-vetting helper key.";
|
|
445
|
+
readonly type: "object";
|
|
446
|
+
readonly additionalProperties: false;
|
|
447
|
+
readonly required: readonly ["suite", "votingKey"];
|
|
448
|
+
readonly properties: {
|
|
449
|
+
readonly suite: {
|
|
450
|
+
readonly type: "string";
|
|
451
|
+
readonly const: "ps-ddh-bls12381";
|
|
452
|
+
};
|
|
453
|
+
readonly votingKey: {
|
|
454
|
+
readonly $ref: "#/$defs/Multibase";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
readonly Multibase: {
|
|
459
|
+
readonly title: "Multibase";
|
|
460
|
+
readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly maxLength: 16384;
|
|
463
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
464
|
+
};
|
|
465
|
+
readonly DigestMultibase: {
|
|
466
|
+
readonly title: "DigestMultibase";
|
|
467
|
+
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`.";
|
|
468
|
+
readonly type: "string";
|
|
469
|
+
readonly minLength: 16;
|
|
470
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
471
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
472
|
+
};
|
|
473
|
+
readonly Manifest: {
|
|
474
|
+
readonly title: "Manifest";
|
|
475
|
+
readonly description: "What an election asks and how it is decided (VTI-VOT-010). Its digest (`manifestDigest`) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, and every cast is bound to it (VTI-VOT-011).";
|
|
476
|
+
readonly type: "object";
|
|
477
|
+
readonly additionalProperties: false;
|
|
478
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
479
|
+
readonly properties: {
|
|
480
|
+
readonly electionId: {
|
|
481
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
482
|
+
};
|
|
483
|
+
readonly community: {
|
|
484
|
+
readonly type: "string";
|
|
485
|
+
readonly minLength: 1;
|
|
486
|
+
readonly maxLength: 2048;
|
|
487
|
+
readonly description: "The community's DID.";
|
|
488
|
+
};
|
|
489
|
+
readonly title: {
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
readonly maxLength: 512;
|
|
492
|
+
};
|
|
493
|
+
readonly description: {
|
|
494
|
+
readonly type: "string";
|
|
495
|
+
readonly maxLength: 8192;
|
|
496
|
+
};
|
|
497
|
+
readonly questions: {
|
|
498
|
+
readonly type: "array";
|
|
499
|
+
readonly minItems: 1;
|
|
500
|
+
readonly maxItems: 128;
|
|
501
|
+
readonly items: {
|
|
502
|
+
readonly $ref: "#/$defs/Question";
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
readonly secrecy: {
|
|
506
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
507
|
+
};
|
|
508
|
+
readonly roll: {
|
|
509
|
+
readonly $ref: "#/$defs/RollRule";
|
|
510
|
+
};
|
|
511
|
+
readonly registrationOpensAt: {
|
|
512
|
+
readonly type: "string";
|
|
513
|
+
readonly format: "date-time";
|
|
514
|
+
};
|
|
515
|
+
readonly votingOpensAt: {
|
|
516
|
+
readonly type: "string";
|
|
517
|
+
readonly format: "date-time";
|
|
518
|
+
};
|
|
519
|
+
readonly votingClosesAt: {
|
|
520
|
+
readonly type: "string";
|
|
521
|
+
readonly format: "date-time";
|
|
522
|
+
};
|
|
523
|
+
readonly revote: {
|
|
524
|
+
readonly $ref: "#/$defs/Revote";
|
|
525
|
+
};
|
|
526
|
+
readonly board: {
|
|
527
|
+
readonly type: "object";
|
|
528
|
+
readonly additionalProperties: false;
|
|
529
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
530
|
+
readonly properties: {
|
|
531
|
+
readonly visibility: {
|
|
532
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
533
|
+
};
|
|
534
|
+
readonly auditors: {
|
|
535
|
+
readonly type: "array";
|
|
536
|
+
readonly items: {
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
readonly minLength: 1;
|
|
539
|
+
readonly maxLength: 2048;
|
|
540
|
+
};
|
|
541
|
+
readonly uniqueItems: true;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
readonly ballotBox: {
|
|
546
|
+
readonly type: "string";
|
|
547
|
+
readonly minLength: 1;
|
|
548
|
+
readonly maxLength: 2048;
|
|
549
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
550
|
+
};
|
|
551
|
+
readonly trustees: {
|
|
552
|
+
readonly $ref: "#/$defs/Trustees";
|
|
553
|
+
};
|
|
554
|
+
readonly binding: {
|
|
555
|
+
readonly type: "boolean";
|
|
556
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
557
|
+
};
|
|
558
|
+
readonly allowEarlyClose: {
|
|
559
|
+
readonly type: "boolean";
|
|
560
|
+
};
|
|
561
|
+
readonly resultsBeforeClose: {
|
|
562
|
+
readonly type: "boolean";
|
|
563
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
564
|
+
};
|
|
565
|
+
readonly textReleaseThreshold: {
|
|
566
|
+
readonly type: "integer";
|
|
567
|
+
readonly minimum: 1;
|
|
568
|
+
readonly description: "Counted ballots required before any text answer is disclosed (VTI-VOT-065). At least 1, and SHOULD be at least 10: a written answer can identify its author by what it says or how it is phrased, and the fewer the ballots released together, the easier that is. Where it is below 10, the disclosure a member is shown before they request a ticket MUST say so, and MUST say that a written answer may identify its author (VTI-VOT-090).";
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
readonly RollRule: {
|
|
573
|
+
readonly title: "RollRule";
|
|
574
|
+
readonly description: "Who may be issued a ticket (VTI-VOT-021): the community's active members (`members`), its active members and the parties `listed` names (`membersAndListed`), only the parties `listed` names (`listed`), or the holders of a membership credential for the one DID `memberOf` names (`credential`), proven by presentation when the holder claims their ticket and never resolved when the election is created (VTI-VOT-025). `memberOf` is present exactly when `rule` is `credential`, and `listed` is never present with it.";
|
|
575
|
+
readonly type: "object";
|
|
576
|
+
readonly additionalProperties: false;
|
|
577
|
+
readonly required: readonly ["rule"];
|
|
578
|
+
readonly properties: {
|
|
579
|
+
readonly rule: {
|
|
580
|
+
readonly type: "string";
|
|
581
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
582
|
+
};
|
|
583
|
+
readonly listed: {
|
|
584
|
+
readonly type: "array";
|
|
585
|
+
readonly items: {
|
|
586
|
+
readonly type: "string";
|
|
587
|
+
readonly minLength: 1;
|
|
588
|
+
readonly maxLength: 2048;
|
|
589
|
+
readonly description: "A DID enfranchised by name.";
|
|
590
|
+
};
|
|
591
|
+
readonly uniqueItems: true;
|
|
592
|
+
};
|
|
593
|
+
readonly memberOf: {
|
|
594
|
+
readonly type: "string";
|
|
595
|
+
readonly minLength: 8;
|
|
596
|
+
readonly maxLength: 2048;
|
|
597
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
598
|
+
readonly description: "The DID whose membership credential admits its holder, under the `credential` rule: this community, one of its groups, or a party that is itself an active member of this community — holding a membership credential this community issued it — such as another community, a group of another community, or a network (VTI-VOT-026). Always a DID, never a group's local identifier or name. A community refuses to create an election naming any other DID (vtc/elections/create:rollUntrusted).";
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
readonly dependentSchemas: {
|
|
602
|
+
readonly rule: {
|
|
603
|
+
readonly anyOf: readonly [{
|
|
604
|
+
readonly required: readonly ["memberOf"];
|
|
605
|
+
}, {
|
|
606
|
+
readonly properties: {
|
|
607
|
+
readonly rule: {
|
|
608
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
}];
|
|
612
|
+
};
|
|
613
|
+
readonly memberOf: {
|
|
614
|
+
readonly properties: {
|
|
615
|
+
readonly rule: {
|
|
616
|
+
readonly const: "credential";
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
readonly not: {
|
|
620
|
+
readonly required: readonly ["listed"];
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
readonly SecrecyLevel: {
|
|
626
|
+
readonly title: "SecrecyLevel";
|
|
627
|
+
readonly description: "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).";
|
|
628
|
+
readonly type: "string";
|
|
629
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
630
|
+
};
|
|
631
|
+
readonly Question: {
|
|
632
|
+
readonly title: "Question";
|
|
633
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
634
|
+
readonly oneOf: readonly [{
|
|
635
|
+
readonly title: "ChoiceQuestion";
|
|
636
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
637
|
+
readonly type: "object";
|
|
638
|
+
readonly additionalProperties: false;
|
|
639
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
640
|
+
readonly properties: {
|
|
641
|
+
readonly key: {
|
|
642
|
+
readonly $ref: "#/$defs/Key";
|
|
643
|
+
};
|
|
644
|
+
readonly type: {
|
|
645
|
+
readonly const: "choice";
|
|
646
|
+
};
|
|
647
|
+
readonly text: {
|
|
648
|
+
readonly type: "string";
|
|
649
|
+
readonly maxLength: 2048;
|
|
650
|
+
};
|
|
651
|
+
readonly options: {
|
|
652
|
+
readonly type: "array";
|
|
653
|
+
readonly minItems: 2;
|
|
654
|
+
readonly maxItems: 256;
|
|
655
|
+
readonly items: {
|
|
656
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
readonly minSelections: {
|
|
660
|
+
readonly type: "integer";
|
|
661
|
+
readonly minimum: 0;
|
|
662
|
+
};
|
|
663
|
+
readonly maxSelections: {
|
|
664
|
+
readonly type: "integer";
|
|
665
|
+
readonly minimum: 1;
|
|
666
|
+
};
|
|
667
|
+
readonly optional: {
|
|
668
|
+
readonly type: "boolean";
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
}, {
|
|
672
|
+
readonly title: "RankingQuestion";
|
|
673
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
674
|
+
readonly type: "object";
|
|
675
|
+
readonly additionalProperties: false;
|
|
676
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
677
|
+
readonly properties: {
|
|
678
|
+
readonly key: {
|
|
679
|
+
readonly $ref: "#/$defs/Key";
|
|
680
|
+
};
|
|
681
|
+
readonly type: {
|
|
682
|
+
readonly const: "ranking";
|
|
683
|
+
};
|
|
684
|
+
readonly text: {
|
|
685
|
+
readonly type: "string";
|
|
686
|
+
readonly maxLength: 2048;
|
|
687
|
+
};
|
|
688
|
+
readonly options: {
|
|
689
|
+
readonly type: "array";
|
|
690
|
+
readonly minItems: 2;
|
|
691
|
+
readonly maxItems: 64;
|
|
692
|
+
readonly items: {
|
|
693
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
readonly partial: {
|
|
697
|
+
readonly type: "boolean";
|
|
698
|
+
};
|
|
699
|
+
readonly optional: {
|
|
700
|
+
readonly type: "boolean";
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
}, {
|
|
704
|
+
readonly title: "ScoreQuestion";
|
|
705
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
706
|
+
readonly type: "object";
|
|
707
|
+
readonly additionalProperties: false;
|
|
708
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
709
|
+
readonly properties: {
|
|
710
|
+
readonly key: {
|
|
711
|
+
readonly $ref: "#/$defs/Key";
|
|
712
|
+
};
|
|
713
|
+
readonly type: {
|
|
714
|
+
readonly const: "score";
|
|
715
|
+
};
|
|
716
|
+
readonly text: {
|
|
717
|
+
readonly type: "string";
|
|
718
|
+
readonly maxLength: 2048;
|
|
719
|
+
};
|
|
720
|
+
readonly options: {
|
|
721
|
+
readonly type: "array";
|
|
722
|
+
readonly minItems: 1;
|
|
723
|
+
readonly maxItems: 256;
|
|
724
|
+
readonly items: {
|
|
725
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
readonly min: {
|
|
729
|
+
readonly type: "integer";
|
|
730
|
+
};
|
|
731
|
+
readonly max: {
|
|
732
|
+
readonly type: "integer";
|
|
733
|
+
};
|
|
734
|
+
readonly optional: {
|
|
735
|
+
readonly type: "boolean";
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
}, {
|
|
739
|
+
readonly title: "TextQuestion";
|
|
740
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
741
|
+
readonly type: "object";
|
|
742
|
+
readonly additionalProperties: false;
|
|
743
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
744
|
+
readonly properties: {
|
|
745
|
+
readonly key: {
|
|
746
|
+
readonly $ref: "#/$defs/Key";
|
|
747
|
+
};
|
|
748
|
+
readonly type: {
|
|
749
|
+
readonly const: "text";
|
|
750
|
+
};
|
|
751
|
+
readonly text: {
|
|
752
|
+
readonly type: "string";
|
|
753
|
+
readonly maxLength: 2048;
|
|
754
|
+
};
|
|
755
|
+
readonly maxLength: {
|
|
756
|
+
readonly type: "integer";
|
|
757
|
+
readonly minimum: 1;
|
|
758
|
+
readonly maximum: 4096;
|
|
759
|
+
};
|
|
760
|
+
readonly optional: {
|
|
761
|
+
readonly type: "boolean";
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
}];
|
|
765
|
+
};
|
|
766
|
+
readonly Key: {
|
|
767
|
+
readonly title: "Key";
|
|
768
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
769
|
+
readonly type: "string";
|
|
770
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
771
|
+
};
|
|
772
|
+
readonly QuestionOption: {
|
|
773
|
+
readonly title: "QuestionOption";
|
|
774
|
+
readonly type: "object";
|
|
775
|
+
readonly additionalProperties: false;
|
|
776
|
+
readonly required: readonly ["key"];
|
|
777
|
+
readonly properties: {
|
|
778
|
+
readonly key: {
|
|
779
|
+
readonly $ref: "#/$defs/Key";
|
|
780
|
+
};
|
|
781
|
+
readonly label: {
|
|
782
|
+
readonly type: "string";
|
|
783
|
+
readonly maxLength: 512;
|
|
784
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
readonly ElectionId: {
|
|
789
|
+
readonly title: "ElectionId";
|
|
790
|
+
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.";
|
|
791
|
+
readonly type: "string";
|
|
792
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
793
|
+
};
|
|
794
|
+
readonly ElectionResult: {
|
|
795
|
+
readonly title: "ElectionResult";
|
|
796
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
797
|
+
readonly type: "object";
|
|
798
|
+
readonly additionalProperties: false;
|
|
799
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
800
|
+
readonly properties: {
|
|
801
|
+
readonly electionId: {
|
|
802
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
803
|
+
};
|
|
804
|
+
readonly manifestDigest: {
|
|
805
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
806
|
+
};
|
|
807
|
+
readonly ballotsCounted: {
|
|
808
|
+
readonly type: "integer";
|
|
809
|
+
readonly minimum: 0;
|
|
810
|
+
};
|
|
811
|
+
readonly questions: {
|
|
812
|
+
readonly type: "array";
|
|
813
|
+
readonly items: {
|
|
814
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
readonly head: {
|
|
818
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
819
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
readonly BoardHead: {
|
|
824
|
+
readonly title: "BoardHead";
|
|
825
|
+
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.";
|
|
826
|
+
readonly type: "object";
|
|
827
|
+
readonly additionalProperties: false;
|
|
828
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
829
|
+
readonly properties: {
|
|
830
|
+
readonly electionId: {
|
|
831
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
832
|
+
};
|
|
833
|
+
readonly treeSize: {
|
|
834
|
+
readonly type: "integer";
|
|
835
|
+
readonly minimum: 0;
|
|
836
|
+
};
|
|
837
|
+
readonly rootHash: {
|
|
838
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
839
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
840
|
+
};
|
|
841
|
+
readonly issuedAt: {
|
|
842
|
+
readonly type: "string";
|
|
843
|
+
readonly format: "date-time";
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
readonly QuestionResult: {
|
|
848
|
+
readonly title: "QuestionResult";
|
|
849
|
+
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.";
|
|
850
|
+
readonly type: "object";
|
|
851
|
+
readonly additionalProperties: false;
|
|
852
|
+
readonly required: readonly ["question", "abstained"];
|
|
853
|
+
readonly properties: {
|
|
854
|
+
readonly question: {
|
|
855
|
+
readonly $ref: "#/$defs/Key";
|
|
856
|
+
};
|
|
857
|
+
readonly abstained: {
|
|
858
|
+
readonly type: "integer";
|
|
859
|
+
readonly minimum: 0;
|
|
860
|
+
};
|
|
861
|
+
readonly choice: {
|
|
862
|
+
readonly type: "object";
|
|
863
|
+
readonly propertyNames: {
|
|
864
|
+
readonly $ref: "#/$defs/Key";
|
|
865
|
+
};
|
|
866
|
+
readonly additionalProperties: {
|
|
867
|
+
readonly type: "integer";
|
|
868
|
+
readonly minimum: 0;
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
readonly ranking: {
|
|
872
|
+
readonly type: "object";
|
|
873
|
+
readonly propertyNames: {
|
|
874
|
+
readonly $ref: "#/$defs/Key";
|
|
875
|
+
};
|
|
876
|
+
readonly additionalProperties: {
|
|
877
|
+
readonly type: "array";
|
|
878
|
+
readonly items: {
|
|
879
|
+
readonly type: "integer";
|
|
880
|
+
readonly minimum: 0;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
readonly score: {
|
|
885
|
+
readonly type: "object";
|
|
886
|
+
readonly propertyNames: {
|
|
887
|
+
readonly $ref: "#/$defs/Key";
|
|
888
|
+
};
|
|
889
|
+
readonly additionalProperties: {
|
|
890
|
+
readonly type: "object";
|
|
891
|
+
readonly additionalProperties: false;
|
|
892
|
+
readonly required: readonly ["sum", "count"];
|
|
893
|
+
readonly properties: {
|
|
894
|
+
readonly sum: {
|
|
895
|
+
readonly type: "integer";
|
|
896
|
+
};
|
|
897
|
+
readonly count: {
|
|
898
|
+
readonly type: "integer";
|
|
899
|
+
readonly minimum: 0;
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
readonly text: {
|
|
905
|
+
readonly type: "array";
|
|
906
|
+
readonly items: {
|
|
907
|
+
readonly type: "string";
|
|
908
|
+
readonly maxLength: 4096;
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
readonly withheld: {
|
|
912
|
+
readonly type: "boolean";
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
919
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
920
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
921
|
+
readonly $ref: "#/$defs/Response";
|
|
922
|
+
readonly $defs: {
|
|
923
|
+
readonly RegistrarState: {
|
|
924
|
+
readonly title: "RegistrarState";
|
|
925
|
+
readonly description: "An election's state as its registrar holds it: the ballot box's `ElectionState` once the ballot box has registered the election, or, before that, `pendingRegistration` (the community is still delivering the registration) or `registrationRefused` (the ballot box refused it on a later delivery, and only a cancellation clears it). The first six values are the ballot box's `ElectionState` (voting/_shared/0.1).";
|
|
926
|
+
readonly type: "string";
|
|
927
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled", "pendingRegistration", "registrationRefused"];
|
|
928
|
+
};
|
|
929
|
+
readonly Checkpoint: {
|
|
930
|
+
readonly title: "Checkpoint";
|
|
931
|
+
readonly description: "A board head the community read from the ballot box and kept, with the ballot box's signed document that carried it. Certification proves the board's final head consistent with every checkpoint, so a ballot box that rewrote its board after a checkpoint is caught.";
|
|
932
|
+
readonly type: "object";
|
|
933
|
+
readonly additionalProperties: false;
|
|
934
|
+
readonly required: readonly ["head", "document"];
|
|
935
|
+
readonly properties: {
|
|
936
|
+
readonly head: {
|
|
937
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
938
|
+
};
|
|
939
|
+
readonly document: {
|
|
940
|
+
readonly type: "object";
|
|
941
|
+
readonly description: "The ballot box's signed voting/board/head `#response` document whose payload carries `head`, kept whole and exactly as received — proof included — so anyone can verify it against the ballot box's DID without trusting the community.";
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
readonly Certification: {
|
|
946
|
+
readonly title: "Certification";
|
|
947
|
+
readonly description: "The community's certification of the election's result, as vtc/elections/certify recorded it.";
|
|
948
|
+
readonly type: "object";
|
|
949
|
+
readonly additionalProperties: false;
|
|
950
|
+
readonly required: readonly ["result", "certifiedAt", "auditAttestations"];
|
|
951
|
+
readonly properties: {
|
|
952
|
+
readonly result: {
|
|
953
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
954
|
+
};
|
|
955
|
+
readonly certifiedAt: {
|
|
956
|
+
readonly type: "string";
|
|
957
|
+
readonly format: "date-time";
|
|
958
|
+
readonly maxLength: 64;
|
|
959
|
+
};
|
|
960
|
+
readonly auditAttestations: {
|
|
961
|
+
readonly type: "array";
|
|
962
|
+
readonly maxItems: 32;
|
|
963
|
+
readonly items: {
|
|
964
|
+
readonly type: "object";
|
|
965
|
+
readonly description: "A verifiable credential from an auditor the manifest names, as received.";
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
readonly Response: {
|
|
971
|
+
readonly $anchor: "response";
|
|
972
|
+
readonly title: "VTC Elections — Show — response payload";
|
|
973
|
+
readonly description: "Success response to vtc/elections/show/0.6: one election, whole.";
|
|
974
|
+
readonly type: "object";
|
|
975
|
+
readonly additionalProperties: false;
|
|
976
|
+
readonly required: readonly ["manifest", "manifestDigest", "state", "parameters", "disclosure", "checkpoints"];
|
|
977
|
+
readonly properties: {
|
|
978
|
+
readonly manifest: {
|
|
979
|
+
readonly $ref: "#/$defs/Manifest";
|
|
980
|
+
};
|
|
981
|
+
readonly manifestDigest: {
|
|
982
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
983
|
+
readonly description: "The SHA-256 multihash of the RFC 8785 (JCS) canonicalization of `manifest`. A ticket request names it, and every cast is bound to it.";
|
|
984
|
+
};
|
|
985
|
+
readonly state: {
|
|
986
|
+
readonly $ref: "#/$defs/RegistrarState";
|
|
987
|
+
};
|
|
988
|
+
readonly parameters: {
|
|
989
|
+
readonly $ref: "#/$defs/VotingParameters";
|
|
990
|
+
readonly description: "The community's voting parameters the election's tickets are issued under (VTI-VOT-020).";
|
|
991
|
+
};
|
|
992
|
+
readonly disclosure: {
|
|
993
|
+
readonly $ref: "#/$defs/Disclosure";
|
|
994
|
+
readonly description: "How the election is run, generated from the manifest and the community's configuration (VTI-VOT-090). Always present: a member reads it before requesting a ticket.";
|
|
995
|
+
};
|
|
996
|
+
readonly checkpoints: {
|
|
997
|
+
readonly type: "array";
|
|
998
|
+
readonly maxItems: 256;
|
|
999
|
+
readonly items: {
|
|
1000
|
+
readonly $ref: "#/$defs/Checkpoint";
|
|
1001
|
+
};
|
|
1002
|
+
readonly description: "The board heads the community has kept, oldest first. Empty until the community has read a head.";
|
|
1003
|
+
};
|
|
1004
|
+
readonly ticketsIssued: {
|
|
1005
|
+
readonly type: "integer";
|
|
1006
|
+
readonly minimum: 0;
|
|
1007
|
+
readonly description: "How many tickets the community has issued for the election. Present only to a caller holding vtc.elections.manage.";
|
|
1008
|
+
};
|
|
1009
|
+
readonly electionKey: {
|
|
1010
|
+
readonly $ref: "#/$defs/ElectionKey";
|
|
1011
|
+
readonly description: "The key a sealed or tallied-encrypted election's ballots are encrypted under, once its trustees have formed it (CONVENTIONS §9.6).";
|
|
1012
|
+
};
|
|
1013
|
+
readonly certified: {
|
|
1014
|
+
readonly $ref: "#/$defs/Certification";
|
|
1015
|
+
readonly description: "Present once the community has certified the result.";
|
|
1016
|
+
};
|
|
1017
|
+
readonly ext: {
|
|
1018
|
+
readonly $ref: "#/$defs/Ext";
|
|
1019
|
+
};
|
|
1020
|
+
readonly ceremony: {
|
|
1021
|
+
readonly $ref: "#/$defs/TrusteeCeremony";
|
|
1022
|
+
readonly description: "With electionKey: the trustees' signed steps it forms from, through the board's electionKey entry, each exactly as received. A voter's VTA forms the key itself from these (vta/pcs/vote-encrypted/0.5).";
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
readonly TrusteeCeremony: {
|
|
1027
|
+
readonly title: "TrusteeCeremony";
|
|
1028
|
+
readonly description: "The trustees' ceremony as the board holds it: the `request` of every `trusteeStep` entry, in board order, each exactly as the ballot box received it (CONVENTIONS §9.6). Whoever acts on it verifies each step as its trustee's before taking it; nothing in it is believed for having been passed along.";
|
|
1029
|
+
readonly type: "array";
|
|
1030
|
+
readonly minItems: 1;
|
|
1031
|
+
readonly maxItems: 4224;
|
|
1032
|
+
readonly items: {
|
|
1033
|
+
readonly $ref: "#/$defs/SignedRequest";
|
|
1034
|
+
};
|
|
1035
|
+
};
|
|
1036
|
+
readonly SignedRequest: {
|
|
1037
|
+
readonly title: "SignedRequest";
|
|
1038
|
+
readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
|
|
1039
|
+
readonly type: "object";
|
|
1040
|
+
readonly minProperties: 1;
|
|
1041
|
+
};
|
|
1042
|
+
readonly Ext: {
|
|
1043
|
+
readonly title: "Ext";
|
|
1044
|
+
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.";
|
|
1045
|
+
readonly type: "object";
|
|
1046
|
+
readonly minProperties: 1;
|
|
1047
|
+
readonly additionalProperties: true;
|
|
1048
|
+
readonly propertyNames: {
|
|
1049
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1050
|
+
};
|
|
1051
|
+
};
|
|
1052
|
+
readonly ElectionKey: {
|
|
1053
|
+
readonly title: "ElectionKey";
|
|
1054
|
+
readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
|
|
1055
|
+
readonly type: "object";
|
|
1056
|
+
readonly additionalProperties: false;
|
|
1057
|
+
readonly required: readonly ["key", "qualified", "verification"];
|
|
1058
|
+
readonly properties: {
|
|
1059
|
+
readonly key: {
|
|
1060
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
1061
|
+
};
|
|
1062
|
+
readonly qualified: {
|
|
1063
|
+
readonly type: "array";
|
|
1064
|
+
readonly minItems: 1;
|
|
1065
|
+
readonly maxItems: 64;
|
|
1066
|
+
readonly items: {
|
|
1067
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
1068
|
+
};
|
|
1069
|
+
readonly description: "The dealers whose dealings the key is formed from.";
|
|
1070
|
+
};
|
|
1071
|
+
readonly verification: {
|
|
1072
|
+
readonly type: "array";
|
|
1073
|
+
readonly minItems: 2;
|
|
1074
|
+
readonly maxItems: 64;
|
|
1075
|
+
readonly items: {
|
|
1076
|
+
readonly type: "object";
|
|
1077
|
+
readonly additionalProperties: false;
|
|
1078
|
+
readonly required: readonly ["trustee", "key"];
|
|
1079
|
+
readonly properties: {
|
|
1080
|
+
readonly trustee: {
|
|
1081
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
1082
|
+
};
|
|
1083
|
+
readonly key: {
|
|
1084
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
readonly GroupElement: {
|
|
1092
|
+
readonly title: "GroupElement";
|
|
1093
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
1094
|
+
readonly type: "string";
|
|
1095
|
+
readonly minLength: 2;
|
|
1096
|
+
readonly maxLength: 64;
|
|
1097
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
1098
|
+
};
|
|
1099
|
+
readonly TrusteeIndex: {
|
|
1100
|
+
readonly title: "TrusteeIndex";
|
|
1101
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
1102
|
+
readonly type: "integer";
|
|
1103
|
+
readonly minimum: 1;
|
|
1104
|
+
readonly maximum: 64;
|
|
1105
|
+
};
|
|
1106
|
+
readonly Disclosure: {
|
|
1107
|
+
readonly title: "Disclosure";
|
|
1108
|
+
readonly description: "The statement a community publishes, and shows a member before they request a ticket, about how one election is run (VTI-VOT-090). Generated from the election's manifest and the community's configuration, never written by hand. Under a `credential` roll it also says whose membership credential counts (`rollCredential`).";
|
|
1109
|
+
readonly type: "object";
|
|
1110
|
+
readonly additionalProperties: false;
|
|
1111
|
+
readonly required: readonly ["ballotBox", "ballotBoxOperator", "sameOperator", "boardVisibility", "auditors", "revote", "coercionResistance"];
|
|
1112
|
+
readonly properties: {
|
|
1113
|
+
readonly ballotBox: {
|
|
1114
|
+
readonly type: "string";
|
|
1115
|
+
readonly minLength: 1;
|
|
1116
|
+
readonly maxLength: 2048;
|
|
1117
|
+
readonly description: "The ballot box's DID.";
|
|
1118
|
+
};
|
|
1119
|
+
readonly ballotBoxOperator: {
|
|
1120
|
+
readonly type: "string";
|
|
1121
|
+
readonly minLength: 1;
|
|
1122
|
+
readonly maxLength: 512;
|
|
1123
|
+
readonly description: "Who operates the ballot box, as the community names them.";
|
|
1124
|
+
};
|
|
1125
|
+
readonly sameOperator: {
|
|
1126
|
+
readonly type: "boolean";
|
|
1127
|
+
readonly description: "Whether the party operating the community's VTC also operates the ballot box.";
|
|
1128
|
+
};
|
|
1129
|
+
readonly trustees: {
|
|
1130
|
+
readonly $ref: "#/$defs/Trustees";
|
|
1131
|
+
};
|
|
1132
|
+
readonly boardVisibility: {
|
|
1133
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
1134
|
+
};
|
|
1135
|
+
readonly auditors: {
|
|
1136
|
+
readonly type: "array";
|
|
1137
|
+
readonly items: {
|
|
1138
|
+
readonly type: "string";
|
|
1139
|
+
readonly minLength: 1;
|
|
1140
|
+
readonly maxLength: 2048;
|
|
1141
|
+
};
|
|
1142
|
+
readonly uniqueItems: true;
|
|
1143
|
+
};
|
|
1144
|
+
readonly revote: {
|
|
1145
|
+
readonly $ref: "#/$defs/Revote";
|
|
1146
|
+
};
|
|
1147
|
+
readonly rollCredential: {
|
|
1148
|
+
readonly $ref: "#/$defs/RollCredentialDisclosure";
|
|
1149
|
+
};
|
|
1150
|
+
readonly coercionResistance: {
|
|
1151
|
+
readonly const: false;
|
|
1152
|
+
readonly description: "Always false: a voter can prove how they voted, so the community cannot protect a member against being made to vote a certain way.";
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
readonly RollCredentialDisclosure: {
|
|
1157
|
+
readonly title: "RollCredentialDisclosure";
|
|
1158
|
+
readonly description: "Under a `credential` roll, whose membership credential admits a party to a ticket, as a member is shown it before they claim one (VTI-VOT-090): the DID the roll names, what kind of party it is to this community, and its name as the community knows it. Present in a disclosure exactly when the election's roll rule is `credential`.";
|
|
1159
|
+
readonly type: "object";
|
|
1160
|
+
readonly additionalProperties: false;
|
|
1161
|
+
readonly required: readonly ["memberOf", "memberOfKind"];
|
|
1162
|
+
readonly properties: {
|
|
1163
|
+
readonly memberOf: {
|
|
1164
|
+
readonly type: "string";
|
|
1165
|
+
readonly minLength: 8;
|
|
1166
|
+
readonly maxLength: 2048;
|
|
1167
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
1168
|
+
readonly description: "The manifest's `roll.memberOf`.";
|
|
1169
|
+
};
|
|
1170
|
+
readonly memberOfKind: {
|
|
1171
|
+
readonly type: "string";
|
|
1172
|
+
readonly enum: readonly ["thisCommunity", "communityGroup", "memberParty"];
|
|
1173
|
+
readonly description: "`thisCommunity`: the community itself. `communityGroup`: one of the community's own groups, whose membership credentials it authorizes the group to issue (VTI-DIR-083). `memberParty`: a party outside the community that is itself an active member of it — another community, a group of another community, or a network — whose own membership credentials admit their holders (VTI-VOT-026).";
|
|
1174
|
+
};
|
|
1175
|
+
readonly memberOfName: {
|
|
1176
|
+
readonly type: "string";
|
|
1177
|
+
readonly minLength: 1;
|
|
1178
|
+
readonly maxLength: 512;
|
|
1179
|
+
readonly description: "The name the community shows for the party `memberOf` names: the group's name, or the member party's name as the community's records hold it. Absent where showing it would disclose more than the group's visibility admits (VTI-DIR-070).";
|
|
1180
|
+
};
|
|
1181
|
+
readonly presenterDisclosed: {
|
|
1182
|
+
readonly const: true;
|
|
1183
|
+
readonly description: "Always true: claiming a ticket shows the community the presenter's membership credential for `memberOf`, so the community learns that the presenter is a member of that party.";
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
readonly Revote: {
|
|
1188
|
+
readonly title: "Revote";
|
|
1189
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
1190
|
+
readonly type: "string";
|
|
1191
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
1192
|
+
};
|
|
1193
|
+
readonly BoardVisibility: {
|
|
1194
|
+
readonly title: "BoardVisibility";
|
|
1195
|
+
readonly description: "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).";
|
|
1196
|
+
readonly type: "string";
|
|
1197
|
+
readonly enum: readonly ["public", "private"];
|
|
1198
|
+
};
|
|
1199
|
+
readonly Trustees: {
|
|
1200
|
+
readonly title: "Trustees";
|
|
1201
|
+
readonly description: "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.";
|
|
1202
|
+
readonly type: "object";
|
|
1203
|
+
readonly additionalProperties: false;
|
|
1204
|
+
readonly required: readonly ["dids", "threshold"];
|
|
1205
|
+
readonly properties: {
|
|
1206
|
+
readonly dids: {
|
|
1207
|
+
readonly type: "array";
|
|
1208
|
+
readonly minItems: 2;
|
|
1209
|
+
readonly items: {
|
|
1210
|
+
readonly type: "string";
|
|
1211
|
+
readonly minLength: 1;
|
|
1212
|
+
readonly maxLength: 2048;
|
|
1213
|
+
};
|
|
1214
|
+
readonly uniqueItems: true;
|
|
1215
|
+
};
|
|
1216
|
+
readonly threshold: {
|
|
1217
|
+
readonly type: "integer";
|
|
1218
|
+
readonly minimum: 2;
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
readonly VotingParameters: {
|
|
1223
|
+
readonly title: "VotingParameters";
|
|
1224
|
+
readonly description: "The community's published voting parameters: the PCS suite and the voting verification key tickets are issued under (VTI-VOT-020). Distinct from its hidden-vetting helper key.";
|
|
1225
|
+
readonly type: "object";
|
|
1226
|
+
readonly additionalProperties: false;
|
|
1227
|
+
readonly required: readonly ["suite", "votingKey"];
|
|
1228
|
+
readonly properties: {
|
|
1229
|
+
readonly suite: {
|
|
1230
|
+
readonly type: "string";
|
|
1231
|
+
readonly const: "ps-ddh-bls12381";
|
|
1232
|
+
};
|
|
1233
|
+
readonly votingKey: {
|
|
1234
|
+
readonly $ref: "#/$defs/Multibase";
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
};
|
|
1238
|
+
readonly Multibase: {
|
|
1239
|
+
readonly title: "Multibase";
|
|
1240
|
+
readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
|
|
1241
|
+
readonly type: "string";
|
|
1242
|
+
readonly maxLength: 16384;
|
|
1243
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
1244
|
+
};
|
|
1245
|
+
readonly DigestMultibase: {
|
|
1246
|
+
readonly title: "DigestMultibase";
|
|
1247
|
+
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`.";
|
|
1248
|
+
readonly type: "string";
|
|
1249
|
+
readonly minLength: 16;
|
|
1250
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
1251
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
1252
|
+
};
|
|
1253
|
+
readonly Manifest: {
|
|
1254
|
+
readonly title: "Manifest";
|
|
1255
|
+
readonly description: "What an election asks and how it is decided (VTI-VOT-010). Its digest (`manifestDigest`) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, and every cast is bound to it (VTI-VOT-011).";
|
|
1256
|
+
readonly type: "object";
|
|
1257
|
+
readonly additionalProperties: false;
|
|
1258
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
1259
|
+
readonly properties: {
|
|
1260
|
+
readonly electionId: {
|
|
1261
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1262
|
+
};
|
|
1263
|
+
readonly community: {
|
|
1264
|
+
readonly type: "string";
|
|
1265
|
+
readonly minLength: 1;
|
|
1266
|
+
readonly maxLength: 2048;
|
|
1267
|
+
readonly description: "The community's DID.";
|
|
1268
|
+
};
|
|
1269
|
+
readonly title: {
|
|
1270
|
+
readonly type: "string";
|
|
1271
|
+
readonly maxLength: 512;
|
|
1272
|
+
};
|
|
1273
|
+
readonly description: {
|
|
1274
|
+
readonly type: "string";
|
|
1275
|
+
readonly maxLength: 8192;
|
|
1276
|
+
};
|
|
1277
|
+
readonly questions: {
|
|
1278
|
+
readonly type: "array";
|
|
1279
|
+
readonly minItems: 1;
|
|
1280
|
+
readonly maxItems: 128;
|
|
1281
|
+
readonly items: {
|
|
1282
|
+
readonly $ref: "#/$defs/Question";
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
readonly secrecy: {
|
|
1286
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
1287
|
+
};
|
|
1288
|
+
readonly roll: {
|
|
1289
|
+
readonly $ref: "#/$defs/RollRule";
|
|
1290
|
+
};
|
|
1291
|
+
readonly registrationOpensAt: {
|
|
1292
|
+
readonly type: "string";
|
|
1293
|
+
readonly format: "date-time";
|
|
1294
|
+
};
|
|
1295
|
+
readonly votingOpensAt: {
|
|
1296
|
+
readonly type: "string";
|
|
1297
|
+
readonly format: "date-time";
|
|
1298
|
+
};
|
|
1299
|
+
readonly votingClosesAt: {
|
|
1300
|
+
readonly type: "string";
|
|
1301
|
+
readonly format: "date-time";
|
|
1302
|
+
};
|
|
1303
|
+
readonly revote: {
|
|
1304
|
+
readonly $ref: "#/$defs/Revote";
|
|
1305
|
+
};
|
|
1306
|
+
readonly board: {
|
|
1307
|
+
readonly type: "object";
|
|
1308
|
+
readonly additionalProperties: false;
|
|
1309
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
1310
|
+
readonly properties: {
|
|
1311
|
+
readonly visibility: {
|
|
1312
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
1313
|
+
};
|
|
1314
|
+
readonly auditors: {
|
|
1315
|
+
readonly type: "array";
|
|
1316
|
+
readonly items: {
|
|
1317
|
+
readonly type: "string";
|
|
1318
|
+
readonly minLength: 1;
|
|
1319
|
+
readonly maxLength: 2048;
|
|
1320
|
+
};
|
|
1321
|
+
readonly uniqueItems: true;
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
readonly ballotBox: {
|
|
1326
|
+
readonly type: "string";
|
|
1327
|
+
readonly minLength: 1;
|
|
1328
|
+
readonly maxLength: 2048;
|
|
1329
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
1330
|
+
};
|
|
1331
|
+
readonly trustees: {
|
|
1332
|
+
readonly $ref: "#/$defs/Trustees";
|
|
1333
|
+
};
|
|
1334
|
+
readonly binding: {
|
|
1335
|
+
readonly type: "boolean";
|
|
1336
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
1337
|
+
};
|
|
1338
|
+
readonly allowEarlyClose: {
|
|
1339
|
+
readonly type: "boolean";
|
|
1340
|
+
};
|
|
1341
|
+
readonly resultsBeforeClose: {
|
|
1342
|
+
readonly type: "boolean";
|
|
1343
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
1344
|
+
};
|
|
1345
|
+
readonly textReleaseThreshold: {
|
|
1346
|
+
readonly type: "integer";
|
|
1347
|
+
readonly minimum: 1;
|
|
1348
|
+
readonly description: "Counted ballots required before any text answer is disclosed (VTI-VOT-065). At least 1, and SHOULD be at least 10: a written answer can identify its author by what it says or how it is phrased, and the fewer the ballots released together, the easier that is. Where it is below 10, the disclosure a member is shown before they request a ticket MUST say so, and MUST say that a written answer may identify its author (VTI-VOT-090).";
|
|
1349
|
+
};
|
|
1350
|
+
};
|
|
1351
|
+
};
|
|
1352
|
+
readonly RollRule: {
|
|
1353
|
+
readonly title: "RollRule";
|
|
1354
|
+
readonly description: "Who may be issued a ticket (VTI-VOT-021): the community's active members (`members`), its active members and the parties `listed` names (`membersAndListed`), only the parties `listed` names (`listed`), or the holders of a membership credential for the one DID `memberOf` names (`credential`), proven by presentation when the holder claims their ticket and never resolved when the election is created (VTI-VOT-025). `memberOf` is present exactly when `rule` is `credential`, and `listed` is never present with it.";
|
|
1355
|
+
readonly type: "object";
|
|
1356
|
+
readonly additionalProperties: false;
|
|
1357
|
+
readonly required: readonly ["rule"];
|
|
1358
|
+
readonly properties: {
|
|
1359
|
+
readonly rule: {
|
|
1360
|
+
readonly type: "string";
|
|
1361
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
1362
|
+
};
|
|
1363
|
+
readonly listed: {
|
|
1364
|
+
readonly type: "array";
|
|
1365
|
+
readonly items: {
|
|
1366
|
+
readonly type: "string";
|
|
1367
|
+
readonly minLength: 1;
|
|
1368
|
+
readonly maxLength: 2048;
|
|
1369
|
+
readonly description: "A DID enfranchised by name.";
|
|
1370
|
+
};
|
|
1371
|
+
readonly uniqueItems: true;
|
|
1372
|
+
};
|
|
1373
|
+
readonly memberOf: {
|
|
1374
|
+
readonly type: "string";
|
|
1375
|
+
readonly minLength: 8;
|
|
1376
|
+
readonly maxLength: 2048;
|
|
1377
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
1378
|
+
readonly description: "The DID whose membership credential admits its holder, under the `credential` rule: this community, one of its groups, or a party that is itself an active member of this community — holding a membership credential this community issued it — such as another community, a group of another community, or a network (VTI-VOT-026). Always a DID, never a group's local identifier or name. A community refuses to create an election naming any other DID (vtc/elections/create:rollUntrusted).";
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
readonly dependentSchemas: {
|
|
1382
|
+
readonly rule: {
|
|
1383
|
+
readonly anyOf: readonly [{
|
|
1384
|
+
readonly required: readonly ["memberOf"];
|
|
1385
|
+
}, {
|
|
1386
|
+
readonly properties: {
|
|
1387
|
+
readonly rule: {
|
|
1388
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
1389
|
+
};
|
|
1390
|
+
};
|
|
1391
|
+
}];
|
|
1392
|
+
};
|
|
1393
|
+
readonly memberOf: {
|
|
1394
|
+
readonly properties: {
|
|
1395
|
+
readonly rule: {
|
|
1396
|
+
readonly const: "credential";
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
readonly not: {
|
|
1400
|
+
readonly required: readonly ["listed"];
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
};
|
|
1405
|
+
readonly SecrecyLevel: {
|
|
1406
|
+
readonly title: "SecrecyLevel";
|
|
1407
|
+
readonly description: "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).";
|
|
1408
|
+
readonly type: "string";
|
|
1409
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
1410
|
+
};
|
|
1411
|
+
readonly Question: {
|
|
1412
|
+
readonly title: "Question";
|
|
1413
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
1414
|
+
readonly oneOf: readonly [{
|
|
1415
|
+
readonly title: "ChoiceQuestion";
|
|
1416
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
1417
|
+
readonly type: "object";
|
|
1418
|
+
readonly additionalProperties: false;
|
|
1419
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
1420
|
+
readonly properties: {
|
|
1421
|
+
readonly key: {
|
|
1422
|
+
readonly $ref: "#/$defs/Key";
|
|
1423
|
+
};
|
|
1424
|
+
readonly type: {
|
|
1425
|
+
readonly const: "choice";
|
|
1426
|
+
};
|
|
1427
|
+
readonly text: {
|
|
1428
|
+
readonly type: "string";
|
|
1429
|
+
readonly maxLength: 2048;
|
|
1430
|
+
};
|
|
1431
|
+
readonly options: {
|
|
1432
|
+
readonly type: "array";
|
|
1433
|
+
readonly minItems: 2;
|
|
1434
|
+
readonly maxItems: 256;
|
|
1435
|
+
readonly items: {
|
|
1436
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
readonly minSelections: {
|
|
1440
|
+
readonly type: "integer";
|
|
1441
|
+
readonly minimum: 0;
|
|
1442
|
+
};
|
|
1443
|
+
readonly maxSelections: {
|
|
1444
|
+
readonly type: "integer";
|
|
1445
|
+
readonly minimum: 1;
|
|
1446
|
+
};
|
|
1447
|
+
readonly optional: {
|
|
1448
|
+
readonly type: "boolean";
|
|
1449
|
+
};
|
|
1450
|
+
};
|
|
1451
|
+
}, {
|
|
1452
|
+
readonly title: "RankingQuestion";
|
|
1453
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
1454
|
+
readonly type: "object";
|
|
1455
|
+
readonly additionalProperties: false;
|
|
1456
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
1457
|
+
readonly properties: {
|
|
1458
|
+
readonly key: {
|
|
1459
|
+
readonly $ref: "#/$defs/Key";
|
|
1460
|
+
};
|
|
1461
|
+
readonly type: {
|
|
1462
|
+
readonly const: "ranking";
|
|
1463
|
+
};
|
|
1464
|
+
readonly text: {
|
|
1465
|
+
readonly type: "string";
|
|
1466
|
+
readonly maxLength: 2048;
|
|
1467
|
+
};
|
|
1468
|
+
readonly options: {
|
|
1469
|
+
readonly type: "array";
|
|
1470
|
+
readonly minItems: 2;
|
|
1471
|
+
readonly maxItems: 64;
|
|
1472
|
+
readonly items: {
|
|
1473
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1474
|
+
};
|
|
1475
|
+
};
|
|
1476
|
+
readonly partial: {
|
|
1477
|
+
readonly type: "boolean";
|
|
1478
|
+
};
|
|
1479
|
+
readonly optional: {
|
|
1480
|
+
readonly type: "boolean";
|
|
1481
|
+
};
|
|
1482
|
+
};
|
|
1483
|
+
}, {
|
|
1484
|
+
readonly title: "ScoreQuestion";
|
|
1485
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
1486
|
+
readonly type: "object";
|
|
1487
|
+
readonly additionalProperties: false;
|
|
1488
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
1489
|
+
readonly properties: {
|
|
1490
|
+
readonly key: {
|
|
1491
|
+
readonly $ref: "#/$defs/Key";
|
|
1492
|
+
};
|
|
1493
|
+
readonly type: {
|
|
1494
|
+
readonly const: "score";
|
|
1495
|
+
};
|
|
1496
|
+
readonly text: {
|
|
1497
|
+
readonly type: "string";
|
|
1498
|
+
readonly maxLength: 2048;
|
|
1499
|
+
};
|
|
1500
|
+
readonly options: {
|
|
1501
|
+
readonly type: "array";
|
|
1502
|
+
readonly minItems: 1;
|
|
1503
|
+
readonly maxItems: 256;
|
|
1504
|
+
readonly items: {
|
|
1505
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1508
|
+
readonly min: {
|
|
1509
|
+
readonly type: "integer";
|
|
1510
|
+
};
|
|
1511
|
+
readonly max: {
|
|
1512
|
+
readonly type: "integer";
|
|
1513
|
+
};
|
|
1514
|
+
readonly optional: {
|
|
1515
|
+
readonly type: "boolean";
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
}, {
|
|
1519
|
+
readonly title: "TextQuestion";
|
|
1520
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
1521
|
+
readonly type: "object";
|
|
1522
|
+
readonly additionalProperties: false;
|
|
1523
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
1524
|
+
readonly properties: {
|
|
1525
|
+
readonly key: {
|
|
1526
|
+
readonly $ref: "#/$defs/Key";
|
|
1527
|
+
};
|
|
1528
|
+
readonly type: {
|
|
1529
|
+
readonly const: "text";
|
|
1530
|
+
};
|
|
1531
|
+
readonly text: {
|
|
1532
|
+
readonly type: "string";
|
|
1533
|
+
readonly maxLength: 2048;
|
|
1534
|
+
};
|
|
1535
|
+
readonly maxLength: {
|
|
1536
|
+
readonly type: "integer";
|
|
1537
|
+
readonly minimum: 1;
|
|
1538
|
+
readonly maximum: 4096;
|
|
1539
|
+
};
|
|
1540
|
+
readonly optional: {
|
|
1541
|
+
readonly type: "boolean";
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
}];
|
|
1545
|
+
};
|
|
1546
|
+
readonly Key: {
|
|
1547
|
+
readonly title: "Key";
|
|
1548
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
1549
|
+
readonly type: "string";
|
|
1550
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
1551
|
+
};
|
|
1552
|
+
readonly QuestionOption: {
|
|
1553
|
+
readonly title: "QuestionOption";
|
|
1554
|
+
readonly type: "object";
|
|
1555
|
+
readonly additionalProperties: false;
|
|
1556
|
+
readonly required: readonly ["key"];
|
|
1557
|
+
readonly properties: {
|
|
1558
|
+
readonly key: {
|
|
1559
|
+
readonly $ref: "#/$defs/Key";
|
|
1560
|
+
};
|
|
1561
|
+
readonly label: {
|
|
1562
|
+
readonly type: "string";
|
|
1563
|
+
readonly maxLength: 512;
|
|
1564
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1567
|
+
};
|
|
1568
|
+
readonly ElectionId: {
|
|
1569
|
+
readonly title: "ElectionId";
|
|
1570
|
+
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.";
|
|
1571
|
+
readonly type: "string";
|
|
1572
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
1573
|
+
};
|
|
1574
|
+
readonly ElectionResult: {
|
|
1575
|
+
readonly title: "ElectionResult";
|
|
1576
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
1577
|
+
readonly type: "object";
|
|
1578
|
+
readonly additionalProperties: false;
|
|
1579
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
1580
|
+
readonly properties: {
|
|
1581
|
+
readonly electionId: {
|
|
1582
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1583
|
+
};
|
|
1584
|
+
readonly manifestDigest: {
|
|
1585
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1586
|
+
};
|
|
1587
|
+
readonly ballotsCounted: {
|
|
1588
|
+
readonly type: "integer";
|
|
1589
|
+
readonly minimum: 0;
|
|
1590
|
+
};
|
|
1591
|
+
readonly questions: {
|
|
1592
|
+
readonly type: "array";
|
|
1593
|
+
readonly items: {
|
|
1594
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
1595
|
+
};
|
|
1596
|
+
};
|
|
1597
|
+
readonly head: {
|
|
1598
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
1599
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
1600
|
+
};
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
readonly BoardHead: {
|
|
1604
|
+
readonly title: "BoardHead";
|
|
1605
|
+
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.";
|
|
1606
|
+
readonly type: "object";
|
|
1607
|
+
readonly additionalProperties: false;
|
|
1608
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
1609
|
+
readonly properties: {
|
|
1610
|
+
readonly electionId: {
|
|
1611
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1612
|
+
};
|
|
1613
|
+
readonly treeSize: {
|
|
1614
|
+
readonly type: "integer";
|
|
1615
|
+
readonly minimum: 0;
|
|
1616
|
+
};
|
|
1617
|
+
readonly rootHash: {
|
|
1618
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1619
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
1620
|
+
};
|
|
1621
|
+
readonly issuedAt: {
|
|
1622
|
+
readonly type: "string";
|
|
1623
|
+
readonly format: "date-time";
|
|
1624
|
+
};
|
|
1625
|
+
};
|
|
1626
|
+
};
|
|
1627
|
+
readonly QuestionResult: {
|
|
1628
|
+
readonly title: "QuestionResult";
|
|
1629
|
+
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.";
|
|
1630
|
+
readonly type: "object";
|
|
1631
|
+
readonly additionalProperties: false;
|
|
1632
|
+
readonly required: readonly ["question", "abstained"];
|
|
1633
|
+
readonly properties: {
|
|
1634
|
+
readonly question: {
|
|
1635
|
+
readonly $ref: "#/$defs/Key";
|
|
1636
|
+
};
|
|
1637
|
+
readonly abstained: {
|
|
1638
|
+
readonly type: "integer";
|
|
1639
|
+
readonly minimum: 0;
|
|
1640
|
+
};
|
|
1641
|
+
readonly choice: {
|
|
1642
|
+
readonly type: "object";
|
|
1643
|
+
readonly propertyNames: {
|
|
1644
|
+
readonly $ref: "#/$defs/Key";
|
|
1645
|
+
};
|
|
1646
|
+
readonly additionalProperties: {
|
|
1647
|
+
readonly type: "integer";
|
|
1648
|
+
readonly minimum: 0;
|
|
1649
|
+
};
|
|
1650
|
+
};
|
|
1651
|
+
readonly ranking: {
|
|
1652
|
+
readonly type: "object";
|
|
1653
|
+
readonly propertyNames: {
|
|
1654
|
+
readonly $ref: "#/$defs/Key";
|
|
1655
|
+
};
|
|
1656
|
+
readonly additionalProperties: {
|
|
1657
|
+
readonly type: "array";
|
|
1658
|
+
readonly items: {
|
|
1659
|
+
readonly type: "integer";
|
|
1660
|
+
readonly minimum: 0;
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
readonly score: {
|
|
1665
|
+
readonly type: "object";
|
|
1666
|
+
readonly propertyNames: {
|
|
1667
|
+
readonly $ref: "#/$defs/Key";
|
|
1668
|
+
};
|
|
1669
|
+
readonly additionalProperties: {
|
|
1670
|
+
readonly type: "object";
|
|
1671
|
+
readonly additionalProperties: false;
|
|
1672
|
+
readonly required: readonly ["sum", "count"];
|
|
1673
|
+
readonly properties: {
|
|
1674
|
+
readonly sum: {
|
|
1675
|
+
readonly type: "integer";
|
|
1676
|
+
};
|
|
1677
|
+
readonly count: {
|
|
1678
|
+
readonly type: "integer";
|
|
1679
|
+
readonly minimum: 0;
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
readonly text: {
|
|
1685
|
+
readonly type: "array";
|
|
1686
|
+
readonly items: {
|
|
1687
|
+
readonly type: "string";
|
|
1688
|
+
readonly maxLength: 4096;
|
|
1689
|
+
};
|
|
1690
|
+
};
|
|
1691
|
+
readonly withheld: {
|
|
1692
|
+
readonly type: "boolean";
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
/**
|
|
1699
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
1700
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
1701
|
+
* per-specification and cannot be derived from the document alone, and
|
|
1702
|
+
* item 2 needs the schema this carries.
|
|
1703
|
+
*/
|
|
1704
|
+
export declare const SPEC: {
|
|
1705
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/elections/show/0.6";
|
|
1706
|
+
readonly isBearer: false;
|
|
1707
|
+
readonly isProofRequired: false;
|
|
1708
|
+
readonly isRecipientRequired: true;
|
|
1709
|
+
readonly isIssuedAtRequired: false;
|
|
1710
|
+
readonly payloadSchema: {
|
|
1711
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1712
|
+
readonly $id: "https://trusttasks.org/spec/vtc/elections/show/0.6";
|
|
1713
|
+
readonly title: "VTC Elections — Show — payload";
|
|
1714
|
+
readonly description: "A member or an administrator reads one election of the community whole: its manifest, state, voting parameters, disclosure, the board checkpoints the community kept and, once certified, the certified result. Where the election's credential roll names a member party, a reader the community holds no record of reads it by presenting their membership credential for that party. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
1715
|
+
readonly type: "object";
|
|
1716
|
+
readonly additionalProperties: false;
|
|
1717
|
+
readonly required: readonly ["electionId"];
|
|
1718
|
+
readonly properties: {
|
|
1719
|
+
readonly electionId: {
|
|
1720
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1721
|
+
};
|
|
1722
|
+
readonly presentation: {
|
|
1723
|
+
readonly description: "Only where the reader means to read an election whose `credential` roll (voting/_shared/0.4 `RollRule`) names a member party — a party other than the community and its groups — and the community's records do not otherwise admit them: the reader's presentation of its membership credential for the party `roll.memberOf` names, made by the credential's subject — who signs this document — and bound to this document (VTI-VOT-015, checked as VTI-VOT-025 requires). The community verifies it before, and without reference to, the election the request names, answering `indeterminate` whatever the election where a status list, a trust registry or the issuer's DID document cannot be obtained; it uses the outcome only for such an election, and discards the presentation once it has decided. Without one that passes, such an election is answered `electionUnknown`.";
|
|
1724
|
+
readonly anyOf: readonly [{
|
|
1725
|
+
readonly type: "object";
|
|
1726
|
+
readonly description: "A W3C Verifiable Presentation whose `nonce` is this document's `id` and whose `domain` is the community's DID, both signed by its holder's Data Integrity proof.";
|
|
1727
|
+
}, {
|
|
1728
|
+
readonly type: "string";
|
|
1729
|
+
readonly minLength: 1;
|
|
1730
|
+
readonly maxLength: 65536;
|
|
1731
|
+
readonly description: "A compact presentation: an SD-JWT with a key-binding JWT whose `nonce` is this document's `id` and `aud` the community's DID.";
|
|
1732
|
+
}];
|
|
1733
|
+
};
|
|
1734
|
+
readonly ext: {
|
|
1735
|
+
readonly $ref: "#/$defs/Ext";
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
readonly $defs: {
|
|
1739
|
+
readonly RegistrarState: {
|
|
1740
|
+
readonly title: "RegistrarState";
|
|
1741
|
+
readonly description: "An election's state as its registrar holds it: the ballot box's `ElectionState` once the ballot box has registered the election, or, before that, `pendingRegistration` (the community is still delivering the registration) or `registrationRefused` (the ballot box refused it on a later delivery, and only a cancellation clears it). The first six values are the ballot box's `ElectionState` (voting/_shared/0.1).";
|
|
1742
|
+
readonly type: "string";
|
|
1743
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled", "pendingRegistration", "registrationRefused"];
|
|
1744
|
+
};
|
|
1745
|
+
readonly Checkpoint: {
|
|
1746
|
+
readonly title: "Checkpoint";
|
|
1747
|
+
readonly description: "A board head the community read from the ballot box and kept, with the ballot box's signed document that carried it. Certification proves the board's final head consistent with every checkpoint, so a ballot box that rewrote its board after a checkpoint is caught.";
|
|
1748
|
+
readonly type: "object";
|
|
1749
|
+
readonly additionalProperties: false;
|
|
1750
|
+
readonly required: readonly ["head", "document"];
|
|
1751
|
+
readonly properties: {
|
|
1752
|
+
readonly head: {
|
|
1753
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
1754
|
+
};
|
|
1755
|
+
readonly document: {
|
|
1756
|
+
readonly type: "object";
|
|
1757
|
+
readonly description: "The ballot box's signed voting/board/head `#response` document whose payload carries `head`, kept whole and exactly as received — proof included — so anyone can verify it against the ballot box's DID without trusting the community.";
|
|
1758
|
+
};
|
|
1759
|
+
};
|
|
1760
|
+
};
|
|
1761
|
+
readonly Certification: {
|
|
1762
|
+
readonly title: "Certification";
|
|
1763
|
+
readonly description: "The community's certification of the election's result, as vtc/elections/certify recorded it.";
|
|
1764
|
+
readonly type: "object";
|
|
1765
|
+
readonly additionalProperties: false;
|
|
1766
|
+
readonly required: readonly ["result", "certifiedAt", "auditAttestations"];
|
|
1767
|
+
readonly properties: {
|
|
1768
|
+
readonly result: {
|
|
1769
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
1770
|
+
};
|
|
1771
|
+
readonly certifiedAt: {
|
|
1772
|
+
readonly type: "string";
|
|
1773
|
+
readonly format: "date-time";
|
|
1774
|
+
readonly maxLength: 64;
|
|
1775
|
+
};
|
|
1776
|
+
readonly auditAttestations: {
|
|
1777
|
+
readonly type: "array";
|
|
1778
|
+
readonly maxItems: 32;
|
|
1779
|
+
readonly items: {
|
|
1780
|
+
readonly type: "object";
|
|
1781
|
+
readonly description: "A verifiable credential from an auditor the manifest names, as received.";
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
readonly Response: {
|
|
1787
|
+
readonly $anchor: "response";
|
|
1788
|
+
readonly title: "VTC Elections — Show — response payload";
|
|
1789
|
+
readonly description: "Success response to vtc/elections/show/0.6: one election, whole.";
|
|
1790
|
+
readonly type: "object";
|
|
1791
|
+
readonly additionalProperties: false;
|
|
1792
|
+
readonly required: readonly ["manifest", "manifestDigest", "state", "parameters", "disclosure", "checkpoints"];
|
|
1793
|
+
readonly properties: {
|
|
1794
|
+
readonly manifest: {
|
|
1795
|
+
readonly $ref: "#/$defs/Manifest";
|
|
1796
|
+
};
|
|
1797
|
+
readonly manifestDigest: {
|
|
1798
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1799
|
+
readonly description: "The SHA-256 multihash of the RFC 8785 (JCS) canonicalization of `manifest`. A ticket request names it, and every cast is bound to it.";
|
|
1800
|
+
};
|
|
1801
|
+
readonly state: {
|
|
1802
|
+
readonly $ref: "#/$defs/RegistrarState";
|
|
1803
|
+
};
|
|
1804
|
+
readonly parameters: {
|
|
1805
|
+
readonly $ref: "#/$defs/VotingParameters";
|
|
1806
|
+
readonly description: "The community's voting parameters the election's tickets are issued under (VTI-VOT-020).";
|
|
1807
|
+
};
|
|
1808
|
+
readonly disclosure: {
|
|
1809
|
+
readonly $ref: "#/$defs/Disclosure";
|
|
1810
|
+
readonly description: "How the election is run, generated from the manifest and the community's configuration (VTI-VOT-090). Always present: a member reads it before requesting a ticket.";
|
|
1811
|
+
};
|
|
1812
|
+
readonly checkpoints: {
|
|
1813
|
+
readonly type: "array";
|
|
1814
|
+
readonly maxItems: 256;
|
|
1815
|
+
readonly items: {
|
|
1816
|
+
readonly $ref: "#/$defs/Checkpoint";
|
|
1817
|
+
};
|
|
1818
|
+
readonly description: "The board heads the community has kept, oldest first. Empty until the community has read a head.";
|
|
1819
|
+
};
|
|
1820
|
+
readonly ticketsIssued: {
|
|
1821
|
+
readonly type: "integer";
|
|
1822
|
+
readonly minimum: 0;
|
|
1823
|
+
readonly description: "How many tickets the community has issued for the election. Present only to a caller holding vtc.elections.manage.";
|
|
1824
|
+
};
|
|
1825
|
+
readonly electionKey: {
|
|
1826
|
+
readonly $ref: "#/$defs/ElectionKey";
|
|
1827
|
+
readonly description: "The key a sealed or tallied-encrypted election's ballots are encrypted under, once its trustees have formed it (CONVENTIONS §9.6).";
|
|
1828
|
+
};
|
|
1829
|
+
readonly certified: {
|
|
1830
|
+
readonly $ref: "#/$defs/Certification";
|
|
1831
|
+
readonly description: "Present once the community has certified the result.";
|
|
1832
|
+
};
|
|
1833
|
+
readonly ext: {
|
|
1834
|
+
readonly $ref: "#/$defs/Ext";
|
|
1835
|
+
};
|
|
1836
|
+
readonly ceremony: {
|
|
1837
|
+
readonly $ref: "#/$defs/TrusteeCeremony";
|
|
1838
|
+
readonly description: "With electionKey: the trustees' signed steps it forms from, through the board's electionKey entry, each exactly as received. A voter's VTA forms the key itself from these (vta/pcs/vote-encrypted/0.5).";
|
|
1839
|
+
};
|
|
1840
|
+
};
|
|
1841
|
+
};
|
|
1842
|
+
readonly TrusteeCeremony: {
|
|
1843
|
+
readonly title: "TrusteeCeremony";
|
|
1844
|
+
readonly description: "The trustees' ceremony as the board holds it: the `request` of every `trusteeStep` entry, in board order, each exactly as the ballot box received it (CONVENTIONS §9.6). Whoever acts on it verifies each step as its trustee's before taking it; nothing in it is believed for having been passed along.";
|
|
1845
|
+
readonly type: "array";
|
|
1846
|
+
readonly minItems: 1;
|
|
1847
|
+
readonly maxItems: 4224;
|
|
1848
|
+
readonly items: {
|
|
1849
|
+
readonly $ref: "#/$defs/SignedRequest";
|
|
1850
|
+
};
|
|
1851
|
+
};
|
|
1852
|
+
readonly SignedRequest: {
|
|
1853
|
+
readonly title: "SignedRequest";
|
|
1854
|
+
readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
|
|
1855
|
+
readonly type: "object";
|
|
1856
|
+
readonly minProperties: 1;
|
|
1857
|
+
};
|
|
1858
|
+
readonly Ext: {
|
|
1859
|
+
readonly title: "Ext";
|
|
1860
|
+
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.";
|
|
1861
|
+
readonly type: "object";
|
|
1862
|
+
readonly minProperties: 1;
|
|
1863
|
+
readonly additionalProperties: true;
|
|
1864
|
+
readonly propertyNames: {
|
|
1865
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1866
|
+
};
|
|
1867
|
+
};
|
|
1868
|
+
readonly ElectionKey: {
|
|
1869
|
+
readonly title: "ElectionKey";
|
|
1870
|
+
readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
|
|
1871
|
+
readonly type: "object";
|
|
1872
|
+
readonly additionalProperties: false;
|
|
1873
|
+
readonly required: readonly ["key", "qualified", "verification"];
|
|
1874
|
+
readonly properties: {
|
|
1875
|
+
readonly key: {
|
|
1876
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
1877
|
+
};
|
|
1878
|
+
readonly qualified: {
|
|
1879
|
+
readonly type: "array";
|
|
1880
|
+
readonly minItems: 1;
|
|
1881
|
+
readonly maxItems: 64;
|
|
1882
|
+
readonly items: {
|
|
1883
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
1884
|
+
};
|
|
1885
|
+
readonly description: "The dealers whose dealings the key is formed from.";
|
|
1886
|
+
};
|
|
1887
|
+
readonly verification: {
|
|
1888
|
+
readonly type: "array";
|
|
1889
|
+
readonly minItems: 2;
|
|
1890
|
+
readonly maxItems: 64;
|
|
1891
|
+
readonly items: {
|
|
1892
|
+
readonly type: "object";
|
|
1893
|
+
readonly additionalProperties: false;
|
|
1894
|
+
readonly required: readonly ["trustee", "key"];
|
|
1895
|
+
readonly properties: {
|
|
1896
|
+
readonly trustee: {
|
|
1897
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
1898
|
+
};
|
|
1899
|
+
readonly key: {
|
|
1900
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
1901
|
+
};
|
|
1902
|
+
};
|
|
1903
|
+
};
|
|
1904
|
+
};
|
|
1905
|
+
};
|
|
1906
|
+
};
|
|
1907
|
+
readonly GroupElement: {
|
|
1908
|
+
readonly title: "GroupElement";
|
|
1909
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
1910
|
+
readonly type: "string";
|
|
1911
|
+
readonly minLength: 2;
|
|
1912
|
+
readonly maxLength: 64;
|
|
1913
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
1914
|
+
};
|
|
1915
|
+
readonly TrusteeIndex: {
|
|
1916
|
+
readonly title: "TrusteeIndex";
|
|
1917
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
1918
|
+
readonly type: "integer";
|
|
1919
|
+
readonly minimum: 1;
|
|
1920
|
+
readonly maximum: 64;
|
|
1921
|
+
};
|
|
1922
|
+
readonly Disclosure: {
|
|
1923
|
+
readonly title: "Disclosure";
|
|
1924
|
+
readonly description: "The statement a community publishes, and shows a member before they request a ticket, about how one election is run (VTI-VOT-090). Generated from the election's manifest and the community's configuration, never written by hand. Under a `credential` roll it also says whose membership credential counts (`rollCredential`).";
|
|
1925
|
+
readonly type: "object";
|
|
1926
|
+
readonly additionalProperties: false;
|
|
1927
|
+
readonly required: readonly ["ballotBox", "ballotBoxOperator", "sameOperator", "boardVisibility", "auditors", "revote", "coercionResistance"];
|
|
1928
|
+
readonly properties: {
|
|
1929
|
+
readonly ballotBox: {
|
|
1930
|
+
readonly type: "string";
|
|
1931
|
+
readonly minLength: 1;
|
|
1932
|
+
readonly maxLength: 2048;
|
|
1933
|
+
readonly description: "The ballot box's DID.";
|
|
1934
|
+
};
|
|
1935
|
+
readonly ballotBoxOperator: {
|
|
1936
|
+
readonly type: "string";
|
|
1937
|
+
readonly minLength: 1;
|
|
1938
|
+
readonly maxLength: 512;
|
|
1939
|
+
readonly description: "Who operates the ballot box, as the community names them.";
|
|
1940
|
+
};
|
|
1941
|
+
readonly sameOperator: {
|
|
1942
|
+
readonly type: "boolean";
|
|
1943
|
+
readonly description: "Whether the party operating the community's VTC also operates the ballot box.";
|
|
1944
|
+
};
|
|
1945
|
+
readonly trustees: {
|
|
1946
|
+
readonly $ref: "#/$defs/Trustees";
|
|
1947
|
+
};
|
|
1948
|
+
readonly boardVisibility: {
|
|
1949
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
1950
|
+
};
|
|
1951
|
+
readonly auditors: {
|
|
1952
|
+
readonly type: "array";
|
|
1953
|
+
readonly items: {
|
|
1954
|
+
readonly type: "string";
|
|
1955
|
+
readonly minLength: 1;
|
|
1956
|
+
readonly maxLength: 2048;
|
|
1957
|
+
};
|
|
1958
|
+
readonly uniqueItems: true;
|
|
1959
|
+
};
|
|
1960
|
+
readonly revote: {
|
|
1961
|
+
readonly $ref: "#/$defs/Revote";
|
|
1962
|
+
};
|
|
1963
|
+
readonly rollCredential: {
|
|
1964
|
+
readonly $ref: "#/$defs/RollCredentialDisclosure";
|
|
1965
|
+
};
|
|
1966
|
+
readonly coercionResistance: {
|
|
1967
|
+
readonly const: false;
|
|
1968
|
+
readonly description: "Always false: a voter can prove how they voted, so the community cannot protect a member against being made to vote a certain way.";
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
readonly RollCredentialDisclosure: {
|
|
1973
|
+
readonly title: "RollCredentialDisclosure";
|
|
1974
|
+
readonly description: "Under a `credential` roll, whose membership credential admits a party to a ticket, as a member is shown it before they claim one (VTI-VOT-090): the DID the roll names, what kind of party it is to this community, and its name as the community knows it. Present in a disclosure exactly when the election's roll rule is `credential`.";
|
|
1975
|
+
readonly type: "object";
|
|
1976
|
+
readonly additionalProperties: false;
|
|
1977
|
+
readonly required: readonly ["memberOf", "memberOfKind"];
|
|
1978
|
+
readonly properties: {
|
|
1979
|
+
readonly memberOf: {
|
|
1980
|
+
readonly type: "string";
|
|
1981
|
+
readonly minLength: 8;
|
|
1982
|
+
readonly maxLength: 2048;
|
|
1983
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
1984
|
+
readonly description: "The manifest's `roll.memberOf`.";
|
|
1985
|
+
};
|
|
1986
|
+
readonly memberOfKind: {
|
|
1987
|
+
readonly type: "string";
|
|
1988
|
+
readonly enum: readonly ["thisCommunity", "communityGroup", "memberParty"];
|
|
1989
|
+
readonly description: "`thisCommunity`: the community itself. `communityGroup`: one of the community's own groups, whose membership credentials it authorizes the group to issue (VTI-DIR-083). `memberParty`: a party outside the community that is itself an active member of it — another community, a group of another community, or a network — whose own membership credentials admit their holders (VTI-VOT-026).";
|
|
1990
|
+
};
|
|
1991
|
+
readonly memberOfName: {
|
|
1992
|
+
readonly type: "string";
|
|
1993
|
+
readonly minLength: 1;
|
|
1994
|
+
readonly maxLength: 512;
|
|
1995
|
+
readonly description: "The name the community shows for the party `memberOf` names: the group's name, or the member party's name as the community's records hold it. Absent where showing it would disclose more than the group's visibility admits (VTI-DIR-070).";
|
|
1996
|
+
};
|
|
1997
|
+
readonly presenterDisclosed: {
|
|
1998
|
+
readonly const: true;
|
|
1999
|
+
readonly description: "Always true: claiming a ticket shows the community the presenter's membership credential for `memberOf`, so the community learns that the presenter is a member of that party.";
|
|
2000
|
+
};
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
readonly Revote: {
|
|
2004
|
+
readonly title: "Revote";
|
|
2005
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
2006
|
+
readonly type: "string";
|
|
2007
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
2008
|
+
};
|
|
2009
|
+
readonly BoardVisibility: {
|
|
2010
|
+
readonly title: "BoardVisibility";
|
|
2011
|
+
readonly description: "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).";
|
|
2012
|
+
readonly type: "string";
|
|
2013
|
+
readonly enum: readonly ["public", "private"];
|
|
2014
|
+
};
|
|
2015
|
+
readonly Trustees: {
|
|
2016
|
+
readonly title: "Trustees";
|
|
2017
|
+
readonly description: "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.";
|
|
2018
|
+
readonly type: "object";
|
|
2019
|
+
readonly additionalProperties: false;
|
|
2020
|
+
readonly required: readonly ["dids", "threshold"];
|
|
2021
|
+
readonly properties: {
|
|
2022
|
+
readonly dids: {
|
|
2023
|
+
readonly type: "array";
|
|
2024
|
+
readonly minItems: 2;
|
|
2025
|
+
readonly items: {
|
|
2026
|
+
readonly type: "string";
|
|
2027
|
+
readonly minLength: 1;
|
|
2028
|
+
readonly maxLength: 2048;
|
|
2029
|
+
};
|
|
2030
|
+
readonly uniqueItems: true;
|
|
2031
|
+
};
|
|
2032
|
+
readonly threshold: {
|
|
2033
|
+
readonly type: "integer";
|
|
2034
|
+
readonly minimum: 2;
|
|
2035
|
+
};
|
|
2036
|
+
};
|
|
2037
|
+
};
|
|
2038
|
+
readonly VotingParameters: {
|
|
2039
|
+
readonly title: "VotingParameters";
|
|
2040
|
+
readonly description: "The community's published voting parameters: the PCS suite and the voting verification key tickets are issued under (VTI-VOT-020). Distinct from its hidden-vetting helper key.";
|
|
2041
|
+
readonly type: "object";
|
|
2042
|
+
readonly additionalProperties: false;
|
|
2043
|
+
readonly required: readonly ["suite", "votingKey"];
|
|
2044
|
+
readonly properties: {
|
|
2045
|
+
readonly suite: {
|
|
2046
|
+
readonly type: "string";
|
|
2047
|
+
readonly const: "ps-ddh-bls12381";
|
|
2048
|
+
};
|
|
2049
|
+
readonly votingKey: {
|
|
2050
|
+
readonly $ref: "#/$defs/Multibase";
|
|
2051
|
+
};
|
|
2052
|
+
};
|
|
2053
|
+
};
|
|
2054
|
+
readonly Multibase: {
|
|
2055
|
+
readonly title: "Multibase";
|
|
2056
|
+
readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
|
|
2057
|
+
readonly type: "string";
|
|
2058
|
+
readonly maxLength: 16384;
|
|
2059
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
2060
|
+
};
|
|
2061
|
+
readonly DigestMultibase: {
|
|
2062
|
+
readonly title: "DigestMultibase";
|
|
2063
|
+
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`.";
|
|
2064
|
+
readonly type: "string";
|
|
2065
|
+
readonly minLength: 16;
|
|
2066
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
2067
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
2068
|
+
};
|
|
2069
|
+
readonly Manifest: {
|
|
2070
|
+
readonly title: "Manifest";
|
|
2071
|
+
readonly description: "What an election asks and how it is decided (VTI-VOT-010). Its digest (`manifestDigest`) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, and every cast is bound to it (VTI-VOT-011).";
|
|
2072
|
+
readonly type: "object";
|
|
2073
|
+
readonly additionalProperties: false;
|
|
2074
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
2075
|
+
readonly properties: {
|
|
2076
|
+
readonly electionId: {
|
|
2077
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
2078
|
+
};
|
|
2079
|
+
readonly community: {
|
|
2080
|
+
readonly type: "string";
|
|
2081
|
+
readonly minLength: 1;
|
|
2082
|
+
readonly maxLength: 2048;
|
|
2083
|
+
readonly description: "The community's DID.";
|
|
2084
|
+
};
|
|
2085
|
+
readonly title: {
|
|
2086
|
+
readonly type: "string";
|
|
2087
|
+
readonly maxLength: 512;
|
|
2088
|
+
};
|
|
2089
|
+
readonly description: {
|
|
2090
|
+
readonly type: "string";
|
|
2091
|
+
readonly maxLength: 8192;
|
|
2092
|
+
};
|
|
2093
|
+
readonly questions: {
|
|
2094
|
+
readonly type: "array";
|
|
2095
|
+
readonly minItems: 1;
|
|
2096
|
+
readonly maxItems: 128;
|
|
2097
|
+
readonly items: {
|
|
2098
|
+
readonly $ref: "#/$defs/Question";
|
|
2099
|
+
};
|
|
2100
|
+
};
|
|
2101
|
+
readonly secrecy: {
|
|
2102
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
2103
|
+
};
|
|
2104
|
+
readonly roll: {
|
|
2105
|
+
readonly $ref: "#/$defs/RollRule";
|
|
2106
|
+
};
|
|
2107
|
+
readonly registrationOpensAt: {
|
|
2108
|
+
readonly type: "string";
|
|
2109
|
+
readonly format: "date-time";
|
|
2110
|
+
};
|
|
2111
|
+
readonly votingOpensAt: {
|
|
2112
|
+
readonly type: "string";
|
|
2113
|
+
readonly format: "date-time";
|
|
2114
|
+
};
|
|
2115
|
+
readonly votingClosesAt: {
|
|
2116
|
+
readonly type: "string";
|
|
2117
|
+
readonly format: "date-time";
|
|
2118
|
+
};
|
|
2119
|
+
readonly revote: {
|
|
2120
|
+
readonly $ref: "#/$defs/Revote";
|
|
2121
|
+
};
|
|
2122
|
+
readonly board: {
|
|
2123
|
+
readonly type: "object";
|
|
2124
|
+
readonly additionalProperties: false;
|
|
2125
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
2126
|
+
readonly properties: {
|
|
2127
|
+
readonly visibility: {
|
|
2128
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
2129
|
+
};
|
|
2130
|
+
readonly auditors: {
|
|
2131
|
+
readonly type: "array";
|
|
2132
|
+
readonly items: {
|
|
2133
|
+
readonly type: "string";
|
|
2134
|
+
readonly minLength: 1;
|
|
2135
|
+
readonly maxLength: 2048;
|
|
2136
|
+
};
|
|
2137
|
+
readonly uniqueItems: true;
|
|
2138
|
+
};
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
readonly ballotBox: {
|
|
2142
|
+
readonly type: "string";
|
|
2143
|
+
readonly minLength: 1;
|
|
2144
|
+
readonly maxLength: 2048;
|
|
2145
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
2146
|
+
};
|
|
2147
|
+
readonly trustees: {
|
|
2148
|
+
readonly $ref: "#/$defs/Trustees";
|
|
2149
|
+
};
|
|
2150
|
+
readonly binding: {
|
|
2151
|
+
readonly type: "boolean";
|
|
2152
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
2153
|
+
};
|
|
2154
|
+
readonly allowEarlyClose: {
|
|
2155
|
+
readonly type: "boolean";
|
|
2156
|
+
};
|
|
2157
|
+
readonly resultsBeforeClose: {
|
|
2158
|
+
readonly type: "boolean";
|
|
2159
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
2160
|
+
};
|
|
2161
|
+
readonly textReleaseThreshold: {
|
|
2162
|
+
readonly type: "integer";
|
|
2163
|
+
readonly minimum: 1;
|
|
2164
|
+
readonly description: "Counted ballots required before any text answer is disclosed (VTI-VOT-065). At least 1, and SHOULD be at least 10: a written answer can identify its author by what it says or how it is phrased, and the fewer the ballots released together, the easier that is. Where it is below 10, the disclosure a member is shown before they request a ticket MUST say so, and MUST say that a written answer may identify its author (VTI-VOT-090).";
|
|
2165
|
+
};
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
2168
|
+
readonly RollRule: {
|
|
2169
|
+
readonly title: "RollRule";
|
|
2170
|
+
readonly description: "Who may be issued a ticket (VTI-VOT-021): the community's active members (`members`), its active members and the parties `listed` names (`membersAndListed`), only the parties `listed` names (`listed`), or the holders of a membership credential for the one DID `memberOf` names (`credential`), proven by presentation when the holder claims their ticket and never resolved when the election is created (VTI-VOT-025). `memberOf` is present exactly when `rule` is `credential`, and `listed` is never present with it.";
|
|
2171
|
+
readonly type: "object";
|
|
2172
|
+
readonly additionalProperties: false;
|
|
2173
|
+
readonly required: readonly ["rule"];
|
|
2174
|
+
readonly properties: {
|
|
2175
|
+
readonly rule: {
|
|
2176
|
+
readonly type: "string";
|
|
2177
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
2178
|
+
};
|
|
2179
|
+
readonly listed: {
|
|
2180
|
+
readonly type: "array";
|
|
2181
|
+
readonly items: {
|
|
2182
|
+
readonly type: "string";
|
|
2183
|
+
readonly minLength: 1;
|
|
2184
|
+
readonly maxLength: 2048;
|
|
2185
|
+
readonly description: "A DID enfranchised by name.";
|
|
2186
|
+
};
|
|
2187
|
+
readonly uniqueItems: true;
|
|
2188
|
+
};
|
|
2189
|
+
readonly memberOf: {
|
|
2190
|
+
readonly type: "string";
|
|
2191
|
+
readonly minLength: 8;
|
|
2192
|
+
readonly maxLength: 2048;
|
|
2193
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
2194
|
+
readonly description: "The DID whose membership credential admits its holder, under the `credential` rule: this community, one of its groups, or a party that is itself an active member of this community — holding a membership credential this community issued it — such as another community, a group of another community, or a network (VTI-VOT-026). Always a DID, never a group's local identifier or name. A community refuses to create an election naming any other DID (vtc/elections/create:rollUntrusted).";
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
readonly dependentSchemas: {
|
|
2198
|
+
readonly rule: {
|
|
2199
|
+
readonly anyOf: readonly [{
|
|
2200
|
+
readonly required: readonly ["memberOf"];
|
|
2201
|
+
}, {
|
|
2202
|
+
readonly properties: {
|
|
2203
|
+
readonly rule: {
|
|
2204
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
2205
|
+
};
|
|
2206
|
+
};
|
|
2207
|
+
}];
|
|
2208
|
+
};
|
|
2209
|
+
readonly memberOf: {
|
|
2210
|
+
readonly properties: {
|
|
2211
|
+
readonly rule: {
|
|
2212
|
+
readonly const: "credential";
|
|
2213
|
+
};
|
|
2214
|
+
};
|
|
2215
|
+
readonly not: {
|
|
2216
|
+
readonly required: readonly ["listed"];
|
|
2217
|
+
};
|
|
2218
|
+
};
|
|
2219
|
+
};
|
|
2220
|
+
};
|
|
2221
|
+
readonly SecrecyLevel: {
|
|
2222
|
+
readonly title: "SecrecyLevel";
|
|
2223
|
+
readonly description: "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).";
|
|
2224
|
+
readonly type: "string";
|
|
2225
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
2226
|
+
};
|
|
2227
|
+
readonly Question: {
|
|
2228
|
+
readonly title: "Question";
|
|
2229
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
2230
|
+
readonly oneOf: readonly [{
|
|
2231
|
+
readonly title: "ChoiceQuestion";
|
|
2232
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
2233
|
+
readonly type: "object";
|
|
2234
|
+
readonly additionalProperties: false;
|
|
2235
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
2236
|
+
readonly properties: {
|
|
2237
|
+
readonly key: {
|
|
2238
|
+
readonly $ref: "#/$defs/Key";
|
|
2239
|
+
};
|
|
2240
|
+
readonly type: {
|
|
2241
|
+
readonly const: "choice";
|
|
2242
|
+
};
|
|
2243
|
+
readonly text: {
|
|
2244
|
+
readonly type: "string";
|
|
2245
|
+
readonly maxLength: 2048;
|
|
2246
|
+
};
|
|
2247
|
+
readonly options: {
|
|
2248
|
+
readonly type: "array";
|
|
2249
|
+
readonly minItems: 2;
|
|
2250
|
+
readonly maxItems: 256;
|
|
2251
|
+
readonly items: {
|
|
2252
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
2253
|
+
};
|
|
2254
|
+
};
|
|
2255
|
+
readonly minSelections: {
|
|
2256
|
+
readonly type: "integer";
|
|
2257
|
+
readonly minimum: 0;
|
|
2258
|
+
};
|
|
2259
|
+
readonly maxSelections: {
|
|
2260
|
+
readonly type: "integer";
|
|
2261
|
+
readonly minimum: 1;
|
|
2262
|
+
};
|
|
2263
|
+
readonly optional: {
|
|
2264
|
+
readonly type: "boolean";
|
|
2265
|
+
};
|
|
2266
|
+
};
|
|
2267
|
+
}, {
|
|
2268
|
+
readonly title: "RankingQuestion";
|
|
2269
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
2270
|
+
readonly type: "object";
|
|
2271
|
+
readonly additionalProperties: false;
|
|
2272
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
2273
|
+
readonly properties: {
|
|
2274
|
+
readonly key: {
|
|
2275
|
+
readonly $ref: "#/$defs/Key";
|
|
2276
|
+
};
|
|
2277
|
+
readonly type: {
|
|
2278
|
+
readonly const: "ranking";
|
|
2279
|
+
};
|
|
2280
|
+
readonly text: {
|
|
2281
|
+
readonly type: "string";
|
|
2282
|
+
readonly maxLength: 2048;
|
|
2283
|
+
};
|
|
2284
|
+
readonly options: {
|
|
2285
|
+
readonly type: "array";
|
|
2286
|
+
readonly minItems: 2;
|
|
2287
|
+
readonly maxItems: 64;
|
|
2288
|
+
readonly items: {
|
|
2289
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
2290
|
+
};
|
|
2291
|
+
};
|
|
2292
|
+
readonly partial: {
|
|
2293
|
+
readonly type: "boolean";
|
|
2294
|
+
};
|
|
2295
|
+
readonly optional: {
|
|
2296
|
+
readonly type: "boolean";
|
|
2297
|
+
};
|
|
2298
|
+
};
|
|
2299
|
+
}, {
|
|
2300
|
+
readonly title: "ScoreQuestion";
|
|
2301
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
2302
|
+
readonly type: "object";
|
|
2303
|
+
readonly additionalProperties: false;
|
|
2304
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
2305
|
+
readonly properties: {
|
|
2306
|
+
readonly key: {
|
|
2307
|
+
readonly $ref: "#/$defs/Key";
|
|
2308
|
+
};
|
|
2309
|
+
readonly type: {
|
|
2310
|
+
readonly const: "score";
|
|
2311
|
+
};
|
|
2312
|
+
readonly text: {
|
|
2313
|
+
readonly type: "string";
|
|
2314
|
+
readonly maxLength: 2048;
|
|
2315
|
+
};
|
|
2316
|
+
readonly options: {
|
|
2317
|
+
readonly type: "array";
|
|
2318
|
+
readonly minItems: 1;
|
|
2319
|
+
readonly maxItems: 256;
|
|
2320
|
+
readonly items: {
|
|
2321
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
2322
|
+
};
|
|
2323
|
+
};
|
|
2324
|
+
readonly min: {
|
|
2325
|
+
readonly type: "integer";
|
|
2326
|
+
};
|
|
2327
|
+
readonly max: {
|
|
2328
|
+
readonly type: "integer";
|
|
2329
|
+
};
|
|
2330
|
+
readonly optional: {
|
|
2331
|
+
readonly type: "boolean";
|
|
2332
|
+
};
|
|
2333
|
+
};
|
|
2334
|
+
}, {
|
|
2335
|
+
readonly title: "TextQuestion";
|
|
2336
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
2337
|
+
readonly type: "object";
|
|
2338
|
+
readonly additionalProperties: false;
|
|
2339
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
2340
|
+
readonly properties: {
|
|
2341
|
+
readonly key: {
|
|
2342
|
+
readonly $ref: "#/$defs/Key";
|
|
2343
|
+
};
|
|
2344
|
+
readonly type: {
|
|
2345
|
+
readonly const: "text";
|
|
2346
|
+
};
|
|
2347
|
+
readonly text: {
|
|
2348
|
+
readonly type: "string";
|
|
2349
|
+
readonly maxLength: 2048;
|
|
2350
|
+
};
|
|
2351
|
+
readonly maxLength: {
|
|
2352
|
+
readonly type: "integer";
|
|
2353
|
+
readonly minimum: 1;
|
|
2354
|
+
readonly maximum: 4096;
|
|
2355
|
+
};
|
|
2356
|
+
readonly optional: {
|
|
2357
|
+
readonly type: "boolean";
|
|
2358
|
+
};
|
|
2359
|
+
};
|
|
2360
|
+
}];
|
|
2361
|
+
};
|
|
2362
|
+
readonly Key: {
|
|
2363
|
+
readonly title: "Key";
|
|
2364
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
2365
|
+
readonly type: "string";
|
|
2366
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
2367
|
+
};
|
|
2368
|
+
readonly QuestionOption: {
|
|
2369
|
+
readonly title: "QuestionOption";
|
|
2370
|
+
readonly type: "object";
|
|
2371
|
+
readonly additionalProperties: false;
|
|
2372
|
+
readonly required: readonly ["key"];
|
|
2373
|
+
readonly properties: {
|
|
2374
|
+
readonly key: {
|
|
2375
|
+
readonly $ref: "#/$defs/Key";
|
|
2376
|
+
};
|
|
2377
|
+
readonly label: {
|
|
2378
|
+
readonly type: "string";
|
|
2379
|
+
readonly maxLength: 512;
|
|
2380
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
2381
|
+
};
|
|
2382
|
+
};
|
|
2383
|
+
};
|
|
2384
|
+
readonly ElectionId: {
|
|
2385
|
+
readonly title: "ElectionId";
|
|
2386
|
+
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.";
|
|
2387
|
+
readonly type: "string";
|
|
2388
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
2389
|
+
};
|
|
2390
|
+
readonly ElectionResult: {
|
|
2391
|
+
readonly title: "ElectionResult";
|
|
2392
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
2393
|
+
readonly type: "object";
|
|
2394
|
+
readonly additionalProperties: false;
|
|
2395
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
2396
|
+
readonly properties: {
|
|
2397
|
+
readonly electionId: {
|
|
2398
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
2399
|
+
};
|
|
2400
|
+
readonly manifestDigest: {
|
|
2401
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
2402
|
+
};
|
|
2403
|
+
readonly ballotsCounted: {
|
|
2404
|
+
readonly type: "integer";
|
|
2405
|
+
readonly minimum: 0;
|
|
2406
|
+
};
|
|
2407
|
+
readonly questions: {
|
|
2408
|
+
readonly type: "array";
|
|
2409
|
+
readonly items: {
|
|
2410
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
2411
|
+
};
|
|
2412
|
+
};
|
|
2413
|
+
readonly head: {
|
|
2414
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
2415
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
2416
|
+
};
|
|
2417
|
+
};
|
|
2418
|
+
};
|
|
2419
|
+
readonly BoardHead: {
|
|
2420
|
+
readonly title: "BoardHead";
|
|
2421
|
+
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.";
|
|
2422
|
+
readonly type: "object";
|
|
2423
|
+
readonly additionalProperties: false;
|
|
2424
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
2425
|
+
readonly properties: {
|
|
2426
|
+
readonly electionId: {
|
|
2427
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
2428
|
+
};
|
|
2429
|
+
readonly treeSize: {
|
|
2430
|
+
readonly type: "integer";
|
|
2431
|
+
readonly minimum: 0;
|
|
2432
|
+
};
|
|
2433
|
+
readonly rootHash: {
|
|
2434
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
2435
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
2436
|
+
};
|
|
2437
|
+
readonly issuedAt: {
|
|
2438
|
+
readonly type: "string";
|
|
2439
|
+
readonly format: "date-time";
|
|
2440
|
+
};
|
|
2441
|
+
};
|
|
2442
|
+
};
|
|
2443
|
+
readonly QuestionResult: {
|
|
2444
|
+
readonly title: "QuestionResult";
|
|
2445
|
+
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.";
|
|
2446
|
+
readonly type: "object";
|
|
2447
|
+
readonly additionalProperties: false;
|
|
2448
|
+
readonly required: readonly ["question", "abstained"];
|
|
2449
|
+
readonly properties: {
|
|
2450
|
+
readonly question: {
|
|
2451
|
+
readonly $ref: "#/$defs/Key";
|
|
2452
|
+
};
|
|
2453
|
+
readonly abstained: {
|
|
2454
|
+
readonly type: "integer";
|
|
2455
|
+
readonly minimum: 0;
|
|
2456
|
+
};
|
|
2457
|
+
readonly choice: {
|
|
2458
|
+
readonly type: "object";
|
|
2459
|
+
readonly propertyNames: {
|
|
2460
|
+
readonly $ref: "#/$defs/Key";
|
|
2461
|
+
};
|
|
2462
|
+
readonly additionalProperties: {
|
|
2463
|
+
readonly type: "integer";
|
|
2464
|
+
readonly minimum: 0;
|
|
2465
|
+
};
|
|
2466
|
+
};
|
|
2467
|
+
readonly ranking: {
|
|
2468
|
+
readonly type: "object";
|
|
2469
|
+
readonly propertyNames: {
|
|
2470
|
+
readonly $ref: "#/$defs/Key";
|
|
2471
|
+
};
|
|
2472
|
+
readonly additionalProperties: {
|
|
2473
|
+
readonly type: "array";
|
|
2474
|
+
readonly items: {
|
|
2475
|
+
readonly type: "integer";
|
|
2476
|
+
readonly minimum: 0;
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
};
|
|
2480
|
+
readonly score: {
|
|
2481
|
+
readonly type: "object";
|
|
2482
|
+
readonly propertyNames: {
|
|
2483
|
+
readonly $ref: "#/$defs/Key";
|
|
2484
|
+
};
|
|
2485
|
+
readonly additionalProperties: {
|
|
2486
|
+
readonly type: "object";
|
|
2487
|
+
readonly additionalProperties: false;
|
|
2488
|
+
readonly required: readonly ["sum", "count"];
|
|
2489
|
+
readonly properties: {
|
|
2490
|
+
readonly sum: {
|
|
2491
|
+
readonly type: "integer";
|
|
2492
|
+
};
|
|
2493
|
+
readonly count: {
|
|
2494
|
+
readonly type: "integer";
|
|
2495
|
+
readonly minimum: 0;
|
|
2496
|
+
};
|
|
2497
|
+
};
|
|
2498
|
+
};
|
|
2499
|
+
};
|
|
2500
|
+
readonly text: {
|
|
2501
|
+
readonly type: "array";
|
|
2502
|
+
readonly items: {
|
|
2503
|
+
readonly type: "string";
|
|
2504
|
+
readonly maxLength: 4096;
|
|
2505
|
+
};
|
|
2506
|
+
};
|
|
2507
|
+
readonly withheld: {
|
|
2508
|
+
readonly type: "boolean";
|
|
2509
|
+
};
|
|
2510
|
+
};
|
|
2511
|
+
};
|
|
2512
|
+
};
|
|
2513
|
+
};
|
|
2514
|
+
};
|
|
2515
|
+
/**
|
|
2516
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
2517
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
2518
|
+
* parties (§7.3 item 5).
|
|
2519
|
+
*/
|
|
2520
|
+
export declare const RESPONSE_SPEC: {
|
|
2521
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/elections/show/0.6#response";
|
|
2522
|
+
readonly isBearer: false;
|
|
2523
|
+
readonly isProofRequired: false;
|
|
2524
|
+
readonly isRecipientRequired: true;
|
|
2525
|
+
readonly isIssuedAtRequired: false;
|
|
2526
|
+
readonly payloadSchema: {
|
|
2527
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2528
|
+
readonly $ref: "#/$defs/Response";
|
|
2529
|
+
readonly $defs: {
|
|
2530
|
+
readonly RegistrarState: {
|
|
2531
|
+
readonly title: "RegistrarState";
|
|
2532
|
+
readonly description: "An election's state as its registrar holds it: the ballot box's `ElectionState` once the ballot box has registered the election, or, before that, `pendingRegistration` (the community is still delivering the registration) or `registrationRefused` (the ballot box refused it on a later delivery, and only a cancellation clears it). The first six values are the ballot box's `ElectionState` (voting/_shared/0.1).";
|
|
2533
|
+
readonly type: "string";
|
|
2534
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled", "pendingRegistration", "registrationRefused"];
|
|
2535
|
+
};
|
|
2536
|
+
readonly Checkpoint: {
|
|
2537
|
+
readonly title: "Checkpoint";
|
|
2538
|
+
readonly description: "A board head the community read from the ballot box and kept, with the ballot box's signed document that carried it. Certification proves the board's final head consistent with every checkpoint, so a ballot box that rewrote its board after a checkpoint is caught.";
|
|
2539
|
+
readonly type: "object";
|
|
2540
|
+
readonly additionalProperties: false;
|
|
2541
|
+
readonly required: readonly ["head", "document"];
|
|
2542
|
+
readonly properties: {
|
|
2543
|
+
readonly head: {
|
|
2544
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
2545
|
+
};
|
|
2546
|
+
readonly document: {
|
|
2547
|
+
readonly type: "object";
|
|
2548
|
+
readonly description: "The ballot box's signed voting/board/head `#response` document whose payload carries `head`, kept whole and exactly as received — proof included — so anyone can verify it against the ballot box's DID without trusting the community.";
|
|
2549
|
+
};
|
|
2550
|
+
};
|
|
2551
|
+
};
|
|
2552
|
+
readonly Certification: {
|
|
2553
|
+
readonly title: "Certification";
|
|
2554
|
+
readonly description: "The community's certification of the election's result, as vtc/elections/certify recorded it.";
|
|
2555
|
+
readonly type: "object";
|
|
2556
|
+
readonly additionalProperties: false;
|
|
2557
|
+
readonly required: readonly ["result", "certifiedAt", "auditAttestations"];
|
|
2558
|
+
readonly properties: {
|
|
2559
|
+
readonly result: {
|
|
2560
|
+
readonly $ref: "#/$defs/ElectionResult";
|
|
2561
|
+
};
|
|
2562
|
+
readonly certifiedAt: {
|
|
2563
|
+
readonly type: "string";
|
|
2564
|
+
readonly format: "date-time";
|
|
2565
|
+
readonly maxLength: 64;
|
|
2566
|
+
};
|
|
2567
|
+
readonly auditAttestations: {
|
|
2568
|
+
readonly type: "array";
|
|
2569
|
+
readonly maxItems: 32;
|
|
2570
|
+
readonly items: {
|
|
2571
|
+
readonly type: "object";
|
|
2572
|
+
readonly description: "A verifiable credential from an auditor the manifest names, as received.";
|
|
2573
|
+
};
|
|
2574
|
+
};
|
|
2575
|
+
};
|
|
2576
|
+
};
|
|
2577
|
+
readonly Response: {
|
|
2578
|
+
readonly $anchor: "response";
|
|
2579
|
+
readonly title: "VTC Elections — Show — response payload";
|
|
2580
|
+
readonly description: "Success response to vtc/elections/show/0.6: one election, whole.";
|
|
2581
|
+
readonly type: "object";
|
|
2582
|
+
readonly additionalProperties: false;
|
|
2583
|
+
readonly required: readonly ["manifest", "manifestDigest", "state", "parameters", "disclosure", "checkpoints"];
|
|
2584
|
+
readonly properties: {
|
|
2585
|
+
readonly manifest: {
|
|
2586
|
+
readonly $ref: "#/$defs/Manifest";
|
|
2587
|
+
};
|
|
2588
|
+
readonly manifestDigest: {
|
|
2589
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
2590
|
+
readonly description: "The SHA-256 multihash of the RFC 8785 (JCS) canonicalization of `manifest`. A ticket request names it, and every cast is bound to it.";
|
|
2591
|
+
};
|
|
2592
|
+
readonly state: {
|
|
2593
|
+
readonly $ref: "#/$defs/RegistrarState";
|
|
2594
|
+
};
|
|
2595
|
+
readonly parameters: {
|
|
2596
|
+
readonly $ref: "#/$defs/VotingParameters";
|
|
2597
|
+
readonly description: "The community's voting parameters the election's tickets are issued under (VTI-VOT-020).";
|
|
2598
|
+
};
|
|
2599
|
+
readonly disclosure: {
|
|
2600
|
+
readonly $ref: "#/$defs/Disclosure";
|
|
2601
|
+
readonly description: "How the election is run, generated from the manifest and the community's configuration (VTI-VOT-090). Always present: a member reads it before requesting a ticket.";
|
|
2602
|
+
};
|
|
2603
|
+
readonly checkpoints: {
|
|
2604
|
+
readonly type: "array";
|
|
2605
|
+
readonly maxItems: 256;
|
|
2606
|
+
readonly items: {
|
|
2607
|
+
readonly $ref: "#/$defs/Checkpoint";
|
|
2608
|
+
};
|
|
2609
|
+
readonly description: "The board heads the community has kept, oldest first. Empty until the community has read a head.";
|
|
2610
|
+
};
|
|
2611
|
+
readonly ticketsIssued: {
|
|
2612
|
+
readonly type: "integer";
|
|
2613
|
+
readonly minimum: 0;
|
|
2614
|
+
readonly description: "How many tickets the community has issued for the election. Present only to a caller holding vtc.elections.manage.";
|
|
2615
|
+
};
|
|
2616
|
+
readonly electionKey: {
|
|
2617
|
+
readonly $ref: "#/$defs/ElectionKey";
|
|
2618
|
+
readonly description: "The key a sealed or tallied-encrypted election's ballots are encrypted under, once its trustees have formed it (CONVENTIONS §9.6).";
|
|
2619
|
+
};
|
|
2620
|
+
readonly certified: {
|
|
2621
|
+
readonly $ref: "#/$defs/Certification";
|
|
2622
|
+
readonly description: "Present once the community has certified the result.";
|
|
2623
|
+
};
|
|
2624
|
+
readonly ext: {
|
|
2625
|
+
readonly $ref: "#/$defs/Ext";
|
|
2626
|
+
};
|
|
2627
|
+
readonly ceremony: {
|
|
2628
|
+
readonly $ref: "#/$defs/TrusteeCeremony";
|
|
2629
|
+
readonly description: "With electionKey: the trustees' signed steps it forms from, through the board's electionKey entry, each exactly as received. A voter's VTA forms the key itself from these (vta/pcs/vote-encrypted/0.5).";
|
|
2630
|
+
};
|
|
2631
|
+
};
|
|
2632
|
+
};
|
|
2633
|
+
readonly TrusteeCeremony: {
|
|
2634
|
+
readonly title: "TrusteeCeremony";
|
|
2635
|
+
readonly description: "The trustees' ceremony as the board holds it: the `request` of every `trusteeStep` entry, in board order, each exactly as the ballot box received it (CONVENTIONS §9.6). Whoever acts on it verifies each step as its trustee's before taking it; nothing in it is believed for having been passed along.";
|
|
2636
|
+
readonly type: "array";
|
|
2637
|
+
readonly minItems: 1;
|
|
2638
|
+
readonly maxItems: 4224;
|
|
2639
|
+
readonly items: {
|
|
2640
|
+
readonly $ref: "#/$defs/SignedRequest";
|
|
2641
|
+
};
|
|
2642
|
+
};
|
|
2643
|
+
readonly SignedRequest: {
|
|
2644
|
+
readonly title: "SignedRequest";
|
|
2645
|
+
readonly description: "A whole Trust Task request document — `id`, `type`, `issuer`, `payload` and every other member, `proof` included — exactly as the ballot box received it, never re-serialised: its proof is taken over its members, and a re-serialised copy does not reliably reproduce them. Typed as an open object so every member survives; CONVENTIONS §9.6 gives the checks that make it a trustee's step.";
|
|
2646
|
+
readonly type: "object";
|
|
2647
|
+
readonly minProperties: 1;
|
|
2648
|
+
};
|
|
2649
|
+
readonly Ext: {
|
|
2650
|
+
readonly title: "Ext";
|
|
2651
|
+
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.";
|
|
2652
|
+
readonly type: "object";
|
|
2653
|
+
readonly minProperties: 1;
|
|
2654
|
+
readonly additionalProperties: true;
|
|
2655
|
+
readonly propertyNames: {
|
|
2656
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
2657
|
+
};
|
|
2658
|
+
};
|
|
2659
|
+
readonly ElectionKey: {
|
|
2660
|
+
readonly title: "ElectionKey";
|
|
2661
|
+
readonly description: "The election key and each trustee's public verification key, computed from the qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.";
|
|
2662
|
+
readonly type: "object";
|
|
2663
|
+
readonly additionalProperties: false;
|
|
2664
|
+
readonly required: readonly ["key", "qualified", "verification"];
|
|
2665
|
+
readonly properties: {
|
|
2666
|
+
readonly key: {
|
|
2667
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
2668
|
+
};
|
|
2669
|
+
readonly qualified: {
|
|
2670
|
+
readonly type: "array";
|
|
2671
|
+
readonly minItems: 1;
|
|
2672
|
+
readonly maxItems: 64;
|
|
2673
|
+
readonly items: {
|
|
2674
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
2675
|
+
};
|
|
2676
|
+
readonly description: "The dealers whose dealings the key is formed from.";
|
|
2677
|
+
};
|
|
2678
|
+
readonly verification: {
|
|
2679
|
+
readonly type: "array";
|
|
2680
|
+
readonly minItems: 2;
|
|
2681
|
+
readonly maxItems: 64;
|
|
2682
|
+
readonly items: {
|
|
2683
|
+
readonly type: "object";
|
|
2684
|
+
readonly additionalProperties: false;
|
|
2685
|
+
readonly required: readonly ["trustee", "key"];
|
|
2686
|
+
readonly properties: {
|
|
2687
|
+
readonly trustee: {
|
|
2688
|
+
readonly $ref: "#/$defs/TrusteeIndex";
|
|
2689
|
+
};
|
|
2690
|
+
readonly key: {
|
|
2691
|
+
readonly $ref: "#/$defs/GroupElement";
|
|
2692
|
+
};
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2696
|
+
};
|
|
2697
|
+
};
|
|
2698
|
+
readonly GroupElement: {
|
|
2699
|
+
readonly title: "GroupElement";
|
|
2700
|
+
readonly description: "A Ristretto group element: its 32-byte compression, multibase base58btc. Never the identity (CONVENTIONS §9.1).";
|
|
2701
|
+
readonly type: "string";
|
|
2702
|
+
readonly minLength: 2;
|
|
2703
|
+
readonly maxLength: 64;
|
|
2704
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
2705
|
+
};
|
|
2706
|
+
readonly TrusteeIndex: {
|
|
2707
|
+
readonly title: "TrusteeIndex";
|
|
2708
|
+
readonly description: "A trustee's index: its position in the manifest's `trustees.dids`, counting from 1.";
|
|
2709
|
+
readonly type: "integer";
|
|
2710
|
+
readonly minimum: 1;
|
|
2711
|
+
readonly maximum: 64;
|
|
2712
|
+
};
|
|
2713
|
+
readonly Disclosure: {
|
|
2714
|
+
readonly title: "Disclosure";
|
|
2715
|
+
readonly description: "The statement a community publishes, and shows a member before they request a ticket, about how one election is run (VTI-VOT-090). Generated from the election's manifest and the community's configuration, never written by hand. Under a `credential` roll it also says whose membership credential counts (`rollCredential`).";
|
|
2716
|
+
readonly type: "object";
|
|
2717
|
+
readonly additionalProperties: false;
|
|
2718
|
+
readonly required: readonly ["ballotBox", "ballotBoxOperator", "sameOperator", "boardVisibility", "auditors", "revote", "coercionResistance"];
|
|
2719
|
+
readonly properties: {
|
|
2720
|
+
readonly ballotBox: {
|
|
2721
|
+
readonly type: "string";
|
|
2722
|
+
readonly minLength: 1;
|
|
2723
|
+
readonly maxLength: 2048;
|
|
2724
|
+
readonly description: "The ballot box's DID.";
|
|
2725
|
+
};
|
|
2726
|
+
readonly ballotBoxOperator: {
|
|
2727
|
+
readonly type: "string";
|
|
2728
|
+
readonly minLength: 1;
|
|
2729
|
+
readonly maxLength: 512;
|
|
2730
|
+
readonly description: "Who operates the ballot box, as the community names them.";
|
|
2731
|
+
};
|
|
2732
|
+
readonly sameOperator: {
|
|
2733
|
+
readonly type: "boolean";
|
|
2734
|
+
readonly description: "Whether the party operating the community's VTC also operates the ballot box.";
|
|
2735
|
+
};
|
|
2736
|
+
readonly trustees: {
|
|
2737
|
+
readonly $ref: "#/$defs/Trustees";
|
|
2738
|
+
};
|
|
2739
|
+
readonly boardVisibility: {
|
|
2740
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
2741
|
+
};
|
|
2742
|
+
readonly auditors: {
|
|
2743
|
+
readonly type: "array";
|
|
2744
|
+
readonly items: {
|
|
2745
|
+
readonly type: "string";
|
|
2746
|
+
readonly minLength: 1;
|
|
2747
|
+
readonly maxLength: 2048;
|
|
2748
|
+
};
|
|
2749
|
+
readonly uniqueItems: true;
|
|
2750
|
+
};
|
|
2751
|
+
readonly revote: {
|
|
2752
|
+
readonly $ref: "#/$defs/Revote";
|
|
2753
|
+
};
|
|
2754
|
+
readonly rollCredential: {
|
|
2755
|
+
readonly $ref: "#/$defs/RollCredentialDisclosure";
|
|
2756
|
+
};
|
|
2757
|
+
readonly coercionResistance: {
|
|
2758
|
+
readonly const: false;
|
|
2759
|
+
readonly description: "Always false: a voter can prove how they voted, so the community cannot protect a member against being made to vote a certain way.";
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
};
|
|
2763
|
+
readonly RollCredentialDisclosure: {
|
|
2764
|
+
readonly title: "RollCredentialDisclosure";
|
|
2765
|
+
readonly description: "Under a `credential` roll, whose membership credential admits a party to a ticket, as a member is shown it before they claim one (VTI-VOT-090): the DID the roll names, what kind of party it is to this community, and its name as the community knows it. Present in a disclosure exactly when the election's roll rule is `credential`.";
|
|
2766
|
+
readonly type: "object";
|
|
2767
|
+
readonly additionalProperties: false;
|
|
2768
|
+
readonly required: readonly ["memberOf", "memberOfKind"];
|
|
2769
|
+
readonly properties: {
|
|
2770
|
+
readonly memberOf: {
|
|
2771
|
+
readonly type: "string";
|
|
2772
|
+
readonly minLength: 8;
|
|
2773
|
+
readonly maxLength: 2048;
|
|
2774
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
2775
|
+
readonly description: "The manifest's `roll.memberOf`.";
|
|
2776
|
+
};
|
|
2777
|
+
readonly memberOfKind: {
|
|
2778
|
+
readonly type: "string";
|
|
2779
|
+
readonly enum: readonly ["thisCommunity", "communityGroup", "memberParty"];
|
|
2780
|
+
readonly description: "`thisCommunity`: the community itself. `communityGroup`: one of the community's own groups, whose membership credentials it authorizes the group to issue (VTI-DIR-083). `memberParty`: a party outside the community that is itself an active member of it — another community, a group of another community, or a network — whose own membership credentials admit their holders (VTI-VOT-026).";
|
|
2781
|
+
};
|
|
2782
|
+
readonly memberOfName: {
|
|
2783
|
+
readonly type: "string";
|
|
2784
|
+
readonly minLength: 1;
|
|
2785
|
+
readonly maxLength: 512;
|
|
2786
|
+
readonly description: "The name the community shows for the party `memberOf` names: the group's name, or the member party's name as the community's records hold it. Absent where showing it would disclose more than the group's visibility admits (VTI-DIR-070).";
|
|
2787
|
+
};
|
|
2788
|
+
readonly presenterDisclosed: {
|
|
2789
|
+
readonly const: true;
|
|
2790
|
+
readonly description: "Always true: claiming a ticket shows the community the presenter's membership credential for `memberOf`, so the community learns that the presenter is a member of that party.";
|
|
2791
|
+
};
|
|
2792
|
+
};
|
|
2793
|
+
};
|
|
2794
|
+
readonly Revote: {
|
|
2795
|
+
readonly title: "Revote";
|
|
2796
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
2797
|
+
readonly type: "string";
|
|
2798
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
2799
|
+
};
|
|
2800
|
+
readonly BoardVisibility: {
|
|
2801
|
+
readonly title: "BoardVisibility";
|
|
2802
|
+
readonly description: "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).";
|
|
2803
|
+
readonly type: "string";
|
|
2804
|
+
readonly enum: readonly ["public", "private"];
|
|
2805
|
+
};
|
|
2806
|
+
readonly Trustees: {
|
|
2807
|
+
readonly title: "Trustees";
|
|
2808
|
+
readonly description: "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.";
|
|
2809
|
+
readonly type: "object";
|
|
2810
|
+
readonly additionalProperties: false;
|
|
2811
|
+
readonly required: readonly ["dids", "threshold"];
|
|
2812
|
+
readonly properties: {
|
|
2813
|
+
readonly dids: {
|
|
2814
|
+
readonly type: "array";
|
|
2815
|
+
readonly minItems: 2;
|
|
2816
|
+
readonly items: {
|
|
2817
|
+
readonly type: "string";
|
|
2818
|
+
readonly minLength: 1;
|
|
2819
|
+
readonly maxLength: 2048;
|
|
2820
|
+
};
|
|
2821
|
+
readonly uniqueItems: true;
|
|
2822
|
+
};
|
|
2823
|
+
readonly threshold: {
|
|
2824
|
+
readonly type: "integer";
|
|
2825
|
+
readonly minimum: 2;
|
|
2826
|
+
};
|
|
2827
|
+
};
|
|
2828
|
+
};
|
|
2829
|
+
readonly VotingParameters: {
|
|
2830
|
+
readonly title: "VotingParameters";
|
|
2831
|
+
readonly description: "The community's published voting parameters: the PCS suite and the voting verification key tickets are issued under (VTI-VOT-020). Distinct from its hidden-vetting helper key.";
|
|
2832
|
+
readonly type: "object";
|
|
2833
|
+
readonly additionalProperties: false;
|
|
2834
|
+
readonly required: readonly ["suite", "votingKey"];
|
|
2835
|
+
readonly properties: {
|
|
2836
|
+
readonly suite: {
|
|
2837
|
+
readonly type: "string";
|
|
2838
|
+
readonly const: "ps-ddh-bls12381";
|
|
2839
|
+
};
|
|
2840
|
+
readonly votingKey: {
|
|
2841
|
+
readonly $ref: "#/$defs/Multibase";
|
|
2842
|
+
};
|
|
2843
|
+
};
|
|
2844
|
+
};
|
|
2845
|
+
readonly Multibase: {
|
|
2846
|
+
readonly title: "Multibase";
|
|
2847
|
+
readonly description: "A binary value, multibase base58btc over the suite's canonical (compressed) encoding.";
|
|
2848
|
+
readonly type: "string";
|
|
2849
|
+
readonly maxLength: 16384;
|
|
2850
|
+
readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
|
|
2851
|
+
};
|
|
2852
|
+
readonly DigestMultibase: {
|
|
2853
|
+
readonly title: "DigestMultibase";
|
|
2854
|
+
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`.";
|
|
2855
|
+
readonly type: "string";
|
|
2856
|
+
readonly minLength: 16;
|
|
2857
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
2858
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
2859
|
+
};
|
|
2860
|
+
readonly Manifest: {
|
|
2861
|
+
readonly title: "Manifest";
|
|
2862
|
+
readonly description: "What an election asks and how it is decided (VTI-VOT-010). Its digest (`manifestDigest`) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, and every cast is bound to it (VTI-VOT-011).";
|
|
2863
|
+
readonly type: "object";
|
|
2864
|
+
readonly additionalProperties: false;
|
|
2865
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
2866
|
+
readonly properties: {
|
|
2867
|
+
readonly electionId: {
|
|
2868
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
2869
|
+
};
|
|
2870
|
+
readonly community: {
|
|
2871
|
+
readonly type: "string";
|
|
2872
|
+
readonly minLength: 1;
|
|
2873
|
+
readonly maxLength: 2048;
|
|
2874
|
+
readonly description: "The community's DID.";
|
|
2875
|
+
};
|
|
2876
|
+
readonly title: {
|
|
2877
|
+
readonly type: "string";
|
|
2878
|
+
readonly maxLength: 512;
|
|
2879
|
+
};
|
|
2880
|
+
readonly description: {
|
|
2881
|
+
readonly type: "string";
|
|
2882
|
+
readonly maxLength: 8192;
|
|
2883
|
+
};
|
|
2884
|
+
readonly questions: {
|
|
2885
|
+
readonly type: "array";
|
|
2886
|
+
readonly minItems: 1;
|
|
2887
|
+
readonly maxItems: 128;
|
|
2888
|
+
readonly items: {
|
|
2889
|
+
readonly $ref: "#/$defs/Question";
|
|
2890
|
+
};
|
|
2891
|
+
};
|
|
2892
|
+
readonly secrecy: {
|
|
2893
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
2894
|
+
};
|
|
2895
|
+
readonly roll: {
|
|
2896
|
+
readonly $ref: "#/$defs/RollRule";
|
|
2897
|
+
};
|
|
2898
|
+
readonly registrationOpensAt: {
|
|
2899
|
+
readonly type: "string";
|
|
2900
|
+
readonly format: "date-time";
|
|
2901
|
+
};
|
|
2902
|
+
readonly votingOpensAt: {
|
|
2903
|
+
readonly type: "string";
|
|
2904
|
+
readonly format: "date-time";
|
|
2905
|
+
};
|
|
2906
|
+
readonly votingClosesAt: {
|
|
2907
|
+
readonly type: "string";
|
|
2908
|
+
readonly format: "date-time";
|
|
2909
|
+
};
|
|
2910
|
+
readonly revote: {
|
|
2911
|
+
readonly $ref: "#/$defs/Revote";
|
|
2912
|
+
};
|
|
2913
|
+
readonly board: {
|
|
2914
|
+
readonly type: "object";
|
|
2915
|
+
readonly additionalProperties: false;
|
|
2916
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
2917
|
+
readonly properties: {
|
|
2918
|
+
readonly visibility: {
|
|
2919
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
2920
|
+
};
|
|
2921
|
+
readonly auditors: {
|
|
2922
|
+
readonly type: "array";
|
|
2923
|
+
readonly items: {
|
|
2924
|
+
readonly type: "string";
|
|
2925
|
+
readonly minLength: 1;
|
|
2926
|
+
readonly maxLength: 2048;
|
|
2927
|
+
};
|
|
2928
|
+
readonly uniqueItems: true;
|
|
2929
|
+
};
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
readonly ballotBox: {
|
|
2933
|
+
readonly type: "string";
|
|
2934
|
+
readonly minLength: 1;
|
|
2935
|
+
readonly maxLength: 2048;
|
|
2936
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
2937
|
+
};
|
|
2938
|
+
readonly trustees: {
|
|
2939
|
+
readonly $ref: "#/$defs/Trustees";
|
|
2940
|
+
};
|
|
2941
|
+
readonly binding: {
|
|
2942
|
+
readonly type: "boolean";
|
|
2943
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
2944
|
+
};
|
|
2945
|
+
readonly allowEarlyClose: {
|
|
2946
|
+
readonly type: "boolean";
|
|
2947
|
+
};
|
|
2948
|
+
readonly resultsBeforeClose: {
|
|
2949
|
+
readonly type: "boolean";
|
|
2950
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
2951
|
+
};
|
|
2952
|
+
readonly textReleaseThreshold: {
|
|
2953
|
+
readonly type: "integer";
|
|
2954
|
+
readonly minimum: 1;
|
|
2955
|
+
readonly description: "Counted ballots required before any text answer is disclosed (VTI-VOT-065). At least 1, and SHOULD be at least 10: a written answer can identify its author by what it says or how it is phrased, and the fewer the ballots released together, the easier that is. Where it is below 10, the disclosure a member is shown before they request a ticket MUST say so, and MUST say that a written answer may identify its author (VTI-VOT-090).";
|
|
2956
|
+
};
|
|
2957
|
+
};
|
|
2958
|
+
};
|
|
2959
|
+
readonly RollRule: {
|
|
2960
|
+
readonly title: "RollRule";
|
|
2961
|
+
readonly description: "Who may be issued a ticket (VTI-VOT-021): the community's active members (`members`), its active members and the parties `listed` names (`membersAndListed`), only the parties `listed` names (`listed`), or the holders of a membership credential for the one DID `memberOf` names (`credential`), proven by presentation when the holder claims their ticket and never resolved when the election is created (VTI-VOT-025). `memberOf` is present exactly when `rule` is `credential`, and `listed` is never present with it.";
|
|
2962
|
+
readonly type: "object";
|
|
2963
|
+
readonly additionalProperties: false;
|
|
2964
|
+
readonly required: readonly ["rule"];
|
|
2965
|
+
readonly properties: {
|
|
2966
|
+
readonly rule: {
|
|
2967
|
+
readonly type: "string";
|
|
2968
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
2969
|
+
};
|
|
2970
|
+
readonly listed: {
|
|
2971
|
+
readonly type: "array";
|
|
2972
|
+
readonly items: {
|
|
2973
|
+
readonly type: "string";
|
|
2974
|
+
readonly minLength: 1;
|
|
2975
|
+
readonly maxLength: 2048;
|
|
2976
|
+
readonly description: "A DID enfranchised by name.";
|
|
2977
|
+
};
|
|
2978
|
+
readonly uniqueItems: true;
|
|
2979
|
+
};
|
|
2980
|
+
readonly memberOf: {
|
|
2981
|
+
readonly type: "string";
|
|
2982
|
+
readonly minLength: 8;
|
|
2983
|
+
readonly maxLength: 2048;
|
|
2984
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
2985
|
+
readonly description: "The DID whose membership credential admits its holder, under the `credential` rule: this community, one of its groups, or a party that is itself an active member of this community — holding a membership credential this community issued it — such as another community, a group of another community, or a network (VTI-VOT-026). Always a DID, never a group's local identifier or name. A community refuses to create an election naming any other DID (vtc/elections/create:rollUntrusted).";
|
|
2986
|
+
};
|
|
2987
|
+
};
|
|
2988
|
+
readonly dependentSchemas: {
|
|
2989
|
+
readonly rule: {
|
|
2990
|
+
readonly anyOf: readonly [{
|
|
2991
|
+
readonly required: readonly ["memberOf"];
|
|
2992
|
+
}, {
|
|
2993
|
+
readonly properties: {
|
|
2994
|
+
readonly rule: {
|
|
2995
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
2996
|
+
};
|
|
2997
|
+
};
|
|
2998
|
+
}];
|
|
2999
|
+
};
|
|
3000
|
+
readonly memberOf: {
|
|
3001
|
+
readonly properties: {
|
|
3002
|
+
readonly rule: {
|
|
3003
|
+
readonly const: "credential";
|
|
3004
|
+
};
|
|
3005
|
+
};
|
|
3006
|
+
readonly not: {
|
|
3007
|
+
readonly required: readonly ["listed"];
|
|
3008
|
+
};
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
3011
|
+
};
|
|
3012
|
+
readonly SecrecyLevel: {
|
|
3013
|
+
readonly title: "SecrecyLevel";
|
|
3014
|
+
readonly description: "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).";
|
|
3015
|
+
readonly type: "string";
|
|
3016
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
3017
|
+
};
|
|
3018
|
+
readonly Question: {
|
|
3019
|
+
readonly title: "Question";
|
|
3020
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
3021
|
+
readonly oneOf: readonly [{
|
|
3022
|
+
readonly title: "ChoiceQuestion";
|
|
3023
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
3024
|
+
readonly type: "object";
|
|
3025
|
+
readonly additionalProperties: false;
|
|
3026
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
3027
|
+
readonly properties: {
|
|
3028
|
+
readonly key: {
|
|
3029
|
+
readonly $ref: "#/$defs/Key";
|
|
3030
|
+
};
|
|
3031
|
+
readonly type: {
|
|
3032
|
+
readonly const: "choice";
|
|
3033
|
+
};
|
|
3034
|
+
readonly text: {
|
|
3035
|
+
readonly type: "string";
|
|
3036
|
+
readonly maxLength: 2048;
|
|
3037
|
+
};
|
|
3038
|
+
readonly options: {
|
|
3039
|
+
readonly type: "array";
|
|
3040
|
+
readonly minItems: 2;
|
|
3041
|
+
readonly maxItems: 256;
|
|
3042
|
+
readonly items: {
|
|
3043
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
3044
|
+
};
|
|
3045
|
+
};
|
|
3046
|
+
readonly minSelections: {
|
|
3047
|
+
readonly type: "integer";
|
|
3048
|
+
readonly minimum: 0;
|
|
3049
|
+
};
|
|
3050
|
+
readonly maxSelections: {
|
|
3051
|
+
readonly type: "integer";
|
|
3052
|
+
readonly minimum: 1;
|
|
3053
|
+
};
|
|
3054
|
+
readonly optional: {
|
|
3055
|
+
readonly type: "boolean";
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
}, {
|
|
3059
|
+
readonly title: "RankingQuestion";
|
|
3060
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
3061
|
+
readonly type: "object";
|
|
3062
|
+
readonly additionalProperties: false;
|
|
3063
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
3064
|
+
readonly properties: {
|
|
3065
|
+
readonly key: {
|
|
3066
|
+
readonly $ref: "#/$defs/Key";
|
|
3067
|
+
};
|
|
3068
|
+
readonly type: {
|
|
3069
|
+
readonly const: "ranking";
|
|
3070
|
+
};
|
|
3071
|
+
readonly text: {
|
|
3072
|
+
readonly type: "string";
|
|
3073
|
+
readonly maxLength: 2048;
|
|
3074
|
+
};
|
|
3075
|
+
readonly options: {
|
|
3076
|
+
readonly type: "array";
|
|
3077
|
+
readonly minItems: 2;
|
|
3078
|
+
readonly maxItems: 64;
|
|
3079
|
+
readonly items: {
|
|
3080
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
3081
|
+
};
|
|
3082
|
+
};
|
|
3083
|
+
readonly partial: {
|
|
3084
|
+
readonly type: "boolean";
|
|
3085
|
+
};
|
|
3086
|
+
readonly optional: {
|
|
3087
|
+
readonly type: "boolean";
|
|
3088
|
+
};
|
|
3089
|
+
};
|
|
3090
|
+
}, {
|
|
3091
|
+
readonly title: "ScoreQuestion";
|
|
3092
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
3093
|
+
readonly type: "object";
|
|
3094
|
+
readonly additionalProperties: false;
|
|
3095
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
3096
|
+
readonly properties: {
|
|
3097
|
+
readonly key: {
|
|
3098
|
+
readonly $ref: "#/$defs/Key";
|
|
3099
|
+
};
|
|
3100
|
+
readonly type: {
|
|
3101
|
+
readonly const: "score";
|
|
3102
|
+
};
|
|
3103
|
+
readonly text: {
|
|
3104
|
+
readonly type: "string";
|
|
3105
|
+
readonly maxLength: 2048;
|
|
3106
|
+
};
|
|
3107
|
+
readonly options: {
|
|
3108
|
+
readonly type: "array";
|
|
3109
|
+
readonly minItems: 1;
|
|
3110
|
+
readonly maxItems: 256;
|
|
3111
|
+
readonly items: {
|
|
3112
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
3113
|
+
};
|
|
3114
|
+
};
|
|
3115
|
+
readonly min: {
|
|
3116
|
+
readonly type: "integer";
|
|
3117
|
+
};
|
|
3118
|
+
readonly max: {
|
|
3119
|
+
readonly type: "integer";
|
|
3120
|
+
};
|
|
3121
|
+
readonly optional: {
|
|
3122
|
+
readonly type: "boolean";
|
|
3123
|
+
};
|
|
3124
|
+
};
|
|
3125
|
+
}, {
|
|
3126
|
+
readonly title: "TextQuestion";
|
|
3127
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
3128
|
+
readonly type: "object";
|
|
3129
|
+
readonly additionalProperties: false;
|
|
3130
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
3131
|
+
readonly properties: {
|
|
3132
|
+
readonly key: {
|
|
3133
|
+
readonly $ref: "#/$defs/Key";
|
|
3134
|
+
};
|
|
3135
|
+
readonly type: {
|
|
3136
|
+
readonly const: "text";
|
|
3137
|
+
};
|
|
3138
|
+
readonly text: {
|
|
3139
|
+
readonly type: "string";
|
|
3140
|
+
readonly maxLength: 2048;
|
|
3141
|
+
};
|
|
3142
|
+
readonly maxLength: {
|
|
3143
|
+
readonly type: "integer";
|
|
3144
|
+
readonly minimum: 1;
|
|
3145
|
+
readonly maximum: 4096;
|
|
3146
|
+
};
|
|
3147
|
+
readonly optional: {
|
|
3148
|
+
readonly type: "boolean";
|
|
3149
|
+
};
|
|
3150
|
+
};
|
|
3151
|
+
}];
|
|
3152
|
+
};
|
|
3153
|
+
readonly Key: {
|
|
3154
|
+
readonly title: "Key";
|
|
3155
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
3156
|
+
readonly type: "string";
|
|
3157
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
3158
|
+
};
|
|
3159
|
+
readonly QuestionOption: {
|
|
3160
|
+
readonly title: "QuestionOption";
|
|
3161
|
+
readonly type: "object";
|
|
3162
|
+
readonly additionalProperties: false;
|
|
3163
|
+
readonly required: readonly ["key"];
|
|
3164
|
+
readonly properties: {
|
|
3165
|
+
readonly key: {
|
|
3166
|
+
readonly $ref: "#/$defs/Key";
|
|
3167
|
+
};
|
|
3168
|
+
readonly label: {
|
|
3169
|
+
readonly type: "string";
|
|
3170
|
+
readonly maxLength: 512;
|
|
3171
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
3172
|
+
};
|
|
3173
|
+
};
|
|
3174
|
+
};
|
|
3175
|
+
readonly ElectionId: {
|
|
3176
|
+
readonly title: "ElectionId";
|
|
3177
|
+
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.";
|
|
3178
|
+
readonly type: "string";
|
|
3179
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
3180
|
+
};
|
|
3181
|
+
readonly ElectionResult: {
|
|
3182
|
+
readonly title: "ElectionResult";
|
|
3183
|
+
readonly description: "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).";
|
|
3184
|
+
readonly type: "object";
|
|
3185
|
+
readonly additionalProperties: false;
|
|
3186
|
+
readonly required: readonly ["electionId", "manifestDigest", "ballotsCounted", "questions", "head"];
|
|
3187
|
+
readonly properties: {
|
|
3188
|
+
readonly electionId: {
|
|
3189
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
3190
|
+
};
|
|
3191
|
+
readonly manifestDigest: {
|
|
3192
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
3193
|
+
};
|
|
3194
|
+
readonly ballotsCounted: {
|
|
3195
|
+
readonly type: "integer";
|
|
3196
|
+
readonly minimum: 0;
|
|
3197
|
+
};
|
|
3198
|
+
readonly questions: {
|
|
3199
|
+
readonly type: "array";
|
|
3200
|
+
readonly items: {
|
|
3201
|
+
readonly $ref: "#/$defs/QuestionResult";
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
readonly head: {
|
|
3205
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
3206
|
+
readonly description: "The head of the board as it stood at close: the result counts exactly its entries.";
|
|
3207
|
+
};
|
|
3208
|
+
};
|
|
3209
|
+
};
|
|
3210
|
+
readonly BoardHead: {
|
|
3211
|
+
readonly title: "BoardHead";
|
|
3212
|
+
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.";
|
|
3213
|
+
readonly type: "object";
|
|
3214
|
+
readonly additionalProperties: false;
|
|
3215
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
3216
|
+
readonly properties: {
|
|
3217
|
+
readonly electionId: {
|
|
3218
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
3219
|
+
};
|
|
3220
|
+
readonly treeSize: {
|
|
3221
|
+
readonly type: "integer";
|
|
3222
|
+
readonly minimum: 0;
|
|
3223
|
+
};
|
|
3224
|
+
readonly rootHash: {
|
|
3225
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
3226
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
3227
|
+
};
|
|
3228
|
+
readonly issuedAt: {
|
|
3229
|
+
readonly type: "string";
|
|
3230
|
+
readonly format: "date-time";
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
3233
|
+
};
|
|
3234
|
+
readonly QuestionResult: {
|
|
3235
|
+
readonly title: "QuestionResult";
|
|
3236
|
+
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.";
|
|
3237
|
+
readonly type: "object";
|
|
3238
|
+
readonly additionalProperties: false;
|
|
3239
|
+
readonly required: readonly ["question", "abstained"];
|
|
3240
|
+
readonly properties: {
|
|
3241
|
+
readonly question: {
|
|
3242
|
+
readonly $ref: "#/$defs/Key";
|
|
3243
|
+
};
|
|
3244
|
+
readonly abstained: {
|
|
3245
|
+
readonly type: "integer";
|
|
3246
|
+
readonly minimum: 0;
|
|
3247
|
+
};
|
|
3248
|
+
readonly choice: {
|
|
3249
|
+
readonly type: "object";
|
|
3250
|
+
readonly propertyNames: {
|
|
3251
|
+
readonly $ref: "#/$defs/Key";
|
|
3252
|
+
};
|
|
3253
|
+
readonly additionalProperties: {
|
|
3254
|
+
readonly type: "integer";
|
|
3255
|
+
readonly minimum: 0;
|
|
3256
|
+
};
|
|
3257
|
+
};
|
|
3258
|
+
readonly ranking: {
|
|
3259
|
+
readonly type: "object";
|
|
3260
|
+
readonly propertyNames: {
|
|
3261
|
+
readonly $ref: "#/$defs/Key";
|
|
3262
|
+
};
|
|
3263
|
+
readonly additionalProperties: {
|
|
3264
|
+
readonly type: "array";
|
|
3265
|
+
readonly items: {
|
|
3266
|
+
readonly type: "integer";
|
|
3267
|
+
readonly minimum: 0;
|
|
3268
|
+
};
|
|
3269
|
+
};
|
|
3270
|
+
};
|
|
3271
|
+
readonly score: {
|
|
3272
|
+
readonly type: "object";
|
|
3273
|
+
readonly propertyNames: {
|
|
3274
|
+
readonly $ref: "#/$defs/Key";
|
|
3275
|
+
};
|
|
3276
|
+
readonly additionalProperties: {
|
|
3277
|
+
readonly type: "object";
|
|
3278
|
+
readonly additionalProperties: false;
|
|
3279
|
+
readonly required: readonly ["sum", "count"];
|
|
3280
|
+
readonly properties: {
|
|
3281
|
+
readonly sum: {
|
|
3282
|
+
readonly type: "integer";
|
|
3283
|
+
};
|
|
3284
|
+
readonly count: {
|
|
3285
|
+
readonly type: "integer";
|
|
3286
|
+
readonly minimum: 0;
|
|
3287
|
+
};
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
};
|
|
3291
|
+
readonly text: {
|
|
3292
|
+
readonly type: "array";
|
|
3293
|
+
readonly items: {
|
|
3294
|
+
readonly type: "string";
|
|
3295
|
+
readonly maxLength: 4096;
|
|
3296
|
+
};
|
|
3297
|
+
};
|
|
3298
|
+
readonly withheld: {
|
|
3299
|
+
readonly type: "boolean";
|
|
3300
|
+
};
|
|
3301
|
+
};
|
|
3302
|
+
};
|
|
3303
|
+
};
|
|
3304
|
+
};
|
|
3305
|
+
};
|
|
3306
|
+
//# sourceMappingURL=payload.d.ts.map
|