From 0aa00a855bd8d93f4ac2c04ef0fe23b846831bbc Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 21:51:45 +0000 Subject: continuum-party: a party's client of a federation A second binary, behind the `federation` feature: a party's client, which signs its party's events with one of its keys (`--key`, an OpenSSH private key file), puts them through a node's API (`--node`, its user and password in the URL, or `--token`), and keeps its party's record (`--record`), by which it votes, written before a vote is sent (`federation::party`, run by `continuum::party`): * `init PARTY` begins a record of `PARTY` on the version current now; * `write PATH VALUE`, `keys KEY...`, `nodes NODE...` and `propose FILE` sign events on the node's heads, recorded, and put; * `vote PROPOSAL yes|no` votes on the proposal of that hash on the current version, by the record: with a `true`, the votes on its party's earlier proposal, from the node, checked, kept as the nays that freed it; * `again` signs again, of the latest event it signed at each place, its key set and its node list, what the node refuses as not above its checkpoint's heads, or as built on one it refuses; * `twice RECORD...` names, from the records of parties' clients, a party that voted twice. The feature brings reqwest along, the client's HTTP. --- src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 323bbc1..c3bfac9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,7 @@ //! continuum: a replicated Automerge document, read and written by path, synchronized -//! over Mycelium, libp2p or Tor; as a library, which the node (`main.rs`) runs (`run`). +//! over Mycelium, libp2p or Tor; as a library, which the node (`main.rs`) runs (`run`), +//! and, behind the `federation` feature, a party's client (`bin/continuum-party.rs`, +//! `party`). //! //! `run` only wires things together: arguments, the starting document, the node //! (`node`), bootstrap and the HTTP server. @@ -42,6 +44,12 @@ use document::replica::Epoch; use swarm::bootstrap; use transport::Transport; +/// Runs a party's client of a federation (`continuum-party`), as its arguments say. +#[cfg(feature = "federation")] +pub async fn party() -> Result<()> { + federation::party::main().await +} + /// Runs a node, as its arguments and configuration say, until it stops. pub async fn run() -> Result<()> { logging::init(); -- cgit v1.3.1