RNG Gaming Solana Program
Last updated
Last updated
The RNG Gaming Program on Solana is designed to facilitate the creation and management of games. The RNG Gaming Program includes functionalities for linking Solana addresses to Telegram Ids, approving token transfer limits, creating new games, and ending games.
The RNG Gaming Program contains three functions:
link_and_approve: this function saves a secret id provided to the user during the onboarding onto Solana, effectively linking a users Telegram ID to their Solana address. This function also max approves the RNG Escrow Account to move RNG tokens on behalf of the user.
create_new_game: this function creates a new game PDA (program derived account) onto Solana with the following data; telegram id, revolver size, player bets, players, hashed bullet index, game number, and a bump. This function saves essential game data at the beginning of every game played in Telegram. The data saved in this transaction include the hashed position of the bullet in the revolver, a critical piece of information needed at the start of every game to ensure a verifiable random outcome.
end_game: this function creates an end game PDA (program derived account) onto Solana with the following data; telegram id, beta, salt, public key, proof, alpha, loser index, game number, seed hash, and a bump. This function saves essential game data at the end of every game played in Telegram. The data saved in this transaction proves the verifiable randomness of the game.
RNG Solana Program Address: Abk9Mbm3dpGkrcb7Y5TsHv17vaHUJ4zGtQ2GjbtHnu91