fluence-VRF/internal_API.txt
2019-04-13 18:42:19 +03:00

24 lines
546 B
Plaintext

# start a new game
bool new_game(int N);
# add stake to the current game
bool add_stake(int stake_number, PK);
# information about participants of the current game
PK[] participants() const;
# stake of a participant (TODO: add special code for failure)
int get_stake(PK);
# get sequential game id
int game_id();
# reveal a part of a random
bool reveal(PK, signed(game_id()));
# result of the current game of some participant
bool is_winner(PK);
# state of the game (0 - not started, 1 - gathering stakes, 2 - revealing)
int game_status();