sitemap.xml llms.txt
Skip to main content

Consensus Entities

The entities described here are used by the Consensus adapter.

BarrierReadOutView

Represents the read view of a consensus barrier and its current state.

Generics

  • R extends WorldRole = WorldRole - The role type used to categorize users interacting with the 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.
  • paused: boolean - Indicates whether the the timer for the barrier is currently paused.
  • 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<R, number>): 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<R, PseudonymReadOutView[]>): Those of the expected roles that haven't arrived yet.
  • arrivedRoles (Record<R, BarrierArrival[]>): Roles who have arrived at the barrier.
  • allowChannel: boolean - Indicates whether push channels are allowed for the barrier.

BarrierArrival

Represents a user's arrival at a barrier.

Properties

  • arrived: string - The timestamp indicating when the user arrived at the barrier.
  • message (string, optional): An optional message associated with the arrival.
  • user (PseudonymReadOutView): The user who arrived at the barrier.

BarrierMap

Represents a mapping of world identifiers to barrier definitions.

Properties

  • [worldKey: string] ({ name: string; stage: string }): A mapping where the key is a world identifier and the value contains the barrier name and stage.