fairdraw

v0.1.0
io.github.CloudCorpRecords/fairdraw Checked 2 days ago Published 1 month ago

Provably fair raffle draws: winners picked from public drand randomness, verifiable by anyone.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pick_winner_now

Instantly pick a provably-fair winner (or winners) from a list. Uses the latest drand round, so it's immediate and verifiable.

ParameterTypeDescription
entrants *arrayThe entrant names. Duplicates are removed and the list is sorted before ranking.
winnersintegerHow many winners to pick. Defaults to 1; must be between 1 and the number of entrants.

create_scheduled_draw

Create a draw that reveals at a future time, with the randomness round committed the instant you create it.

ParameterTypeDescription
delay_sec *integerSeconds from now until the draw reveals. Must be a positive integer.
entrants *arrayThe entrant names. Duplicates are removed and the list is sorted before ranking.
title *stringA non-empty title for the draw.
winnersintegerHow many winners to pick. Defaults to 1; must be between 1 and the number of entrants.

verify_draw

Fetch the current state and verified result of a scheduled draw by id.

ParameterTypeDescription
id *stringThe draw id returned by create_scheduled_draw.