Skip to content

Reference

tilttek/raffle
TypeRole
RafflesOpens, takes entries, seals, draws and gives the announcement and the proof
RaffleA raffle as the store keeps it, at a version; written and read back as plain values
StakePrize or None: what a raffle puts at stake, which decides its source
SeedSourceBeacon or CommitReveal
RaffleStatusOpen, Sealed or Drawn
AnnouncementWhat is published when the entries close
RaffleProofEverything a player needs to draw again, written and read as JSON; the place of each name drawn
RaffleVerifierLists the faults of a proof
Beacon\BeaconOne round of a beacon, its randomness checked against its signature
Beacon\BeaconChainA chain of a beacon: hash, genesis, period, scheme and public key; the times of its rounds
Beacon\BeaconVerificationSignature or RelayQuorum: how a round was checked
Beacon\RelayReportWhat every relay gave to one read, the quorum and whether the read was kept
Beacon\RelayOutcomeWhat one relay gave: Agreed, Disagreed, Invalid, Status, TooLarge, TimedOut, Unreachable or Incomplete
Contract\RandomnessBeaconA public randomness beacon
Contract\BeaconSignatureVerifierVerifies the signature of a round
Contract\RaffleStoreWhere the raffles and their entrants are kept
Drand\DrandBeacondrand read from several relays through Symfony HttpClient
Drand\DrandChainsThe public chains of drand, and its relays
Drand\DrandSchemeThe signature schemes of drand, and the message a round signs
Event\RaffleDrawnDispatched once a raffle is drawn, with its identifier
Event\BeaconRelaysReadDispatched after each read of the drand relays, with the chain's hash and the report
Store\InMemoryRaffleStoreThe store in memory, for tests and scripts
Exception\RaffleExceptionThe interface of every exception of the library
Exception\InvalidRaffle, RaffleRefused, RaffleConflict, BeaconUnavailable, BeaconRefusedSee Exceptions

Encoding, Entrants, Instant, Selection, SystemClock and Drand\DrandResponse are internal.