roll

suspend fun roll(): Long

Run one full commit-reveal round and return the agreed seed.

Suspends until all peers have committed and then revealed. Throws CommitmentViolation if any peer reveals a secret that does not match its commitment hash.

Throws

if a peer's reveal does not match its commit.

if seam's own identity is not in peers, or if peers contains fewer than two participants.

if the seam tears or a required participant drains from the live peer set mid-round (the missing commit/reveal will never arrive).

CancellationException

if the coroutine is cancelled.