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.

CancellationException

if the coroutine is cancelled (e.g. no-reveal peer stalls the round — apply an outer timeout).