From 18387cb68094b167a30371b62beda93627c2c467 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 22:25:47 +0000 Subject: api: a vote by hand, through the node that votes for its party A party that has a node vote by itself votes by hand only through that node, which keeps its one record (`docs/federation.md`, Votes a node casts by itself): `POST /admin/events/vote`, `{"proposal": , "yes": }`, by the record and, with a `true`, by the voters' rule; signed with the party's key the node keeps, recorded, and put. Refused (`422`) where the record or the rule forbids it, or the node votes for no party. Putting an event through the API puts it into the document as the node's own votes are put (`held::write`). --- docs/openapi.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'docs/openapi.yaml') diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 1bb69e3..c99cb65 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1649,6 +1649,46 @@ paths: $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' + /admin/events/vote: + post: + tags: [Events] + summary: Vote by hand, through the node that votes for its party + description: | + A vote by hand through this node, which votes for its party by itself + (`--store-vote-key`) and keeps its party's one record of its votes: `yes` on the + proposal of hash `proposal` on the current version, by that record (one `true` at + a time, never `true` and `false` on one proposal, a `true` only for a version) and, + with a `true` on a version naming a checkpoint, by the voters' rule (it changes + nothing else, and its heads leave out nothing the node held for a while before it + was proposed). Signed with the party's key the node keeps, recorded, and put. + Needs `write` on `_continuum`. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [proposal, yes] + properties: + proposal: + type: string + yes: + type: boolean + responses: + '200': + description: Cast; `id` is the vote's. + content: + application/json: + schema: + type: object + required: [id] + properties: + id: + type: string + '400': + $ref: '#/components/responses/Error' + '422': + $ref: '#/components/responses/Error' /admin/remakes: get: tags: [Remakes] -- cgit v1.3.1