mirror of
https://github.com/fluencelabs/fluence-VRF
synced 2025-04-24 23:02:13 +00:00
24 lines
546 B
Plaintext
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();
|