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