fairdraw
v0.1.0Provably 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.
| Parameter | Type | Description |
|---|---|---|
entrants * | array | The entrant names. Duplicates are removed and the list is sorted before ranking. |
winners | integer | How 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.
| Parameter | Type | Description |
|---|---|---|
delay_sec * | integer | Seconds from now until the draw reveals. Must be a positive integer. |
entrants * | array | The entrant names. Duplicates are removed and the list is sorted before ranking. |
title * | string | A non-empty title for the draw. |
winners | integer | How 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | The draw id returned by create_scheduled_draw. |