Skip to main content

Consensus Entities

The entities described here are used by the Consensus adapter.

Consensus interface

The Consensus interface implements a consensus barrier.

Properties

  • instantiated (boolean): Indicates whether the barrier has been initialized.
  • triggered (boolean): If true, all participants have arrived.
  • closed (boolean): Indicates whether the consensus has been finalized or terminated.
  • transparent (boolean): If true, the participants' decisions are submitted directly to the underlying simulation.
  • worldKey (string): A key identifying the world this consensus was created for.
  • name (string): Barrier name.
  • stage (string): Current stage of the barrier.
  • ttlSeconds (number): Total length of time in which all participants must arrive at the barrier.
  • secondsLeft (number): Remaining time before the lite limit expires.
  • expectedRoles (Record<string, unknown>): Participants expected to arrive at the barrier. The roles in this context are identified by a world persona and the number of participants with that persona.
  • impendingRoles (Record<string, unknown>): Those of the expected roles that haven't arrived yet.
  • arrivedRoles (Record<string, unknown>): Roles that have arrived at the barrier.
  • allowChannel (boolean): Indicates whether channel-based communication is permitted during the consensus process.