@openvtc/trust-tasks 0.28.7 → 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 +157 -0
- package/dist/_extends.d.ts.map +1 -1
- package/dist/_extends.js +6 -0
- package/dist/_extends.js.map +1 -1
- package/dist/_shared/components.d.ts +492 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +150 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +150 -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/rooms/keys/act/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.1/payload.js +1 -1
- package/dist/rooms/keys/act/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.10/payload.d.ts +560 -0
- package/dist/rooms/keys/act/0.10/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.10/payload.js +319 -0
- package/dist/rooms/keys/act/0.10/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.2/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.2/payload.js +1 -1
- package/dist/rooms/keys/act/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.3/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.3/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.3/payload.js +1 -1
- package/dist/rooms/keys/act/0.3/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.4/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.4/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.4/payload.js +1 -1
- package/dist/rooms/keys/act/0.4/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.5/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.5/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.5/payload.js +1 -1
- package/dist/rooms/keys/act/0.5/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.6/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.6/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.6/payload.js +1 -1
- package/dist/rooms/keys/act/0.6/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.7/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.7/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.7/payload.js +1 -1
- package/dist/rooms/keys/act/0.7/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.8/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.8/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.8/payload.js +1 -1
- package/dist/rooms/keys/act/0.8/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.9/payload.d.ts +14 -2
- package/dist/rooms/keys/act/0.9/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.9/payload.js +1 -1
- package/dist/rooms/keys/act/0.9/payload.js.map +1 -1
- 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.5/community-room.d.ts +16 -0
- package/dist/vtc/_shared/0.5/community-room.d.ts.map +1 -0
- package/dist/vtc/_shared/0.5/community-room.js +6 -0
- package/dist/vtc/_shared/0.5/community-room.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/dist/vtc/rooms/community/archive/0.1/payload.d.ts +1644 -0
- package/dist/vtc/rooms/community/archive/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/archive/0.1/payload.js +940 -0
- package/dist/vtc/rooms/community/archive/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/community/get/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/get/0.1/payload.js +1 -1
- package/dist/vtc/rooms/community/get/0.2/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/get/0.2/payload.js +1 -1
- package/dist/vtc/rooms/community/get/0.3/payload.d.ts +13 -2
- package/dist/vtc/rooms/community/get/0.3/payload.d.ts.map +1 -1
- package/dist/vtc/rooms/community/get/0.3/payload.js +1 -1
- package/dist/vtc/rooms/community/get/0.3/payload.js.map +1 -1
- package/dist/vtc/rooms/community/get/0.4/payload.d.ts +1405 -0
- package/dist/vtc/rooms/community/get/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/get/0.4/payload.js +817 -0
- package/dist/vtc/rooms/community/get/0.4/payload.js.map +1 -0
- package/dist/vtc/rooms/community/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/list/0.1/payload.js +1 -1
- package/dist/vtc/rooms/community/list/0.2/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/list/0.2/payload.js +1 -1
- package/dist/vtc/rooms/community/list/0.3/payload.d.ts +13 -2
- package/dist/vtc/rooms/community/list/0.3/payload.d.ts.map +1 -1
- package/dist/vtc/rooms/community/list/0.3/payload.js +1 -1
- package/dist/vtc/rooms/community/list/0.3/payload.js.map +1 -1
- package/dist/vtc/rooms/community/list/0.4/payload.d.ts +1505 -0
- package/dist/vtc/rooms/community/list/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/list/0.4/payload.js +854 -0
- package/dist/vtc/rooms/community/list/0.4/payload.js.map +1 -0
- package/dist/vtc/rooms/community/members/add/0.1/payload.d.ts +13 -2
- package/dist/vtc/rooms/community/members/add/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/rooms/community/members/add/0.1/payload.js +1 -1
- package/dist/vtc/rooms/community/members/add/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/members/add/0.2/payload.d.ts +569 -0
- package/dist/vtc/rooms/community/members/add/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/members/add/0.2/payload.js +340 -0
- package/dist/vtc/rooms/community/members/add/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/members/list/0.1/payload.d.ts +13 -2
- package/dist/vtc/rooms/community/members/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/rooms/community/members/list/0.1/payload.js +1 -1
- package/dist/vtc/rooms/community/members/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/members/list/0.2/payload.d.ts +588 -0
- package/dist/vtc/rooms/community/members/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/members/list/0.2/payload.js +341 -0
- package/dist/vtc/rooms/community/members/list/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/removal/cancel/0.1/payload.d.ts +1440 -0
- package/dist/vtc/rooms/community/removal/cancel/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/removal/cancel/0.1/payload.js +835 -0
- package/dist/vtc/rooms/community/removal/cancel/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/community/remove/0.1/payload.d.ts +1604 -0
- package/dist/vtc/rooms/community/remove/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/remove/0.1/payload.js +921 -0
- package/dist/vtc/rooms/community/remove/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/community/unarchive/0.1/payload.d.ts +1460 -0
- package/dist/vtc/rooms/community/unarchive/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/unarchive/0.1/payload.js +845 -0
- package/dist/vtc/rooms/community/unarchive/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts +13 -2
- package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/rooms/memberships/list/0.1/payload.js +1 -1
- package/dist/vtc/rooms/memberships/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/memberships/list/0.2/payload.d.ts +830 -0
- package/dist/vtc/rooms/memberships/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/memberships/list/0.2/payload.js +498 -0
- package/dist/vtc/rooms/memberships/list/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_extends.ts +6 -0
- package/src/_shared/components.ts +497 -0
- package/src/index.ts +150 -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/rooms/keys/act/0.1/payload.ts +5 -5
- package/src/rooms/keys/act/0.10/payload.ts +396 -0
- package/src/rooms/keys/act/0.2/payload.ts +5 -5
- package/src/rooms/keys/act/0.3/payload.ts +5 -5
- package/src/rooms/keys/act/0.4/payload.ts +5 -5
- package/src/rooms/keys/act/0.5/payload.ts +5 -5
- package/src/rooms/keys/act/0.6/payload.ts +5 -5
- package/src/rooms/keys/act/0.7/payload.ts +5 -5
- package/src/rooms/keys/act/0.8/payload.ts +5 -5
- package/src/rooms/keys/act/0.9/payload.ts +15 -3
- 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.5/community-room.ts +17 -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
- package/src/vtc/rooms/community/archive/0.1/payload.ts +995 -0
- package/src/vtc/rooms/community/get/0.1/payload.ts +5 -5
- package/src/vtc/rooms/community/get/0.2/payload.ts +5 -5
- package/src/vtc/rooms/community/get/0.3/payload.ts +14 -3
- package/src/vtc/rooms/community/get/0.4/payload.ts +851 -0
- package/src/vtc/rooms/community/list/0.1/payload.ts +5 -5
- package/src/vtc/rooms/community/list/0.2/payload.ts +5 -5
- package/src/vtc/rooms/community/list/0.3/payload.ts +14 -3
- package/src/vtc/rooms/community/list/0.4/payload.ts +915 -0
- package/src/vtc/rooms/community/members/add/0.1/payload.ts +14 -3
- package/src/vtc/rooms/community/members/add/0.2/payload.ts +384 -0
- package/src/vtc/rooms/community/members/list/0.1/payload.ts +14 -3
- package/src/vtc/rooms/community/members/list/0.2/payload.ts +394 -0
- package/src/vtc/rooms/community/removal/cancel/0.1/payload.ts +870 -0
- package/src/vtc/rooms/community/remove/0.1/payload.ts +968 -0
- package/src/vtc/rooms/community/unarchive/0.1/payload.ts +884 -0
- package/src/vtc/rooms/memberships/list/0.1/payload.ts +14 -3
- package/src/vtc/rooms/memberships/list/0.2/payload.ts +543 -0
|
@@ -0,0 +1,1958 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/voting/election/show/0.4/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { BoardHead, BoardVisibility, ChoiceQuestion, DigestMultibase, ElectionId, ElectionState, ElectionSummary, Ext, Key_VotingV0_1 as Key, Manifest_VotingV0_4 as Manifest, Question, QuestionOption, RankingQuestion, Revote, RollRule_VotingV0_4 as RollRule, ScoreQuestion, SecrecyLevel, TextQuestion, Trustees } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Reads one election at its ballot box: its state, manifest digest, admitted count and current head, and the manifest where the caller may read the board.
|
|
8
|
+
*/
|
|
9
|
+
export interface VotingElectionShowPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The community's DID.
|
|
12
|
+
*/
|
|
13
|
+
community: string;
|
|
14
|
+
electionId: ElectionId;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
export interface VotingElectionShowResponsePayload {
|
|
18
|
+
election: ElectionSummary;
|
|
19
|
+
/**
|
|
20
|
+
* The registered manifest, exactly as registered. Present when the board is public or the caller may read the private board.
|
|
21
|
+
*/
|
|
22
|
+
manifest?: Manifest;
|
|
23
|
+
ext?: Ext;
|
|
24
|
+
}
|
|
25
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
26
|
+
export type { BoardHead, BoardVisibility, ChoiceQuestion, DigestMultibase, ElectionId, ElectionState, ElectionSummary, Ext, Key, Manifest, Question, QuestionOption, RankingQuestion, Revote, RollRule, ScoreQuestion, SecrecyLevel, TextQuestion, Trustees };
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/voting/election/show/0.4";
|
|
29
|
+
/**
|
|
30
|
+
* The earlier version of this specification that this one declares it
|
|
31
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
32
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
33
|
+
* `extendsChain` / `readForSpec`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const EXTENDS: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
38
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
39
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
40
|
+
* Versions").
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEPRECATION: string | null;
|
|
43
|
+
/** Stable alias for this specification's request payload shape. */
|
|
44
|
+
export type Payload = VotingElectionShowPayload;
|
|
45
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
46
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/voting/election/show/0.4#response";
|
|
47
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
48
|
+
export type Response = VotingElectionShowResponsePayload;
|
|
49
|
+
/**
|
|
50
|
+
* This specification's payload schema, as a value.
|
|
51
|
+
*
|
|
52
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
53
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
54
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
55
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
56
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
57
|
+
*/
|
|
58
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
59
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
60
|
+
readonly $id: "https://trusttasks.org/spec/voting/election/show/0.4";
|
|
61
|
+
readonly title: "Voting — Election Show — payload";
|
|
62
|
+
readonly description: "Reads one election at its ballot box: its state, manifest digest, admitted count and current head, and the manifest where the caller may read the board.";
|
|
63
|
+
readonly type: "object";
|
|
64
|
+
readonly additionalProperties: false;
|
|
65
|
+
readonly required: readonly ["community", "electionId"];
|
|
66
|
+
readonly properties: {
|
|
67
|
+
readonly community: {
|
|
68
|
+
readonly type: "string";
|
|
69
|
+
readonly minLength: 1;
|
|
70
|
+
readonly maxLength: 2048;
|
|
71
|
+
readonly description: "The community's DID.";
|
|
72
|
+
};
|
|
73
|
+
readonly electionId: {
|
|
74
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
75
|
+
};
|
|
76
|
+
readonly ext: {
|
|
77
|
+
readonly $ref: "#/$defs/Ext";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly $defs: {
|
|
81
|
+
readonly Response: {
|
|
82
|
+
readonly $anchor: "response";
|
|
83
|
+
readonly title: "Voting — Election Show — response payload";
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly additionalProperties: false;
|
|
86
|
+
readonly required: readonly ["election"];
|
|
87
|
+
readonly properties: {
|
|
88
|
+
readonly election: {
|
|
89
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
90
|
+
};
|
|
91
|
+
readonly manifest: {
|
|
92
|
+
readonly $ref: "#/$defs/Manifest";
|
|
93
|
+
readonly description: "The registered manifest, exactly as registered. Present when the board is public or the caller may read the private board.";
|
|
94
|
+
};
|
|
95
|
+
readonly ext: {
|
|
96
|
+
readonly $ref: "#/$defs/Ext";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
readonly Ext: {
|
|
101
|
+
readonly title: "Ext";
|
|
102
|
+
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.";
|
|
103
|
+
readonly type: "object";
|
|
104
|
+
readonly minProperties: 1;
|
|
105
|
+
readonly additionalProperties: true;
|
|
106
|
+
readonly propertyNames: {
|
|
107
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly Manifest: {
|
|
111
|
+
readonly title: "Manifest";
|
|
112
|
+
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).";
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly additionalProperties: false;
|
|
115
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly electionId: {
|
|
118
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
119
|
+
};
|
|
120
|
+
readonly community: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly minLength: 1;
|
|
123
|
+
readonly maxLength: 2048;
|
|
124
|
+
readonly description: "The community's DID.";
|
|
125
|
+
};
|
|
126
|
+
readonly title: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly maxLength: 512;
|
|
129
|
+
};
|
|
130
|
+
readonly description: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
readonly maxLength: 8192;
|
|
133
|
+
};
|
|
134
|
+
readonly questions: {
|
|
135
|
+
readonly type: "array";
|
|
136
|
+
readonly minItems: 1;
|
|
137
|
+
readonly maxItems: 128;
|
|
138
|
+
readonly items: {
|
|
139
|
+
readonly $ref: "#/$defs/Question";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly secrecy: {
|
|
143
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
144
|
+
};
|
|
145
|
+
readonly roll: {
|
|
146
|
+
readonly $ref: "#/$defs/RollRule";
|
|
147
|
+
};
|
|
148
|
+
readonly registrationOpensAt: {
|
|
149
|
+
readonly type: "string";
|
|
150
|
+
readonly format: "date-time";
|
|
151
|
+
};
|
|
152
|
+
readonly votingOpensAt: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly format: "date-time";
|
|
155
|
+
};
|
|
156
|
+
readonly votingClosesAt: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly format: "date-time";
|
|
159
|
+
};
|
|
160
|
+
readonly revote: {
|
|
161
|
+
readonly $ref: "#/$defs/Revote";
|
|
162
|
+
};
|
|
163
|
+
readonly board: {
|
|
164
|
+
readonly type: "object";
|
|
165
|
+
readonly additionalProperties: false;
|
|
166
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
167
|
+
readonly properties: {
|
|
168
|
+
readonly visibility: {
|
|
169
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
170
|
+
};
|
|
171
|
+
readonly auditors: {
|
|
172
|
+
readonly type: "array";
|
|
173
|
+
readonly items: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
readonly minLength: 1;
|
|
176
|
+
readonly maxLength: 2048;
|
|
177
|
+
};
|
|
178
|
+
readonly uniqueItems: true;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
readonly ballotBox: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
readonly minLength: 1;
|
|
185
|
+
readonly maxLength: 2048;
|
|
186
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
187
|
+
};
|
|
188
|
+
readonly trustees: {
|
|
189
|
+
readonly $ref: "#/$defs/Trustees";
|
|
190
|
+
};
|
|
191
|
+
readonly binding: {
|
|
192
|
+
readonly type: "boolean";
|
|
193
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
194
|
+
};
|
|
195
|
+
readonly allowEarlyClose: {
|
|
196
|
+
readonly type: "boolean";
|
|
197
|
+
};
|
|
198
|
+
readonly resultsBeforeClose: {
|
|
199
|
+
readonly type: "boolean";
|
|
200
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
201
|
+
};
|
|
202
|
+
readonly textReleaseThreshold: {
|
|
203
|
+
readonly type: "integer";
|
|
204
|
+
readonly minimum: 1;
|
|
205
|
+
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).";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
readonly Trustees: {
|
|
210
|
+
readonly title: "Trustees";
|
|
211
|
+
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.";
|
|
212
|
+
readonly type: "object";
|
|
213
|
+
readonly additionalProperties: false;
|
|
214
|
+
readonly required: readonly ["dids", "threshold"];
|
|
215
|
+
readonly properties: {
|
|
216
|
+
readonly dids: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly minItems: 2;
|
|
219
|
+
readonly items: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly minLength: 1;
|
|
222
|
+
readonly maxLength: 2048;
|
|
223
|
+
};
|
|
224
|
+
readonly uniqueItems: true;
|
|
225
|
+
};
|
|
226
|
+
readonly threshold: {
|
|
227
|
+
readonly type: "integer";
|
|
228
|
+
readonly minimum: 2;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly BoardVisibility: {
|
|
233
|
+
readonly title: "BoardVisibility";
|
|
234
|
+
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).";
|
|
235
|
+
readonly type: "string";
|
|
236
|
+
readonly enum: readonly ["public", "private"];
|
|
237
|
+
};
|
|
238
|
+
readonly Revote: {
|
|
239
|
+
readonly title: "Revote";
|
|
240
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
243
|
+
};
|
|
244
|
+
readonly RollRule: {
|
|
245
|
+
readonly title: "RollRule";
|
|
246
|
+
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.";
|
|
247
|
+
readonly type: "object";
|
|
248
|
+
readonly additionalProperties: false;
|
|
249
|
+
readonly required: readonly ["rule"];
|
|
250
|
+
readonly properties: {
|
|
251
|
+
readonly rule: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
254
|
+
};
|
|
255
|
+
readonly listed: {
|
|
256
|
+
readonly type: "array";
|
|
257
|
+
readonly items: {
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
readonly minLength: 1;
|
|
260
|
+
readonly maxLength: 2048;
|
|
261
|
+
readonly description: "A DID enfranchised by name.";
|
|
262
|
+
};
|
|
263
|
+
readonly uniqueItems: true;
|
|
264
|
+
};
|
|
265
|
+
readonly memberOf: {
|
|
266
|
+
readonly type: "string";
|
|
267
|
+
readonly minLength: 8;
|
|
268
|
+
readonly maxLength: 2048;
|
|
269
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
270
|
+
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).";
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
readonly dependentSchemas: {
|
|
274
|
+
readonly rule: {
|
|
275
|
+
readonly anyOf: readonly [{
|
|
276
|
+
readonly required: readonly ["memberOf"];
|
|
277
|
+
}, {
|
|
278
|
+
readonly properties: {
|
|
279
|
+
readonly rule: {
|
|
280
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
}];
|
|
284
|
+
};
|
|
285
|
+
readonly memberOf: {
|
|
286
|
+
readonly properties: {
|
|
287
|
+
readonly rule: {
|
|
288
|
+
readonly const: "credential";
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly not: {
|
|
292
|
+
readonly required: readonly ["listed"];
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
readonly SecrecyLevel: {
|
|
298
|
+
readonly title: "SecrecyLevel";
|
|
299
|
+
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).";
|
|
300
|
+
readonly type: "string";
|
|
301
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
302
|
+
};
|
|
303
|
+
readonly Question: {
|
|
304
|
+
readonly title: "Question";
|
|
305
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
306
|
+
readonly oneOf: readonly [{
|
|
307
|
+
readonly title: "ChoiceQuestion";
|
|
308
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
309
|
+
readonly type: "object";
|
|
310
|
+
readonly additionalProperties: false;
|
|
311
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
312
|
+
readonly properties: {
|
|
313
|
+
readonly key: {
|
|
314
|
+
readonly $ref: "#/$defs/Key";
|
|
315
|
+
};
|
|
316
|
+
readonly type: {
|
|
317
|
+
readonly const: "choice";
|
|
318
|
+
};
|
|
319
|
+
readonly text: {
|
|
320
|
+
readonly type: "string";
|
|
321
|
+
readonly maxLength: 2048;
|
|
322
|
+
};
|
|
323
|
+
readonly options: {
|
|
324
|
+
readonly type: "array";
|
|
325
|
+
readonly minItems: 2;
|
|
326
|
+
readonly maxItems: 256;
|
|
327
|
+
readonly items: {
|
|
328
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
readonly minSelections: {
|
|
332
|
+
readonly type: "integer";
|
|
333
|
+
readonly minimum: 0;
|
|
334
|
+
};
|
|
335
|
+
readonly maxSelections: {
|
|
336
|
+
readonly type: "integer";
|
|
337
|
+
readonly minimum: 1;
|
|
338
|
+
};
|
|
339
|
+
readonly optional: {
|
|
340
|
+
readonly type: "boolean";
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
}, {
|
|
344
|
+
readonly title: "RankingQuestion";
|
|
345
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
346
|
+
readonly type: "object";
|
|
347
|
+
readonly additionalProperties: false;
|
|
348
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
349
|
+
readonly properties: {
|
|
350
|
+
readonly key: {
|
|
351
|
+
readonly $ref: "#/$defs/Key";
|
|
352
|
+
};
|
|
353
|
+
readonly type: {
|
|
354
|
+
readonly const: "ranking";
|
|
355
|
+
};
|
|
356
|
+
readonly text: {
|
|
357
|
+
readonly type: "string";
|
|
358
|
+
readonly maxLength: 2048;
|
|
359
|
+
};
|
|
360
|
+
readonly options: {
|
|
361
|
+
readonly type: "array";
|
|
362
|
+
readonly minItems: 2;
|
|
363
|
+
readonly maxItems: 64;
|
|
364
|
+
readonly items: {
|
|
365
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly partial: {
|
|
369
|
+
readonly type: "boolean";
|
|
370
|
+
};
|
|
371
|
+
readonly optional: {
|
|
372
|
+
readonly type: "boolean";
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
}, {
|
|
376
|
+
readonly title: "ScoreQuestion";
|
|
377
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
378
|
+
readonly type: "object";
|
|
379
|
+
readonly additionalProperties: false;
|
|
380
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
381
|
+
readonly properties: {
|
|
382
|
+
readonly key: {
|
|
383
|
+
readonly $ref: "#/$defs/Key";
|
|
384
|
+
};
|
|
385
|
+
readonly type: {
|
|
386
|
+
readonly const: "score";
|
|
387
|
+
};
|
|
388
|
+
readonly text: {
|
|
389
|
+
readonly type: "string";
|
|
390
|
+
readonly maxLength: 2048;
|
|
391
|
+
};
|
|
392
|
+
readonly options: {
|
|
393
|
+
readonly type: "array";
|
|
394
|
+
readonly minItems: 1;
|
|
395
|
+
readonly maxItems: 256;
|
|
396
|
+
readonly items: {
|
|
397
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
readonly min: {
|
|
401
|
+
readonly type: "integer";
|
|
402
|
+
};
|
|
403
|
+
readonly max: {
|
|
404
|
+
readonly type: "integer";
|
|
405
|
+
};
|
|
406
|
+
readonly optional: {
|
|
407
|
+
readonly type: "boolean";
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
}, {
|
|
411
|
+
readonly title: "TextQuestion";
|
|
412
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
413
|
+
readonly type: "object";
|
|
414
|
+
readonly additionalProperties: false;
|
|
415
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
416
|
+
readonly properties: {
|
|
417
|
+
readonly key: {
|
|
418
|
+
readonly $ref: "#/$defs/Key";
|
|
419
|
+
};
|
|
420
|
+
readonly type: {
|
|
421
|
+
readonly const: "text";
|
|
422
|
+
};
|
|
423
|
+
readonly text: {
|
|
424
|
+
readonly type: "string";
|
|
425
|
+
readonly maxLength: 2048;
|
|
426
|
+
};
|
|
427
|
+
readonly maxLength: {
|
|
428
|
+
readonly type: "integer";
|
|
429
|
+
readonly minimum: 1;
|
|
430
|
+
readonly maximum: 4096;
|
|
431
|
+
};
|
|
432
|
+
readonly optional: {
|
|
433
|
+
readonly type: "boolean";
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
}];
|
|
437
|
+
};
|
|
438
|
+
readonly Key: {
|
|
439
|
+
readonly title: "Key";
|
|
440
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
441
|
+
readonly type: "string";
|
|
442
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
443
|
+
};
|
|
444
|
+
readonly QuestionOption: {
|
|
445
|
+
readonly title: "QuestionOption";
|
|
446
|
+
readonly type: "object";
|
|
447
|
+
readonly additionalProperties: false;
|
|
448
|
+
readonly required: readonly ["key"];
|
|
449
|
+
readonly properties: {
|
|
450
|
+
readonly key: {
|
|
451
|
+
readonly $ref: "#/$defs/Key";
|
|
452
|
+
};
|
|
453
|
+
readonly label: {
|
|
454
|
+
readonly type: "string";
|
|
455
|
+
readonly maxLength: 512;
|
|
456
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
readonly ElectionId: {
|
|
461
|
+
readonly title: "ElectionId";
|
|
462
|
+
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.";
|
|
463
|
+
readonly type: "string";
|
|
464
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
465
|
+
};
|
|
466
|
+
readonly ElectionSummary: {
|
|
467
|
+
readonly title: "ElectionSummary";
|
|
468
|
+
readonly description: "A ballot box's view of one election.";
|
|
469
|
+
readonly type: "object";
|
|
470
|
+
readonly additionalProperties: false;
|
|
471
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
472
|
+
readonly properties: {
|
|
473
|
+
readonly electionId: {
|
|
474
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
475
|
+
};
|
|
476
|
+
readonly community: {
|
|
477
|
+
readonly type: "string";
|
|
478
|
+
readonly minLength: 1;
|
|
479
|
+
readonly maxLength: 2048;
|
|
480
|
+
};
|
|
481
|
+
readonly manifestDigest: {
|
|
482
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
483
|
+
};
|
|
484
|
+
readonly state: {
|
|
485
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
486
|
+
};
|
|
487
|
+
readonly ballotsAdmitted: {
|
|
488
|
+
readonly type: "integer";
|
|
489
|
+
readonly minimum: 0;
|
|
490
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
491
|
+
};
|
|
492
|
+
readonly head: {
|
|
493
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
readonly BoardHead: {
|
|
498
|
+
readonly title: "BoardHead";
|
|
499
|
+
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.";
|
|
500
|
+
readonly type: "object";
|
|
501
|
+
readonly additionalProperties: false;
|
|
502
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
503
|
+
readonly properties: {
|
|
504
|
+
readonly electionId: {
|
|
505
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
506
|
+
};
|
|
507
|
+
readonly treeSize: {
|
|
508
|
+
readonly type: "integer";
|
|
509
|
+
readonly minimum: 0;
|
|
510
|
+
};
|
|
511
|
+
readonly rootHash: {
|
|
512
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
513
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
514
|
+
};
|
|
515
|
+
readonly issuedAt: {
|
|
516
|
+
readonly type: "string";
|
|
517
|
+
readonly format: "date-time";
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
readonly DigestMultibase: {
|
|
522
|
+
readonly title: "DigestMultibase";
|
|
523
|
+
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`.";
|
|
524
|
+
readonly type: "string";
|
|
525
|
+
readonly minLength: 16;
|
|
526
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
527
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
528
|
+
};
|
|
529
|
+
readonly ElectionState: {
|
|
530
|
+
readonly title: "ElectionState";
|
|
531
|
+
readonly type: "string";
|
|
532
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
537
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
538
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
539
|
+
readonly $ref: "#/$defs/Response";
|
|
540
|
+
readonly $defs: {
|
|
541
|
+
readonly Response: {
|
|
542
|
+
readonly $anchor: "response";
|
|
543
|
+
readonly title: "Voting — Election Show — response payload";
|
|
544
|
+
readonly type: "object";
|
|
545
|
+
readonly additionalProperties: false;
|
|
546
|
+
readonly required: readonly ["election"];
|
|
547
|
+
readonly properties: {
|
|
548
|
+
readonly election: {
|
|
549
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
550
|
+
};
|
|
551
|
+
readonly manifest: {
|
|
552
|
+
readonly $ref: "#/$defs/Manifest";
|
|
553
|
+
readonly description: "The registered manifest, exactly as registered. Present when the board is public or the caller may read the private board.";
|
|
554
|
+
};
|
|
555
|
+
readonly ext: {
|
|
556
|
+
readonly $ref: "#/$defs/Ext";
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
readonly Ext: {
|
|
561
|
+
readonly title: "Ext";
|
|
562
|
+
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.";
|
|
563
|
+
readonly type: "object";
|
|
564
|
+
readonly minProperties: 1;
|
|
565
|
+
readonly additionalProperties: true;
|
|
566
|
+
readonly propertyNames: {
|
|
567
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
readonly Manifest: {
|
|
571
|
+
readonly title: "Manifest";
|
|
572
|
+
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).";
|
|
573
|
+
readonly type: "object";
|
|
574
|
+
readonly additionalProperties: false;
|
|
575
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
576
|
+
readonly properties: {
|
|
577
|
+
readonly electionId: {
|
|
578
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
579
|
+
};
|
|
580
|
+
readonly community: {
|
|
581
|
+
readonly type: "string";
|
|
582
|
+
readonly minLength: 1;
|
|
583
|
+
readonly maxLength: 2048;
|
|
584
|
+
readonly description: "The community's DID.";
|
|
585
|
+
};
|
|
586
|
+
readonly title: {
|
|
587
|
+
readonly type: "string";
|
|
588
|
+
readonly maxLength: 512;
|
|
589
|
+
};
|
|
590
|
+
readonly description: {
|
|
591
|
+
readonly type: "string";
|
|
592
|
+
readonly maxLength: 8192;
|
|
593
|
+
};
|
|
594
|
+
readonly questions: {
|
|
595
|
+
readonly type: "array";
|
|
596
|
+
readonly minItems: 1;
|
|
597
|
+
readonly maxItems: 128;
|
|
598
|
+
readonly items: {
|
|
599
|
+
readonly $ref: "#/$defs/Question";
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
readonly secrecy: {
|
|
603
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
604
|
+
};
|
|
605
|
+
readonly roll: {
|
|
606
|
+
readonly $ref: "#/$defs/RollRule";
|
|
607
|
+
};
|
|
608
|
+
readonly registrationOpensAt: {
|
|
609
|
+
readonly type: "string";
|
|
610
|
+
readonly format: "date-time";
|
|
611
|
+
};
|
|
612
|
+
readonly votingOpensAt: {
|
|
613
|
+
readonly type: "string";
|
|
614
|
+
readonly format: "date-time";
|
|
615
|
+
};
|
|
616
|
+
readonly votingClosesAt: {
|
|
617
|
+
readonly type: "string";
|
|
618
|
+
readonly format: "date-time";
|
|
619
|
+
};
|
|
620
|
+
readonly revote: {
|
|
621
|
+
readonly $ref: "#/$defs/Revote";
|
|
622
|
+
};
|
|
623
|
+
readonly board: {
|
|
624
|
+
readonly type: "object";
|
|
625
|
+
readonly additionalProperties: false;
|
|
626
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
627
|
+
readonly properties: {
|
|
628
|
+
readonly visibility: {
|
|
629
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
630
|
+
};
|
|
631
|
+
readonly auditors: {
|
|
632
|
+
readonly type: "array";
|
|
633
|
+
readonly items: {
|
|
634
|
+
readonly type: "string";
|
|
635
|
+
readonly minLength: 1;
|
|
636
|
+
readonly maxLength: 2048;
|
|
637
|
+
};
|
|
638
|
+
readonly uniqueItems: true;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
readonly ballotBox: {
|
|
643
|
+
readonly type: "string";
|
|
644
|
+
readonly minLength: 1;
|
|
645
|
+
readonly maxLength: 2048;
|
|
646
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
647
|
+
};
|
|
648
|
+
readonly trustees: {
|
|
649
|
+
readonly $ref: "#/$defs/Trustees";
|
|
650
|
+
};
|
|
651
|
+
readonly binding: {
|
|
652
|
+
readonly type: "boolean";
|
|
653
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
654
|
+
};
|
|
655
|
+
readonly allowEarlyClose: {
|
|
656
|
+
readonly type: "boolean";
|
|
657
|
+
};
|
|
658
|
+
readonly resultsBeforeClose: {
|
|
659
|
+
readonly type: "boolean";
|
|
660
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
661
|
+
};
|
|
662
|
+
readonly textReleaseThreshold: {
|
|
663
|
+
readonly type: "integer";
|
|
664
|
+
readonly minimum: 1;
|
|
665
|
+
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).";
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
readonly Trustees: {
|
|
670
|
+
readonly title: "Trustees";
|
|
671
|
+
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.";
|
|
672
|
+
readonly type: "object";
|
|
673
|
+
readonly additionalProperties: false;
|
|
674
|
+
readonly required: readonly ["dids", "threshold"];
|
|
675
|
+
readonly properties: {
|
|
676
|
+
readonly dids: {
|
|
677
|
+
readonly type: "array";
|
|
678
|
+
readonly minItems: 2;
|
|
679
|
+
readonly items: {
|
|
680
|
+
readonly type: "string";
|
|
681
|
+
readonly minLength: 1;
|
|
682
|
+
readonly maxLength: 2048;
|
|
683
|
+
};
|
|
684
|
+
readonly uniqueItems: true;
|
|
685
|
+
};
|
|
686
|
+
readonly threshold: {
|
|
687
|
+
readonly type: "integer";
|
|
688
|
+
readonly minimum: 2;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
readonly BoardVisibility: {
|
|
693
|
+
readonly title: "BoardVisibility";
|
|
694
|
+
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).";
|
|
695
|
+
readonly type: "string";
|
|
696
|
+
readonly enum: readonly ["public", "private"];
|
|
697
|
+
};
|
|
698
|
+
readonly Revote: {
|
|
699
|
+
readonly title: "Revote";
|
|
700
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
701
|
+
readonly type: "string";
|
|
702
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
703
|
+
};
|
|
704
|
+
readonly RollRule: {
|
|
705
|
+
readonly title: "RollRule";
|
|
706
|
+
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.";
|
|
707
|
+
readonly type: "object";
|
|
708
|
+
readonly additionalProperties: false;
|
|
709
|
+
readonly required: readonly ["rule"];
|
|
710
|
+
readonly properties: {
|
|
711
|
+
readonly rule: {
|
|
712
|
+
readonly type: "string";
|
|
713
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
714
|
+
};
|
|
715
|
+
readonly listed: {
|
|
716
|
+
readonly type: "array";
|
|
717
|
+
readonly items: {
|
|
718
|
+
readonly type: "string";
|
|
719
|
+
readonly minLength: 1;
|
|
720
|
+
readonly maxLength: 2048;
|
|
721
|
+
readonly description: "A DID enfranchised by name.";
|
|
722
|
+
};
|
|
723
|
+
readonly uniqueItems: true;
|
|
724
|
+
};
|
|
725
|
+
readonly memberOf: {
|
|
726
|
+
readonly type: "string";
|
|
727
|
+
readonly minLength: 8;
|
|
728
|
+
readonly maxLength: 2048;
|
|
729
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
730
|
+
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).";
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
readonly dependentSchemas: {
|
|
734
|
+
readonly rule: {
|
|
735
|
+
readonly anyOf: readonly [{
|
|
736
|
+
readonly required: readonly ["memberOf"];
|
|
737
|
+
}, {
|
|
738
|
+
readonly properties: {
|
|
739
|
+
readonly rule: {
|
|
740
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
}];
|
|
744
|
+
};
|
|
745
|
+
readonly memberOf: {
|
|
746
|
+
readonly properties: {
|
|
747
|
+
readonly rule: {
|
|
748
|
+
readonly const: "credential";
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
readonly not: {
|
|
752
|
+
readonly required: readonly ["listed"];
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
readonly SecrecyLevel: {
|
|
758
|
+
readonly title: "SecrecyLevel";
|
|
759
|
+
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).";
|
|
760
|
+
readonly type: "string";
|
|
761
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
762
|
+
};
|
|
763
|
+
readonly Question: {
|
|
764
|
+
readonly title: "Question";
|
|
765
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
766
|
+
readonly oneOf: readonly [{
|
|
767
|
+
readonly title: "ChoiceQuestion";
|
|
768
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
769
|
+
readonly type: "object";
|
|
770
|
+
readonly additionalProperties: false;
|
|
771
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
772
|
+
readonly properties: {
|
|
773
|
+
readonly key: {
|
|
774
|
+
readonly $ref: "#/$defs/Key";
|
|
775
|
+
};
|
|
776
|
+
readonly type: {
|
|
777
|
+
readonly const: "choice";
|
|
778
|
+
};
|
|
779
|
+
readonly text: {
|
|
780
|
+
readonly type: "string";
|
|
781
|
+
readonly maxLength: 2048;
|
|
782
|
+
};
|
|
783
|
+
readonly options: {
|
|
784
|
+
readonly type: "array";
|
|
785
|
+
readonly minItems: 2;
|
|
786
|
+
readonly maxItems: 256;
|
|
787
|
+
readonly items: {
|
|
788
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
readonly minSelections: {
|
|
792
|
+
readonly type: "integer";
|
|
793
|
+
readonly minimum: 0;
|
|
794
|
+
};
|
|
795
|
+
readonly maxSelections: {
|
|
796
|
+
readonly type: "integer";
|
|
797
|
+
readonly minimum: 1;
|
|
798
|
+
};
|
|
799
|
+
readonly optional: {
|
|
800
|
+
readonly type: "boolean";
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
}, {
|
|
804
|
+
readonly title: "RankingQuestion";
|
|
805
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
806
|
+
readonly type: "object";
|
|
807
|
+
readonly additionalProperties: false;
|
|
808
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
809
|
+
readonly properties: {
|
|
810
|
+
readonly key: {
|
|
811
|
+
readonly $ref: "#/$defs/Key";
|
|
812
|
+
};
|
|
813
|
+
readonly type: {
|
|
814
|
+
readonly const: "ranking";
|
|
815
|
+
};
|
|
816
|
+
readonly text: {
|
|
817
|
+
readonly type: "string";
|
|
818
|
+
readonly maxLength: 2048;
|
|
819
|
+
};
|
|
820
|
+
readonly options: {
|
|
821
|
+
readonly type: "array";
|
|
822
|
+
readonly minItems: 2;
|
|
823
|
+
readonly maxItems: 64;
|
|
824
|
+
readonly items: {
|
|
825
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
readonly partial: {
|
|
829
|
+
readonly type: "boolean";
|
|
830
|
+
};
|
|
831
|
+
readonly optional: {
|
|
832
|
+
readonly type: "boolean";
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
}, {
|
|
836
|
+
readonly title: "ScoreQuestion";
|
|
837
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
838
|
+
readonly type: "object";
|
|
839
|
+
readonly additionalProperties: false;
|
|
840
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
841
|
+
readonly properties: {
|
|
842
|
+
readonly key: {
|
|
843
|
+
readonly $ref: "#/$defs/Key";
|
|
844
|
+
};
|
|
845
|
+
readonly type: {
|
|
846
|
+
readonly const: "score";
|
|
847
|
+
};
|
|
848
|
+
readonly text: {
|
|
849
|
+
readonly type: "string";
|
|
850
|
+
readonly maxLength: 2048;
|
|
851
|
+
};
|
|
852
|
+
readonly options: {
|
|
853
|
+
readonly type: "array";
|
|
854
|
+
readonly minItems: 1;
|
|
855
|
+
readonly maxItems: 256;
|
|
856
|
+
readonly items: {
|
|
857
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly min: {
|
|
861
|
+
readonly type: "integer";
|
|
862
|
+
};
|
|
863
|
+
readonly max: {
|
|
864
|
+
readonly type: "integer";
|
|
865
|
+
};
|
|
866
|
+
readonly optional: {
|
|
867
|
+
readonly type: "boolean";
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
}, {
|
|
871
|
+
readonly title: "TextQuestion";
|
|
872
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
873
|
+
readonly type: "object";
|
|
874
|
+
readonly additionalProperties: false;
|
|
875
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
876
|
+
readonly properties: {
|
|
877
|
+
readonly key: {
|
|
878
|
+
readonly $ref: "#/$defs/Key";
|
|
879
|
+
};
|
|
880
|
+
readonly type: {
|
|
881
|
+
readonly const: "text";
|
|
882
|
+
};
|
|
883
|
+
readonly text: {
|
|
884
|
+
readonly type: "string";
|
|
885
|
+
readonly maxLength: 2048;
|
|
886
|
+
};
|
|
887
|
+
readonly maxLength: {
|
|
888
|
+
readonly type: "integer";
|
|
889
|
+
readonly minimum: 1;
|
|
890
|
+
readonly maximum: 4096;
|
|
891
|
+
};
|
|
892
|
+
readonly optional: {
|
|
893
|
+
readonly type: "boolean";
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
}];
|
|
897
|
+
};
|
|
898
|
+
readonly Key: {
|
|
899
|
+
readonly title: "Key";
|
|
900
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
901
|
+
readonly type: "string";
|
|
902
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
903
|
+
};
|
|
904
|
+
readonly QuestionOption: {
|
|
905
|
+
readonly title: "QuestionOption";
|
|
906
|
+
readonly type: "object";
|
|
907
|
+
readonly additionalProperties: false;
|
|
908
|
+
readonly required: readonly ["key"];
|
|
909
|
+
readonly properties: {
|
|
910
|
+
readonly key: {
|
|
911
|
+
readonly $ref: "#/$defs/Key";
|
|
912
|
+
};
|
|
913
|
+
readonly label: {
|
|
914
|
+
readonly type: "string";
|
|
915
|
+
readonly maxLength: 512;
|
|
916
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
917
|
+
};
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
readonly ElectionId: {
|
|
921
|
+
readonly title: "ElectionId";
|
|
922
|
+
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.";
|
|
923
|
+
readonly type: "string";
|
|
924
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
925
|
+
};
|
|
926
|
+
readonly ElectionSummary: {
|
|
927
|
+
readonly title: "ElectionSummary";
|
|
928
|
+
readonly description: "A ballot box's view of one election.";
|
|
929
|
+
readonly type: "object";
|
|
930
|
+
readonly additionalProperties: false;
|
|
931
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
932
|
+
readonly properties: {
|
|
933
|
+
readonly electionId: {
|
|
934
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
935
|
+
};
|
|
936
|
+
readonly community: {
|
|
937
|
+
readonly type: "string";
|
|
938
|
+
readonly minLength: 1;
|
|
939
|
+
readonly maxLength: 2048;
|
|
940
|
+
};
|
|
941
|
+
readonly manifestDigest: {
|
|
942
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
943
|
+
};
|
|
944
|
+
readonly state: {
|
|
945
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
946
|
+
};
|
|
947
|
+
readonly ballotsAdmitted: {
|
|
948
|
+
readonly type: "integer";
|
|
949
|
+
readonly minimum: 0;
|
|
950
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
951
|
+
};
|
|
952
|
+
readonly head: {
|
|
953
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
readonly BoardHead: {
|
|
958
|
+
readonly title: "BoardHead";
|
|
959
|
+
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.";
|
|
960
|
+
readonly type: "object";
|
|
961
|
+
readonly additionalProperties: false;
|
|
962
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
963
|
+
readonly properties: {
|
|
964
|
+
readonly electionId: {
|
|
965
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
966
|
+
};
|
|
967
|
+
readonly treeSize: {
|
|
968
|
+
readonly type: "integer";
|
|
969
|
+
readonly minimum: 0;
|
|
970
|
+
};
|
|
971
|
+
readonly rootHash: {
|
|
972
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
973
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
974
|
+
};
|
|
975
|
+
readonly issuedAt: {
|
|
976
|
+
readonly type: "string";
|
|
977
|
+
readonly format: "date-time";
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
readonly DigestMultibase: {
|
|
982
|
+
readonly title: "DigestMultibase";
|
|
983
|
+
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`.";
|
|
984
|
+
readonly type: "string";
|
|
985
|
+
readonly minLength: 16;
|
|
986
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
987
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
988
|
+
};
|
|
989
|
+
readonly ElectionState: {
|
|
990
|
+
readonly title: "ElectionState";
|
|
991
|
+
readonly type: "string";
|
|
992
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
/**
|
|
997
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
998
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
999
|
+
* per-specification and cannot be derived from the document alone, and
|
|
1000
|
+
* item 2 needs the schema this carries.
|
|
1001
|
+
*/
|
|
1002
|
+
export declare const SPEC: {
|
|
1003
|
+
readonly typeUri: "https://trusttasks.org/spec/voting/election/show/0.4";
|
|
1004
|
+
readonly isBearer: false;
|
|
1005
|
+
readonly isProofRequired: false;
|
|
1006
|
+
readonly isRecipientRequired: true;
|
|
1007
|
+
readonly isIssuedAtRequired: false;
|
|
1008
|
+
readonly payloadSchema: {
|
|
1009
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1010
|
+
readonly $id: "https://trusttasks.org/spec/voting/election/show/0.4";
|
|
1011
|
+
readonly title: "Voting — Election Show — payload";
|
|
1012
|
+
readonly description: "Reads one election at its ballot box: its state, manifest digest, admitted count and current head, and the manifest where the caller may read the board.";
|
|
1013
|
+
readonly type: "object";
|
|
1014
|
+
readonly additionalProperties: false;
|
|
1015
|
+
readonly required: readonly ["community", "electionId"];
|
|
1016
|
+
readonly properties: {
|
|
1017
|
+
readonly community: {
|
|
1018
|
+
readonly type: "string";
|
|
1019
|
+
readonly minLength: 1;
|
|
1020
|
+
readonly maxLength: 2048;
|
|
1021
|
+
readonly description: "The community's DID.";
|
|
1022
|
+
};
|
|
1023
|
+
readonly electionId: {
|
|
1024
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1025
|
+
};
|
|
1026
|
+
readonly ext: {
|
|
1027
|
+
readonly $ref: "#/$defs/Ext";
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1030
|
+
readonly $defs: {
|
|
1031
|
+
readonly Response: {
|
|
1032
|
+
readonly $anchor: "response";
|
|
1033
|
+
readonly title: "Voting — Election Show — response payload";
|
|
1034
|
+
readonly type: "object";
|
|
1035
|
+
readonly additionalProperties: false;
|
|
1036
|
+
readonly required: readonly ["election"];
|
|
1037
|
+
readonly properties: {
|
|
1038
|
+
readonly election: {
|
|
1039
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
1040
|
+
};
|
|
1041
|
+
readonly manifest: {
|
|
1042
|
+
readonly $ref: "#/$defs/Manifest";
|
|
1043
|
+
readonly description: "The registered manifest, exactly as registered. Present when the board is public or the caller may read the private board.";
|
|
1044
|
+
};
|
|
1045
|
+
readonly ext: {
|
|
1046
|
+
readonly $ref: "#/$defs/Ext";
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
readonly Ext: {
|
|
1051
|
+
readonly title: "Ext";
|
|
1052
|
+
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.";
|
|
1053
|
+
readonly type: "object";
|
|
1054
|
+
readonly minProperties: 1;
|
|
1055
|
+
readonly additionalProperties: true;
|
|
1056
|
+
readonly propertyNames: {
|
|
1057
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
readonly Manifest: {
|
|
1061
|
+
readonly title: "Manifest";
|
|
1062
|
+
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).";
|
|
1063
|
+
readonly type: "object";
|
|
1064
|
+
readonly additionalProperties: false;
|
|
1065
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
1066
|
+
readonly properties: {
|
|
1067
|
+
readonly electionId: {
|
|
1068
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1069
|
+
};
|
|
1070
|
+
readonly community: {
|
|
1071
|
+
readonly type: "string";
|
|
1072
|
+
readonly minLength: 1;
|
|
1073
|
+
readonly maxLength: 2048;
|
|
1074
|
+
readonly description: "The community's DID.";
|
|
1075
|
+
};
|
|
1076
|
+
readonly title: {
|
|
1077
|
+
readonly type: "string";
|
|
1078
|
+
readonly maxLength: 512;
|
|
1079
|
+
};
|
|
1080
|
+
readonly description: {
|
|
1081
|
+
readonly type: "string";
|
|
1082
|
+
readonly maxLength: 8192;
|
|
1083
|
+
};
|
|
1084
|
+
readonly questions: {
|
|
1085
|
+
readonly type: "array";
|
|
1086
|
+
readonly minItems: 1;
|
|
1087
|
+
readonly maxItems: 128;
|
|
1088
|
+
readonly items: {
|
|
1089
|
+
readonly $ref: "#/$defs/Question";
|
|
1090
|
+
};
|
|
1091
|
+
};
|
|
1092
|
+
readonly secrecy: {
|
|
1093
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
1094
|
+
};
|
|
1095
|
+
readonly roll: {
|
|
1096
|
+
readonly $ref: "#/$defs/RollRule";
|
|
1097
|
+
};
|
|
1098
|
+
readonly registrationOpensAt: {
|
|
1099
|
+
readonly type: "string";
|
|
1100
|
+
readonly format: "date-time";
|
|
1101
|
+
};
|
|
1102
|
+
readonly votingOpensAt: {
|
|
1103
|
+
readonly type: "string";
|
|
1104
|
+
readonly format: "date-time";
|
|
1105
|
+
};
|
|
1106
|
+
readonly votingClosesAt: {
|
|
1107
|
+
readonly type: "string";
|
|
1108
|
+
readonly format: "date-time";
|
|
1109
|
+
};
|
|
1110
|
+
readonly revote: {
|
|
1111
|
+
readonly $ref: "#/$defs/Revote";
|
|
1112
|
+
};
|
|
1113
|
+
readonly board: {
|
|
1114
|
+
readonly type: "object";
|
|
1115
|
+
readonly additionalProperties: false;
|
|
1116
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
1117
|
+
readonly properties: {
|
|
1118
|
+
readonly visibility: {
|
|
1119
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
1120
|
+
};
|
|
1121
|
+
readonly auditors: {
|
|
1122
|
+
readonly type: "array";
|
|
1123
|
+
readonly items: {
|
|
1124
|
+
readonly type: "string";
|
|
1125
|
+
readonly minLength: 1;
|
|
1126
|
+
readonly maxLength: 2048;
|
|
1127
|
+
};
|
|
1128
|
+
readonly uniqueItems: true;
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
};
|
|
1132
|
+
readonly ballotBox: {
|
|
1133
|
+
readonly type: "string";
|
|
1134
|
+
readonly minLength: 1;
|
|
1135
|
+
readonly maxLength: 2048;
|
|
1136
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
1137
|
+
};
|
|
1138
|
+
readonly trustees: {
|
|
1139
|
+
readonly $ref: "#/$defs/Trustees";
|
|
1140
|
+
};
|
|
1141
|
+
readonly binding: {
|
|
1142
|
+
readonly type: "boolean";
|
|
1143
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
1144
|
+
};
|
|
1145
|
+
readonly allowEarlyClose: {
|
|
1146
|
+
readonly type: "boolean";
|
|
1147
|
+
};
|
|
1148
|
+
readonly resultsBeforeClose: {
|
|
1149
|
+
readonly type: "boolean";
|
|
1150
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
1151
|
+
};
|
|
1152
|
+
readonly textReleaseThreshold: {
|
|
1153
|
+
readonly type: "integer";
|
|
1154
|
+
readonly minimum: 1;
|
|
1155
|
+
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).";
|
|
1156
|
+
};
|
|
1157
|
+
};
|
|
1158
|
+
};
|
|
1159
|
+
readonly Trustees: {
|
|
1160
|
+
readonly title: "Trustees";
|
|
1161
|
+
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.";
|
|
1162
|
+
readonly type: "object";
|
|
1163
|
+
readonly additionalProperties: false;
|
|
1164
|
+
readonly required: readonly ["dids", "threshold"];
|
|
1165
|
+
readonly properties: {
|
|
1166
|
+
readonly dids: {
|
|
1167
|
+
readonly type: "array";
|
|
1168
|
+
readonly minItems: 2;
|
|
1169
|
+
readonly items: {
|
|
1170
|
+
readonly type: "string";
|
|
1171
|
+
readonly minLength: 1;
|
|
1172
|
+
readonly maxLength: 2048;
|
|
1173
|
+
};
|
|
1174
|
+
readonly uniqueItems: true;
|
|
1175
|
+
};
|
|
1176
|
+
readonly threshold: {
|
|
1177
|
+
readonly type: "integer";
|
|
1178
|
+
readonly minimum: 2;
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
readonly BoardVisibility: {
|
|
1183
|
+
readonly title: "BoardVisibility";
|
|
1184
|
+
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).";
|
|
1185
|
+
readonly type: "string";
|
|
1186
|
+
readonly enum: readonly ["public", "private"];
|
|
1187
|
+
};
|
|
1188
|
+
readonly Revote: {
|
|
1189
|
+
readonly title: "Revote";
|
|
1190
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
1191
|
+
readonly type: "string";
|
|
1192
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
1193
|
+
};
|
|
1194
|
+
readonly RollRule: {
|
|
1195
|
+
readonly title: "RollRule";
|
|
1196
|
+
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.";
|
|
1197
|
+
readonly type: "object";
|
|
1198
|
+
readonly additionalProperties: false;
|
|
1199
|
+
readonly required: readonly ["rule"];
|
|
1200
|
+
readonly properties: {
|
|
1201
|
+
readonly rule: {
|
|
1202
|
+
readonly type: "string";
|
|
1203
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
1204
|
+
};
|
|
1205
|
+
readonly listed: {
|
|
1206
|
+
readonly type: "array";
|
|
1207
|
+
readonly items: {
|
|
1208
|
+
readonly type: "string";
|
|
1209
|
+
readonly minLength: 1;
|
|
1210
|
+
readonly maxLength: 2048;
|
|
1211
|
+
readonly description: "A DID enfranchised by name.";
|
|
1212
|
+
};
|
|
1213
|
+
readonly uniqueItems: true;
|
|
1214
|
+
};
|
|
1215
|
+
readonly memberOf: {
|
|
1216
|
+
readonly type: "string";
|
|
1217
|
+
readonly minLength: 8;
|
|
1218
|
+
readonly maxLength: 2048;
|
|
1219
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
1220
|
+
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).";
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
readonly dependentSchemas: {
|
|
1224
|
+
readonly rule: {
|
|
1225
|
+
readonly anyOf: readonly [{
|
|
1226
|
+
readonly required: readonly ["memberOf"];
|
|
1227
|
+
}, {
|
|
1228
|
+
readonly properties: {
|
|
1229
|
+
readonly rule: {
|
|
1230
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
}];
|
|
1234
|
+
};
|
|
1235
|
+
readonly memberOf: {
|
|
1236
|
+
readonly properties: {
|
|
1237
|
+
readonly rule: {
|
|
1238
|
+
readonly const: "credential";
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
readonly not: {
|
|
1242
|
+
readonly required: readonly ["listed"];
|
|
1243
|
+
};
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1246
|
+
};
|
|
1247
|
+
readonly SecrecyLevel: {
|
|
1248
|
+
readonly title: "SecrecyLevel";
|
|
1249
|
+
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).";
|
|
1250
|
+
readonly type: "string";
|
|
1251
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
1252
|
+
};
|
|
1253
|
+
readonly Question: {
|
|
1254
|
+
readonly title: "Question";
|
|
1255
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
1256
|
+
readonly oneOf: readonly [{
|
|
1257
|
+
readonly title: "ChoiceQuestion";
|
|
1258
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
1259
|
+
readonly type: "object";
|
|
1260
|
+
readonly additionalProperties: false;
|
|
1261
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
1262
|
+
readonly properties: {
|
|
1263
|
+
readonly key: {
|
|
1264
|
+
readonly $ref: "#/$defs/Key";
|
|
1265
|
+
};
|
|
1266
|
+
readonly type: {
|
|
1267
|
+
readonly const: "choice";
|
|
1268
|
+
};
|
|
1269
|
+
readonly text: {
|
|
1270
|
+
readonly type: "string";
|
|
1271
|
+
readonly maxLength: 2048;
|
|
1272
|
+
};
|
|
1273
|
+
readonly options: {
|
|
1274
|
+
readonly type: "array";
|
|
1275
|
+
readonly minItems: 2;
|
|
1276
|
+
readonly maxItems: 256;
|
|
1277
|
+
readonly items: {
|
|
1278
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
readonly minSelections: {
|
|
1282
|
+
readonly type: "integer";
|
|
1283
|
+
readonly minimum: 0;
|
|
1284
|
+
};
|
|
1285
|
+
readonly maxSelections: {
|
|
1286
|
+
readonly type: "integer";
|
|
1287
|
+
readonly minimum: 1;
|
|
1288
|
+
};
|
|
1289
|
+
readonly optional: {
|
|
1290
|
+
readonly type: "boolean";
|
|
1291
|
+
};
|
|
1292
|
+
};
|
|
1293
|
+
}, {
|
|
1294
|
+
readonly title: "RankingQuestion";
|
|
1295
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
1296
|
+
readonly type: "object";
|
|
1297
|
+
readonly additionalProperties: false;
|
|
1298
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
1299
|
+
readonly properties: {
|
|
1300
|
+
readonly key: {
|
|
1301
|
+
readonly $ref: "#/$defs/Key";
|
|
1302
|
+
};
|
|
1303
|
+
readonly type: {
|
|
1304
|
+
readonly const: "ranking";
|
|
1305
|
+
};
|
|
1306
|
+
readonly text: {
|
|
1307
|
+
readonly type: "string";
|
|
1308
|
+
readonly maxLength: 2048;
|
|
1309
|
+
};
|
|
1310
|
+
readonly options: {
|
|
1311
|
+
readonly type: "array";
|
|
1312
|
+
readonly minItems: 2;
|
|
1313
|
+
readonly maxItems: 64;
|
|
1314
|
+
readonly items: {
|
|
1315
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1316
|
+
};
|
|
1317
|
+
};
|
|
1318
|
+
readonly partial: {
|
|
1319
|
+
readonly type: "boolean";
|
|
1320
|
+
};
|
|
1321
|
+
readonly optional: {
|
|
1322
|
+
readonly type: "boolean";
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
}, {
|
|
1326
|
+
readonly title: "ScoreQuestion";
|
|
1327
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
1328
|
+
readonly type: "object";
|
|
1329
|
+
readonly additionalProperties: false;
|
|
1330
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
1331
|
+
readonly properties: {
|
|
1332
|
+
readonly key: {
|
|
1333
|
+
readonly $ref: "#/$defs/Key";
|
|
1334
|
+
};
|
|
1335
|
+
readonly type: {
|
|
1336
|
+
readonly const: "score";
|
|
1337
|
+
};
|
|
1338
|
+
readonly text: {
|
|
1339
|
+
readonly type: "string";
|
|
1340
|
+
readonly maxLength: 2048;
|
|
1341
|
+
};
|
|
1342
|
+
readonly options: {
|
|
1343
|
+
readonly type: "array";
|
|
1344
|
+
readonly minItems: 1;
|
|
1345
|
+
readonly maxItems: 256;
|
|
1346
|
+
readonly items: {
|
|
1347
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1348
|
+
};
|
|
1349
|
+
};
|
|
1350
|
+
readonly min: {
|
|
1351
|
+
readonly type: "integer";
|
|
1352
|
+
};
|
|
1353
|
+
readonly max: {
|
|
1354
|
+
readonly type: "integer";
|
|
1355
|
+
};
|
|
1356
|
+
readonly optional: {
|
|
1357
|
+
readonly type: "boolean";
|
|
1358
|
+
};
|
|
1359
|
+
};
|
|
1360
|
+
}, {
|
|
1361
|
+
readonly title: "TextQuestion";
|
|
1362
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
1363
|
+
readonly type: "object";
|
|
1364
|
+
readonly additionalProperties: false;
|
|
1365
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
1366
|
+
readonly properties: {
|
|
1367
|
+
readonly key: {
|
|
1368
|
+
readonly $ref: "#/$defs/Key";
|
|
1369
|
+
};
|
|
1370
|
+
readonly type: {
|
|
1371
|
+
readonly const: "text";
|
|
1372
|
+
};
|
|
1373
|
+
readonly text: {
|
|
1374
|
+
readonly type: "string";
|
|
1375
|
+
readonly maxLength: 2048;
|
|
1376
|
+
};
|
|
1377
|
+
readonly maxLength: {
|
|
1378
|
+
readonly type: "integer";
|
|
1379
|
+
readonly minimum: 1;
|
|
1380
|
+
readonly maximum: 4096;
|
|
1381
|
+
};
|
|
1382
|
+
readonly optional: {
|
|
1383
|
+
readonly type: "boolean";
|
|
1384
|
+
};
|
|
1385
|
+
};
|
|
1386
|
+
}];
|
|
1387
|
+
};
|
|
1388
|
+
readonly Key: {
|
|
1389
|
+
readonly title: "Key";
|
|
1390
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
1391
|
+
readonly type: "string";
|
|
1392
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
1393
|
+
};
|
|
1394
|
+
readonly QuestionOption: {
|
|
1395
|
+
readonly title: "QuestionOption";
|
|
1396
|
+
readonly type: "object";
|
|
1397
|
+
readonly additionalProperties: false;
|
|
1398
|
+
readonly required: readonly ["key"];
|
|
1399
|
+
readonly properties: {
|
|
1400
|
+
readonly key: {
|
|
1401
|
+
readonly $ref: "#/$defs/Key";
|
|
1402
|
+
};
|
|
1403
|
+
readonly label: {
|
|
1404
|
+
readonly type: "string";
|
|
1405
|
+
readonly maxLength: 512;
|
|
1406
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
};
|
|
1410
|
+
readonly ElectionId: {
|
|
1411
|
+
readonly title: "ElectionId";
|
|
1412
|
+
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.";
|
|
1413
|
+
readonly type: "string";
|
|
1414
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
1415
|
+
};
|
|
1416
|
+
readonly ElectionSummary: {
|
|
1417
|
+
readonly title: "ElectionSummary";
|
|
1418
|
+
readonly description: "A ballot box's view of one election.";
|
|
1419
|
+
readonly type: "object";
|
|
1420
|
+
readonly additionalProperties: false;
|
|
1421
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
1422
|
+
readonly properties: {
|
|
1423
|
+
readonly electionId: {
|
|
1424
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1425
|
+
};
|
|
1426
|
+
readonly community: {
|
|
1427
|
+
readonly type: "string";
|
|
1428
|
+
readonly minLength: 1;
|
|
1429
|
+
readonly maxLength: 2048;
|
|
1430
|
+
};
|
|
1431
|
+
readonly manifestDigest: {
|
|
1432
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1433
|
+
};
|
|
1434
|
+
readonly state: {
|
|
1435
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
1436
|
+
};
|
|
1437
|
+
readonly ballotsAdmitted: {
|
|
1438
|
+
readonly type: "integer";
|
|
1439
|
+
readonly minimum: 0;
|
|
1440
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
1441
|
+
};
|
|
1442
|
+
readonly head: {
|
|
1443
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
readonly BoardHead: {
|
|
1448
|
+
readonly title: "BoardHead";
|
|
1449
|
+
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.";
|
|
1450
|
+
readonly type: "object";
|
|
1451
|
+
readonly additionalProperties: false;
|
|
1452
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
1453
|
+
readonly properties: {
|
|
1454
|
+
readonly electionId: {
|
|
1455
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1456
|
+
};
|
|
1457
|
+
readonly treeSize: {
|
|
1458
|
+
readonly type: "integer";
|
|
1459
|
+
readonly minimum: 0;
|
|
1460
|
+
};
|
|
1461
|
+
readonly rootHash: {
|
|
1462
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1463
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
1464
|
+
};
|
|
1465
|
+
readonly issuedAt: {
|
|
1466
|
+
readonly type: "string";
|
|
1467
|
+
readonly format: "date-time";
|
|
1468
|
+
};
|
|
1469
|
+
};
|
|
1470
|
+
};
|
|
1471
|
+
readonly DigestMultibase: {
|
|
1472
|
+
readonly title: "DigestMultibase";
|
|
1473
|
+
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`.";
|
|
1474
|
+
readonly type: "string";
|
|
1475
|
+
readonly minLength: 16;
|
|
1476
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
1477
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
1478
|
+
};
|
|
1479
|
+
readonly ElectionState: {
|
|
1480
|
+
readonly title: "ElectionState";
|
|
1481
|
+
readonly type: "string";
|
|
1482
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
/**
|
|
1488
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
1489
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
1490
|
+
* parties (§7.3 item 5).
|
|
1491
|
+
*/
|
|
1492
|
+
export declare const RESPONSE_SPEC: {
|
|
1493
|
+
readonly typeUri: "https://trusttasks.org/spec/voting/election/show/0.4#response";
|
|
1494
|
+
readonly isBearer: false;
|
|
1495
|
+
readonly isProofRequired: true;
|
|
1496
|
+
readonly isRecipientRequired: false;
|
|
1497
|
+
readonly isIssuedAtRequired: false;
|
|
1498
|
+
readonly payloadSchema: {
|
|
1499
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1500
|
+
readonly $ref: "#/$defs/Response";
|
|
1501
|
+
readonly $defs: {
|
|
1502
|
+
readonly Response: {
|
|
1503
|
+
readonly $anchor: "response";
|
|
1504
|
+
readonly title: "Voting — Election Show — response payload";
|
|
1505
|
+
readonly type: "object";
|
|
1506
|
+
readonly additionalProperties: false;
|
|
1507
|
+
readonly required: readonly ["election"];
|
|
1508
|
+
readonly properties: {
|
|
1509
|
+
readonly election: {
|
|
1510
|
+
readonly $ref: "#/$defs/ElectionSummary";
|
|
1511
|
+
};
|
|
1512
|
+
readonly manifest: {
|
|
1513
|
+
readonly $ref: "#/$defs/Manifest";
|
|
1514
|
+
readonly description: "The registered manifest, exactly as registered. Present when the board is public or the caller may read the private board.";
|
|
1515
|
+
};
|
|
1516
|
+
readonly ext: {
|
|
1517
|
+
readonly $ref: "#/$defs/Ext";
|
|
1518
|
+
};
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
readonly Ext: {
|
|
1522
|
+
readonly title: "Ext";
|
|
1523
|
+
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.";
|
|
1524
|
+
readonly type: "object";
|
|
1525
|
+
readonly minProperties: 1;
|
|
1526
|
+
readonly additionalProperties: true;
|
|
1527
|
+
readonly propertyNames: {
|
|
1528
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1531
|
+
readonly Manifest: {
|
|
1532
|
+
readonly title: "Manifest";
|
|
1533
|
+
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).";
|
|
1534
|
+
readonly type: "object";
|
|
1535
|
+
readonly additionalProperties: false;
|
|
1536
|
+
readonly required: readonly ["electionId", "community", "questions", "secrecy", "roll", "registrationOpensAt", "votingOpensAt", "votingClosesAt", "revote", "board", "ballotBox", "binding", "allowEarlyClose", "resultsBeforeClose", "textReleaseThreshold"];
|
|
1537
|
+
readonly properties: {
|
|
1538
|
+
readonly electionId: {
|
|
1539
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1540
|
+
};
|
|
1541
|
+
readonly community: {
|
|
1542
|
+
readonly type: "string";
|
|
1543
|
+
readonly minLength: 1;
|
|
1544
|
+
readonly maxLength: 2048;
|
|
1545
|
+
readonly description: "The community's DID.";
|
|
1546
|
+
};
|
|
1547
|
+
readonly title: {
|
|
1548
|
+
readonly type: "string";
|
|
1549
|
+
readonly maxLength: 512;
|
|
1550
|
+
};
|
|
1551
|
+
readonly description: {
|
|
1552
|
+
readonly type: "string";
|
|
1553
|
+
readonly maxLength: 8192;
|
|
1554
|
+
};
|
|
1555
|
+
readonly questions: {
|
|
1556
|
+
readonly type: "array";
|
|
1557
|
+
readonly minItems: 1;
|
|
1558
|
+
readonly maxItems: 128;
|
|
1559
|
+
readonly items: {
|
|
1560
|
+
readonly $ref: "#/$defs/Question";
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
readonly secrecy: {
|
|
1564
|
+
readonly $ref: "#/$defs/SecrecyLevel";
|
|
1565
|
+
};
|
|
1566
|
+
readonly roll: {
|
|
1567
|
+
readonly $ref: "#/$defs/RollRule";
|
|
1568
|
+
};
|
|
1569
|
+
readonly registrationOpensAt: {
|
|
1570
|
+
readonly type: "string";
|
|
1571
|
+
readonly format: "date-time";
|
|
1572
|
+
};
|
|
1573
|
+
readonly votingOpensAt: {
|
|
1574
|
+
readonly type: "string";
|
|
1575
|
+
readonly format: "date-time";
|
|
1576
|
+
};
|
|
1577
|
+
readonly votingClosesAt: {
|
|
1578
|
+
readonly type: "string";
|
|
1579
|
+
readonly format: "date-time";
|
|
1580
|
+
};
|
|
1581
|
+
readonly revote: {
|
|
1582
|
+
readonly $ref: "#/$defs/Revote";
|
|
1583
|
+
};
|
|
1584
|
+
readonly board: {
|
|
1585
|
+
readonly type: "object";
|
|
1586
|
+
readonly additionalProperties: false;
|
|
1587
|
+
readonly required: readonly ["visibility", "auditors"];
|
|
1588
|
+
readonly properties: {
|
|
1589
|
+
readonly visibility: {
|
|
1590
|
+
readonly $ref: "#/$defs/BoardVisibility";
|
|
1591
|
+
};
|
|
1592
|
+
readonly auditors: {
|
|
1593
|
+
readonly type: "array";
|
|
1594
|
+
readonly items: {
|
|
1595
|
+
readonly type: "string";
|
|
1596
|
+
readonly minLength: 1;
|
|
1597
|
+
readonly maxLength: 2048;
|
|
1598
|
+
};
|
|
1599
|
+
readonly uniqueItems: true;
|
|
1600
|
+
};
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
readonly ballotBox: {
|
|
1604
|
+
readonly type: "string";
|
|
1605
|
+
readonly minLength: 1;
|
|
1606
|
+
readonly maxLength: 2048;
|
|
1607
|
+
readonly description: "The DID of the voting service that holds the board.";
|
|
1608
|
+
};
|
|
1609
|
+
readonly trustees: {
|
|
1610
|
+
readonly $ref: "#/$defs/Trustees";
|
|
1611
|
+
};
|
|
1612
|
+
readonly binding: {
|
|
1613
|
+
readonly type: "boolean";
|
|
1614
|
+
readonly description: "Whether the community treats the result as deciding something; creating a binding election takes another administrator's consent (VTI-VOT-081).";
|
|
1615
|
+
};
|
|
1616
|
+
readonly allowEarlyClose: {
|
|
1617
|
+
readonly type: "boolean";
|
|
1618
|
+
};
|
|
1619
|
+
readonly resultsBeforeClose: {
|
|
1620
|
+
readonly type: "boolean";
|
|
1621
|
+
readonly description: "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061).";
|
|
1622
|
+
};
|
|
1623
|
+
readonly textReleaseThreshold: {
|
|
1624
|
+
readonly type: "integer";
|
|
1625
|
+
readonly minimum: 1;
|
|
1626
|
+
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).";
|
|
1627
|
+
};
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
readonly Trustees: {
|
|
1631
|
+
readonly title: "Trustees";
|
|
1632
|
+
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.";
|
|
1633
|
+
readonly type: "object";
|
|
1634
|
+
readonly additionalProperties: false;
|
|
1635
|
+
readonly required: readonly ["dids", "threshold"];
|
|
1636
|
+
readonly properties: {
|
|
1637
|
+
readonly dids: {
|
|
1638
|
+
readonly type: "array";
|
|
1639
|
+
readonly minItems: 2;
|
|
1640
|
+
readonly items: {
|
|
1641
|
+
readonly type: "string";
|
|
1642
|
+
readonly minLength: 1;
|
|
1643
|
+
readonly maxLength: 2048;
|
|
1644
|
+
};
|
|
1645
|
+
readonly uniqueItems: true;
|
|
1646
|
+
};
|
|
1647
|
+
readonly threshold: {
|
|
1648
|
+
readonly type: "integer";
|
|
1649
|
+
readonly minimum: 2;
|
|
1650
|
+
};
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
readonly BoardVisibility: {
|
|
1654
|
+
readonly title: "BoardVisibility";
|
|
1655
|
+
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).";
|
|
1656
|
+
readonly type: "string";
|
|
1657
|
+
readonly enum: readonly ["public", "private"];
|
|
1658
|
+
};
|
|
1659
|
+
readonly Revote: {
|
|
1660
|
+
readonly title: "Revote";
|
|
1661
|
+
readonly description: "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).";
|
|
1662
|
+
readonly type: "string";
|
|
1663
|
+
readonly enum: readonly ["replace", "refuse"];
|
|
1664
|
+
};
|
|
1665
|
+
readonly RollRule: {
|
|
1666
|
+
readonly title: "RollRule";
|
|
1667
|
+
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.";
|
|
1668
|
+
readonly type: "object";
|
|
1669
|
+
readonly additionalProperties: false;
|
|
1670
|
+
readonly required: readonly ["rule"];
|
|
1671
|
+
readonly properties: {
|
|
1672
|
+
readonly rule: {
|
|
1673
|
+
readonly type: "string";
|
|
1674
|
+
readonly enum: readonly ["members", "membersAndListed", "listed", "credential"];
|
|
1675
|
+
};
|
|
1676
|
+
readonly listed: {
|
|
1677
|
+
readonly type: "array";
|
|
1678
|
+
readonly items: {
|
|
1679
|
+
readonly type: "string";
|
|
1680
|
+
readonly minLength: 1;
|
|
1681
|
+
readonly maxLength: 2048;
|
|
1682
|
+
readonly description: "A DID enfranchised by name.";
|
|
1683
|
+
};
|
|
1684
|
+
readonly uniqueItems: true;
|
|
1685
|
+
};
|
|
1686
|
+
readonly memberOf: {
|
|
1687
|
+
readonly type: "string";
|
|
1688
|
+
readonly minLength: 8;
|
|
1689
|
+
readonly maxLength: 2048;
|
|
1690
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
1691
|
+
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).";
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
readonly dependentSchemas: {
|
|
1695
|
+
readonly rule: {
|
|
1696
|
+
readonly anyOf: readonly [{
|
|
1697
|
+
readonly required: readonly ["memberOf"];
|
|
1698
|
+
}, {
|
|
1699
|
+
readonly properties: {
|
|
1700
|
+
readonly rule: {
|
|
1701
|
+
readonly enum: readonly ["members", "membersAndListed", "listed"];
|
|
1702
|
+
};
|
|
1703
|
+
};
|
|
1704
|
+
}];
|
|
1705
|
+
};
|
|
1706
|
+
readonly memberOf: {
|
|
1707
|
+
readonly properties: {
|
|
1708
|
+
readonly rule: {
|
|
1709
|
+
readonly const: "credential";
|
|
1710
|
+
};
|
|
1711
|
+
};
|
|
1712
|
+
readonly not: {
|
|
1713
|
+
readonly required: readonly ["listed"];
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
readonly SecrecyLevel: {
|
|
1719
|
+
readonly title: "SecrecyLevel";
|
|
1720
|
+
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).";
|
|
1721
|
+
readonly type: "string";
|
|
1722
|
+
readonly enum: readonly ["open", "sealed", "talliedEncrypted"];
|
|
1723
|
+
};
|
|
1724
|
+
readonly Question: {
|
|
1725
|
+
readonly title: "Question";
|
|
1726
|
+
readonly description: "One question. Tagged union over `type`.";
|
|
1727
|
+
readonly oneOf: readonly [{
|
|
1728
|
+
readonly title: "ChoiceQuestion";
|
|
1729
|
+
readonly description: "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.";
|
|
1730
|
+
readonly type: "object";
|
|
1731
|
+
readonly additionalProperties: false;
|
|
1732
|
+
readonly required: readonly ["key", "type", "options", "minSelections", "maxSelections", "optional"];
|
|
1733
|
+
readonly properties: {
|
|
1734
|
+
readonly key: {
|
|
1735
|
+
readonly $ref: "#/$defs/Key";
|
|
1736
|
+
};
|
|
1737
|
+
readonly type: {
|
|
1738
|
+
readonly const: "choice";
|
|
1739
|
+
};
|
|
1740
|
+
readonly text: {
|
|
1741
|
+
readonly type: "string";
|
|
1742
|
+
readonly maxLength: 2048;
|
|
1743
|
+
};
|
|
1744
|
+
readonly options: {
|
|
1745
|
+
readonly type: "array";
|
|
1746
|
+
readonly minItems: 2;
|
|
1747
|
+
readonly maxItems: 256;
|
|
1748
|
+
readonly items: {
|
|
1749
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1750
|
+
};
|
|
1751
|
+
};
|
|
1752
|
+
readonly minSelections: {
|
|
1753
|
+
readonly type: "integer";
|
|
1754
|
+
readonly minimum: 0;
|
|
1755
|
+
};
|
|
1756
|
+
readonly maxSelections: {
|
|
1757
|
+
readonly type: "integer";
|
|
1758
|
+
readonly minimum: 1;
|
|
1759
|
+
};
|
|
1760
|
+
readonly optional: {
|
|
1761
|
+
readonly type: "boolean";
|
|
1762
|
+
};
|
|
1763
|
+
};
|
|
1764
|
+
}, {
|
|
1765
|
+
readonly title: "RankingQuestion";
|
|
1766
|
+
readonly description: "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.";
|
|
1767
|
+
readonly type: "object";
|
|
1768
|
+
readonly additionalProperties: false;
|
|
1769
|
+
readonly required: readonly ["key", "type", "options", "partial", "optional"];
|
|
1770
|
+
readonly properties: {
|
|
1771
|
+
readonly key: {
|
|
1772
|
+
readonly $ref: "#/$defs/Key";
|
|
1773
|
+
};
|
|
1774
|
+
readonly type: {
|
|
1775
|
+
readonly const: "ranking";
|
|
1776
|
+
};
|
|
1777
|
+
readonly text: {
|
|
1778
|
+
readonly type: "string";
|
|
1779
|
+
readonly maxLength: 2048;
|
|
1780
|
+
};
|
|
1781
|
+
readonly options: {
|
|
1782
|
+
readonly type: "array";
|
|
1783
|
+
readonly minItems: 2;
|
|
1784
|
+
readonly maxItems: 64;
|
|
1785
|
+
readonly items: {
|
|
1786
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1787
|
+
};
|
|
1788
|
+
};
|
|
1789
|
+
readonly partial: {
|
|
1790
|
+
readonly type: "boolean";
|
|
1791
|
+
};
|
|
1792
|
+
readonly optional: {
|
|
1793
|
+
readonly type: "boolean";
|
|
1794
|
+
};
|
|
1795
|
+
};
|
|
1796
|
+
}, {
|
|
1797
|
+
readonly title: "ScoreQuestion";
|
|
1798
|
+
readonly description: "Give each option an integer score within [min, max].";
|
|
1799
|
+
readonly type: "object";
|
|
1800
|
+
readonly additionalProperties: false;
|
|
1801
|
+
readonly required: readonly ["key", "type", "options", "min", "max", "optional"];
|
|
1802
|
+
readonly properties: {
|
|
1803
|
+
readonly key: {
|
|
1804
|
+
readonly $ref: "#/$defs/Key";
|
|
1805
|
+
};
|
|
1806
|
+
readonly type: {
|
|
1807
|
+
readonly const: "score";
|
|
1808
|
+
};
|
|
1809
|
+
readonly text: {
|
|
1810
|
+
readonly type: "string";
|
|
1811
|
+
readonly maxLength: 2048;
|
|
1812
|
+
};
|
|
1813
|
+
readonly options: {
|
|
1814
|
+
readonly type: "array";
|
|
1815
|
+
readonly minItems: 1;
|
|
1816
|
+
readonly maxItems: 256;
|
|
1817
|
+
readonly items: {
|
|
1818
|
+
readonly $ref: "#/$defs/QuestionOption";
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
readonly min: {
|
|
1822
|
+
readonly type: "integer";
|
|
1823
|
+
};
|
|
1824
|
+
readonly max: {
|
|
1825
|
+
readonly type: "integer";
|
|
1826
|
+
};
|
|
1827
|
+
readonly optional: {
|
|
1828
|
+
readonly type: "boolean";
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
}, {
|
|
1832
|
+
readonly title: "TextQuestion";
|
|
1833
|
+
readonly description: "Free text of at most `maxLength` characters.";
|
|
1834
|
+
readonly type: "object";
|
|
1835
|
+
readonly additionalProperties: false;
|
|
1836
|
+
readonly required: readonly ["key", "type", "maxLength", "optional"];
|
|
1837
|
+
readonly properties: {
|
|
1838
|
+
readonly key: {
|
|
1839
|
+
readonly $ref: "#/$defs/Key";
|
|
1840
|
+
};
|
|
1841
|
+
readonly type: {
|
|
1842
|
+
readonly const: "text";
|
|
1843
|
+
};
|
|
1844
|
+
readonly text: {
|
|
1845
|
+
readonly type: "string";
|
|
1846
|
+
readonly maxLength: 2048;
|
|
1847
|
+
};
|
|
1848
|
+
readonly maxLength: {
|
|
1849
|
+
readonly type: "integer";
|
|
1850
|
+
readonly minimum: 1;
|
|
1851
|
+
readonly maximum: 4096;
|
|
1852
|
+
};
|
|
1853
|
+
readonly optional: {
|
|
1854
|
+
readonly type: "boolean";
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
}];
|
|
1858
|
+
};
|
|
1859
|
+
readonly Key: {
|
|
1860
|
+
readonly title: "Key";
|
|
1861
|
+
readonly description: "A question or option key, unique within its manifest or question.";
|
|
1862
|
+
readonly type: "string";
|
|
1863
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
|
|
1864
|
+
};
|
|
1865
|
+
readonly QuestionOption: {
|
|
1866
|
+
readonly title: "QuestionOption";
|
|
1867
|
+
readonly type: "object";
|
|
1868
|
+
readonly additionalProperties: false;
|
|
1869
|
+
readonly required: readonly ["key"];
|
|
1870
|
+
readonly properties: {
|
|
1871
|
+
readonly key: {
|
|
1872
|
+
readonly $ref: "#/$defs/Key";
|
|
1873
|
+
};
|
|
1874
|
+
readonly label: {
|
|
1875
|
+
readonly type: "string";
|
|
1876
|
+
readonly maxLength: 512;
|
|
1877
|
+
readonly description: "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014).";
|
|
1878
|
+
};
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
readonly ElectionId: {
|
|
1882
|
+
readonly title: "ElectionId";
|
|
1883
|
+
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.";
|
|
1884
|
+
readonly type: "string";
|
|
1885
|
+
readonly pattern: "^[A-Za-z0-9._-]{1,128}$";
|
|
1886
|
+
};
|
|
1887
|
+
readonly ElectionSummary: {
|
|
1888
|
+
readonly title: "ElectionSummary";
|
|
1889
|
+
readonly description: "A ballot box's view of one election.";
|
|
1890
|
+
readonly type: "object";
|
|
1891
|
+
readonly additionalProperties: false;
|
|
1892
|
+
readonly required: readonly ["electionId", "community", "manifestDigest", "state", "ballotsAdmitted", "head"];
|
|
1893
|
+
readonly properties: {
|
|
1894
|
+
readonly electionId: {
|
|
1895
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1896
|
+
};
|
|
1897
|
+
readonly community: {
|
|
1898
|
+
readonly type: "string";
|
|
1899
|
+
readonly minLength: 1;
|
|
1900
|
+
readonly maxLength: 2048;
|
|
1901
|
+
};
|
|
1902
|
+
readonly manifestDigest: {
|
|
1903
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1904
|
+
};
|
|
1905
|
+
readonly state: {
|
|
1906
|
+
readonly $ref: "#/$defs/ElectionState";
|
|
1907
|
+
};
|
|
1908
|
+
readonly ballotsAdmitted: {
|
|
1909
|
+
readonly type: "integer";
|
|
1910
|
+
readonly minimum: 0;
|
|
1911
|
+
readonly description: "Distinct tags with a counted ballot.";
|
|
1912
|
+
};
|
|
1913
|
+
readonly head: {
|
|
1914
|
+
readonly $ref: "#/$defs/BoardHead";
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
readonly BoardHead: {
|
|
1919
|
+
readonly title: "BoardHead";
|
|
1920
|
+
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.";
|
|
1921
|
+
readonly type: "object";
|
|
1922
|
+
readonly additionalProperties: false;
|
|
1923
|
+
readonly required: readonly ["electionId", "treeSize", "rootHash", "issuedAt"];
|
|
1924
|
+
readonly properties: {
|
|
1925
|
+
readonly electionId: {
|
|
1926
|
+
readonly $ref: "#/$defs/ElectionId";
|
|
1927
|
+
};
|
|
1928
|
+
readonly treeSize: {
|
|
1929
|
+
readonly type: "integer";
|
|
1930
|
+
readonly minimum: 0;
|
|
1931
|
+
};
|
|
1932
|
+
readonly rootHash: {
|
|
1933
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1934
|
+
readonly description: "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash.";
|
|
1935
|
+
};
|
|
1936
|
+
readonly issuedAt: {
|
|
1937
|
+
readonly type: "string";
|
|
1938
|
+
readonly format: "date-time";
|
|
1939
|
+
};
|
|
1940
|
+
};
|
|
1941
|
+
};
|
|
1942
|
+
readonly DigestMultibase: {
|
|
1943
|
+
readonly title: "DigestMultibase";
|
|
1944
|
+
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`.";
|
|
1945
|
+
readonly type: "string";
|
|
1946
|
+
readonly minLength: 16;
|
|
1947
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
1948
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
1949
|
+
};
|
|
1950
|
+
readonly ElectionState: {
|
|
1951
|
+
readonly title: "ElectionState";
|
|
1952
|
+
readonly type: "string";
|
|
1953
|
+
readonly enum: readonly ["registered", "registration", "voting", "closed", "tallied", "cancelled"];
|
|
1954
|
+
};
|
|
1955
|
+
};
|
|
1956
|
+
};
|
|
1957
|
+
};
|
|
1958
|
+
//# sourceMappingURL=payload.d.ts.map
|