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