fluence-VRF/internal_API.txt

24 lines
546 B
Plaintext
Raw Permalink Normal View History

2019-04-13 17:02:03 +03:00
# start a new game
bool new_game(int N);
# add stake to the current game
2019-04-13 18:42:19 +03:00
bool add_stake(int stake_number, PK);
2019-04-13 17:02:03 +03:00
# information about participants of the current game
PK[] participants() const;
2019-04-13 17:18:55 +03:00
# stake of a participant (TODO: add special code for failure)
int get_stake(PK);
2019-04-13 18:42:19 +03:00
# get sequential game id
int game_id();
2019-04-13 17:02:03 +03:00
# reveal a part of a random
2019-04-13 18:42:19 +03:00
bool reveal(PK, signed(game_id()));
2019-04-13 17:02:03 +03:00
# 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();