{ "address": "3EB6JJ2k1yPdg9qokViBdSWq4jaEVG4wiKbS8Pw3FmWQ", "metadata": { "name": "riverproof", "version": "0.1.0", "spec": "0.1.0", "description": "Hash Holdem on-chain Texas hold'em" }, "instructions": [ { "name": "abandon_mental_deal", "docs": [ "Permissionless crank: unsticks a hand whose cards stopped arriving." ], "discriminator": [ 15, 72, 196, 75, 229, 193, 13, 131 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "act", "docs": [ "Applies one betting action, signed by the wallet or a session key." ], "discriminator": [ 114, 158, 229, 112, 242, 50, 227, 5 ], "accounts": [ { "name": "signer", "docs": [ "Either the seat's wallet or an authorized session key." ], "signer": true }, { "name": "session", "docs": [ "Present only when acting through a session key." ], "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "action", "type": { "defined": { "name": "PokerAction" } } }, { "name": "expected_hand_id", "type": "u64" }, { "name": "expected_version", "type": "u32" } ] }, { "name": "activate_poker_tournament", "discriminator": [ 228, 92, 179, 249, 255, 14, 204, 242 ], "accounts": [ { "name": "cranker", "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "table_a", "writable": true }, { "name": "table_b", "writable": true }, { "name": "table_c", "writable": true }, { "name": "state_a", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_a" } ] } }, { "name": "state_b", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_b" } ] } }, { "name": "state_c", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_c" } ] } }, { "name": "table_d", "writable": true }, { "name": "state_d", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_d" } ] } } ], "args": [] }, { "name": "authorize_session", "docs": [ "Authorizes an ephemeral key to act for this wallet at one table." ], "discriminator": [ 187, 218, 251, 161, 99, 40, 34, 34 ], "accounts": [ { "name": "wallet", "docs": [ "The real wallet. A session key may never authorize another session key." ], "writable": true, "signer": true }, { "name": "config" }, { "name": "session", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "wallet" }, { "kind": "account", "path": "config" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "session_key", "type": "pubkey" }, { "name": "expiry", "type": "i64" } ] }, { "name": "bind_poker_arena", "discriminator": [ 63, 145, 241, 124, 204, 246, 177, 179 ], "accounts": [ { "name": "operator", "writable": true, "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "operator" } ] } }, { "name": "table_a", "writable": true }, { "name": "table_b", "writable": true }, { "name": "table_c", "writable": true }, { "name": "state_a", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_a" } ] } }, { "name": "state_b", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_b" } ] } }, { "name": "state_c", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_c" } ] } }, { "name": "pot_a", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "table_a" } ] } }, { "name": "pot_b", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "table_b" } ] } }, { "name": "pot_c", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "table_c" } ] } }, { "name": "bank_program" }, { "name": "bank" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "table_d", "writable": true }, { "name": "state_d", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_d" } ] } }, { "name": "pot_d", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "table_d" } ] } } ], "args": [] }, { "name": "change_username", "docs": [ "Releases the current username claim and takes a new one." ], "discriminator": [ 122, 228, 203, 143, 188, 195, 189, 130 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true, "relations": [ "profile" ] }, { "name": "profile", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 114, 111, 102, 105, 108, 101 ] }, { "kind": "account", "path": "wallet" } ] } }, { "name": "old_claim", "docs": [ "The claim being released. Rent returns to the owner." ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 117, 115, 101, 114, 110, 97, 109, 101 ] }, { "kind": "account", "path": "profile.normalized", "account": "PlayerProfile" } ] } }, { "name": "new_claim", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 117, 115, 101, 114, 110, 97, 109, 101 ] }, { "kind": "arg", "path": "normalized" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "username", "type": "string" }, { "name": "normalized", "type": "string" } ] }, { "name": "claim_faucet", "docs": [ "Tops up the caller's chip balance." ], "discriminator": [ 80, 7, 251, 108, 55, 145, 135, 68 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true, "relations": [ "profile" ] }, { "name": "profile", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 114, 111, 102, 105, 108, 101 ] }, { "kind": "account", "path": "wallet" } ] } }, { "name": "faucet", "pda": { "seeds": [ { "kind": "const", "value": [ 102, 97, 117, 99, 101, 116 ] } ] } }, { "name": "mint", "writable": true, "relations": [ "faucet" ] }, { "name": "destination", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "wallet" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "claim_poker_tournament_prize", "discriminator": [ 170, 100, 54, 52, 228, 0, 254, 32 ], "accounts": [ { "name": "cranker", "writable": true, "signer": true }, { "name": "arena", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "docs": [ "are checked in the handler. Deliberately independent of arena.active." ], "writable": true }, { "name": "prize_vault", "writable": true }, { "name": "recipient" }, { "name": "recipient_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "recipient" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "award_index", "type": "u8" } ] }, { "name": "close_table", "docs": [ "Closes a table its creator is finished with.", "", "Only the creator, only once every seat is empty and nothing is escrowed,", "and never mid-hand. Returns the rent for every account the table owned", "and gives its place on the endpoint back, so an abandoned table does not", "spend one for ever." ], "discriminator": [ 149, 214, 44, 14, 190, 244, 132, 48 ], "accounts": [ { "name": "creator", "docs": [ "The player who opened it, and nobody else. Rent comes back here." ], "writable": true, "signer": true }, { "name": "config", "writable": true }, { "name": "faucet", "docs": [ "Present only when the operator is closing a table whose creator is gone.", "Checked in the handler, because whether it is needed depends on who", "signed." ], "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 102, 97, 117, 99, 101, 116 ] } ] } }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "docs": [ "Only exists once a table has dealt a hand, so a table closed before its", "first is closed without one." ], "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "endpoint_quota", "docs": [ "The endpoint this table was counted against, so closing gives the slot", "back rather than spending it for ever.", "Absent for a table opened before endpoints were counted at all." ], "writable": true, "optional": true }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "collect_poker_pot_fee", "discriminator": [ 221, 114, 197, 65, 154, 51, 139, 197 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "arena", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "settlement", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "mint" }, { "name": "bank_program" }, { "name": "bank" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "seat_index", "type": "u8" } ] }, { "name": "commit_deal_round", "docs": [ "Records that a player published a shuffle or lock round." ], "discriminator": [ 214, 65, 213, 162, 59, 139, 169, 236 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "round", "type": { "defined": { "name": "DealRound" } } }, { "name": "digest", "type": { "array": [ "u8", 32 ] } } ] }, { "name": "create_profile", "docs": [ "Claims a username and creates the caller's profile." ], "discriminator": [ 225, 205, 234, 143, 17, 186, 50, 220 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true }, { "name": "profile", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 114, 111, 102, 105, 108, 101 ] }, { "kind": "account", "path": "wallet" } ] } }, { "name": "claim", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 117, 115, 101, 114, 110, 97, 109, 101 ] }, { "kind": "arg", "path": "normalized" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "username", "type": "string" }, { "name": "normalized", "type": "string" } ] }, { "name": "create_table", "discriminator": [ 214, 142, 131, 250, 242, 83, 135, 185 ], "accounts": [ { "name": "creator", "writable": true, "signer": true }, { "name": "config", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101 ] }, { "kind": "account", "path": "creator" }, { "kind": "arg", "path": "table_id" } ] } }, { "name": "endpoint_quota", "docs": [ "How many tables this endpoint is carrying, keyed by its own hash.", "", "Seeded from the hash the caller names, which the handler checks against", "the URL it was given — so naming a different endpoint's account fails", "there rather than spending its allowance. Hashing inside the seeds", "expression would be tidier and Anchor's IDL build cannot see `rpc_url`", "from there. `init_if_needed` because the first table through an endpoint", "is what creates its account." ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 110, 100, 112, 111, 105, 110, 116 ] }, { "kind": "arg", "path": "endpoint" } ] } }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "docs": [ "Escrow for every chip at this table. The vault is its own authority, so", "only this program can move chips out." ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "rent", "address": "SysvarRent111111111111111111111111111111111" } ], "args": [ { "name": "table_id", "type": "u64" }, { "name": "name", "type": "string" }, { "name": "rpc_url", "type": "string" }, { "name": "endpoint", "type": { "array": [ "u8", 32 ] } }, { "name": "join_key", "type": "pubkey" }, { "name": "small_blind", "type": "u64" }, { "name": "ante", "type": "u64" }, { "name": "max_players", "type": "u8" }, { "name": "buy_in", "type": "u64" }, { "name": "action_time_ms", "type": "i64" } ] }, { "name": "enter_poker_tournament", "discriminator": [ 178, 78, 186, 228, 15, 45, 4, 4 ], "accounts": [ { "name": "player", "signer": true }, { "name": "arena", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "player_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "player" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" } ], "args": [ { "name": "seat_index", "type": "u8" } ] }, { "name": "exit_poker_tournament", "discriminator": [ 246, 106, 107, 147, 166, 57, 246, 193 ], "accounts": [ { "name": "actor", "docs": [ "The owner may leave; anyone may execute the ordinary idle-removal rule." ], "writable": true, "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "settlement", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "owner" }, { "name": "owner_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "owner" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "seat_index", "type": "u8" } ] }, { "name": "finalize_poker_tournament", "discriminator": [ 186, 211, 217, 4, 72, 35, 157, 86 ], "accounts": [ { "name": "cranker", "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "table_a" }, { "name": "table_b" }, { "name": "table_c" }, { "name": "state_a", "writable": true }, { "name": "state_b", "writable": true }, { "name": "state_c", "writable": true }, { "name": "hand_a", "writable": true }, { "name": "hand_b", "writable": true }, { "name": "hand_c", "writable": true }, { "name": "cards_a", "writable": true }, { "name": "cards_b", "writable": true }, { "name": "cards_c", "writable": true }, { "name": "pot_a" }, { "name": "pot_b" }, { "name": "pot_c" }, { "name": "table_d" }, { "name": "state_d", "writable": true }, { "name": "hand_d", "writable": true }, { "name": "cards_d", "writable": true }, { "name": "pot_d" } ], "args": [] }, { "name": "force_timeout", "docs": [ "Permissionless crank replacing the server's action-timeout tick." ], "discriminator": [ 223, 41, 225, 244, 115, 43, 255, 74 ], "accounts": [ { "name": "signer", "docs": [ "Either the seat's wallet or an authorized session key." ], "signer": true }, { "name": "session", "docs": [ "Present only when acting through a session key." ], "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "initialize_faucet", "docs": [ "One-time setup of the play-money mint and its faucet." ], "discriminator": [ 159, 109, 237, 214, 69, 231, 14, 60 ], "accounts": [ { "name": "authority", "writable": true, "signer": true }, { "name": "program_data" }, { "name": "faucet", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 102, 97, 117, 99, 101, 116 ] } ] } }, { "name": "mint", "docs": [ "Isolated devnet test mint. Six decimals, matching SDICE custody;", "the poker engine itself continues to count whole tokens." ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 105, 110, 116 ] } ] } }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "rent", "address": "SysvarRent111111111111111111111111111111111" } ], "args": [ { "name": "claim_amount", "type": "u64" }, { "name": "cooldown_seconds", "type": "i64" } ] }, { "name": "join_table", "docs": [ "Buys in, moving chips from the caller's wallet into table escrow." ], "discriminator": [ 14, 117, 84, 51, 95, 146, 171, 70 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "player_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "wallet" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "gate", "docs": [ "The key a private table's password derives, signing to prove it.", "", "Absent for an open table, which is most of them. It signs and nothing", "else: never an authority over chips, never stored, and the seat still", "belongs to `wallet` — so knowing a table's password lets somebody sit", "down and gets them nothing else." ], "signer": true, "optional": true }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "seat_index", "type": "u8" } ] }, { "name": "kick_idle", "docs": [ "Permissionless crank: frees a seat idle past the grace period.", "", "Refunds the evicted stack to that player's own token account and leaves", "the chair empty for anyone to `join_table` into. Never available against", "a seat that is ready or in a live hand." ], "discriminator": [ 176, 91, 206, 63, 11, 7, 61, 94 ], "accounts": [ { "name": "cranker", "docs": [ "Permissionless. Pays rent if the evicted player has no token account yet." ], "writable": true, "signer": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "evicted", "docs": [ "The wallet being removed. Checked against the seat record, and never a", "signer — that is the whole point of the instruction.", "", "for, and constrained to equal the seat's recorded owner." ] }, { "name": "evicted_tokens", "docs": [ "Where the evicted stack goes. Derived from `evicted`, so the caller", "cannot be paid for the eviction." ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "evicted" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "seat_index", "type": "u8" } ] }, { "name": "leave_table", "docs": [ "Cashes out and frees the seat, or marks it to leave after the hand." ], "discriminator": [ 163, 153, 94, 194, 19, 106, 113, 32 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "player_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "wallet" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "gate", "docs": [ "The key a private table's password derives, signing to prove it.", "", "Absent for an open table, which is most of them. It signs and nothing", "else: never an authority over chips, never stored, and the seat still", "belongs to `wallet` — so knowing a table's password lets somebody sit", "down and gets them nothing else." ], "signer": true, "optional": true }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "migrate_poker_arena", "discriminator": [ 101, 252, 144, 243, 211, 177, 34, 194 ], "accounts": [ { "name": "operator", "writable": true, "signer": true }, { "name": "arena", "writable": true }, { "name": "table_d", "writable": true }, { "name": "pot_d", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "table_d" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "move_poker_tournament_seat", "discriminator": [ 237, 8, 87, 218, 241, 221, 35, 238 ], "accounts": [ { "name": "cranker", "signer": true }, { "name": "arena", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "source" }, { "name": "destination" }, { "name": "source_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "source" } ] } }, { "name": "destination_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "destination" } ] } }, { "name": "source_hand", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "source" } ] } }, { "name": "destination_hand", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "destination" } ] } }, { "name": "source_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "source" } ] } }, { "name": "destination_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "destination" } ] } }, { "name": "destination_session", "docs": [ "A missing session is legal; an existing one is expired, never delegated." ], "writable": true }, { "name": "source_settlement", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "source" } ] } }, { "name": "destination_settlement", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "destination" } ] } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" } ], "args": [ { "name": "entry_index", "type": "u8" } ] }, { "name": "prepare_poker_table", "discriminator": [ 68, 129, 127, 183, 112, 171, 75, 248 ], "accounts": [ { "name": "cranker", "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "publish_unlocks", "docs": [ "Multiplies this player's unlock shares into the cards they name." ], "discriminator": [ 9, 162, 153, 169, 69, 142, 166, 95 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "slots", "type": "bytes" }, { "name": "shares", "type": { "vec": { "array": [ "u8", 32 ] } } }, { "name": "keys", "type": { "vec": { "array": [ "u8", 32 ] } } }, { "name": "paths", "type": { "vec": { "array": [ "u8", 32 ] } } }, { "name": "round_digest", "type": { "array": [ "u8", 32 ] } } ] }, { "name": "rebuy", "docs": [ "Refills a busted stack from the caller's wallet." ], "discriminator": [ 147, 185, 111, 149, 82, 245, 49, 165 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "player_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "wallet" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "gate", "docs": [ "The key a private table's password derives, signing to prove it.", "", "Absent for an open table, which is most of them. It signs and nothing", "else: never an authority over chips, never stored, and the seat still", "belongs to `wallet` — so knowing a table's password lets somebody sit", "down and gets them nothing else." ], "signer": true, "optional": true }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "record_poker_tournament_hand", "discriminator": [ 165, 63, 97, 13, 72, 136, 243, 54 ], "accounts": [ { "name": "cranker", "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "settlement", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 111, 116 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "recover_unlocks", "docs": [ "Puts an absent seat's layer on the board, rebuilt from the shares it", "dealt when it locked.", "", "The remedy for the one stall nothing else here can fix: a board card is", "locked under every seat, so one that stops answering freezes the hand", "even after the betting side has folded it. `board` addresses cards by", "their offset within the board, never by slot index, so a hole card", "cannot be named here at all." ], "discriminator": [ 79, 5, 232, 9, 235, 72, 19, 239 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "absent", "type": "u8" }, { "name": "board", "type": "bytes" }, { "name": "shares", "type": { "vec": { "array": [ "u8", 32 ] } } }, { "name": "keys", "type": { "vec": { "array": [ "u8", 32 ] } } }, { "name": "paths", "type": { "vec": { "array": [ "u8", 32 ] } } }, { "name": "round_digest", "type": { "array": [ "u8", 32 ] } } ] }, { "name": "refund_poker_seat", "discriminator": [ 122, 217, 130, 27, 21, 122, 179, 48 ], "accounts": [ { "name": "cranker", "writable": true, "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "evicted" }, { "name": "evicted_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "evicted" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "seat_index", "type": "u8" } ] }, { "name": "refund_poker_tournament_balance", "discriminator": [ 221, 228, 184, 50, 149, 138, 238, 124 ], "accounts": [ { "name": "cranker", "writable": true, "signer": true }, { "name": "arena", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "owner" }, { "name": "owner_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "owner" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "entry_index", "type": "u8" } ] }, { "name": "register_poker_tournament", "discriminator": [ 145, 92, 208, 142, 70, 30, 161, 38 ], "accounts": [ { "name": "player", "signer": true }, { "name": "arena", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true } ], "args": [] }, { "name": "restore_poker_cash_tables", "discriminator": [ 160, 44, 216, 161, 119, 120, 26, 102 ], "accounts": [ { "name": "cranker", "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true }, { "name": "table_a", "writable": true }, { "name": "table_b", "writable": true }, { "name": "table_c", "writable": true }, { "name": "state_a", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_a" } ] } }, { "name": "state_b", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_b" } ] } }, { "name": "state_c", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_c" } ] } }, { "name": "table_d", "writable": true }, { "name": "state_d", "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "table_d" } ] } } ], "args": [] }, { "name": "reveal_mental_hole", "docs": [ "Hands one contender's hole cards to the engine at showdown." ], "discriminator": [ 239, 197, 77, 243, 67, 22, 127, 122 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "seat", "type": "u8" } ] }, { "name": "reveal_mental_street", "docs": [ "Permissionless: hands the street the engine is parked on to the engine." ], "discriminator": [ 174, 155, 73, 48, 143, 238, 116, 143 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "revoke_session", "discriminator": [ 86, 92, 198, 120, 144, 2, 7, 194 ], "accounts": [ { "name": "wallet", "writable": true, "signer": true }, { "name": "config" }, { "name": "session", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "wallet" }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "schedule_poker_tournament", "discriminator": [ 170, 88, 65, 22, 42, 248, 211, 115 ], "accounts": [ { "name": "sponsor", "writable": true, "signer": true }, { "name": "arena", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 97, 114, 101, 110, 97 ] }, { "kind": "account", "path": "arena.operator", "account": "PokerArena" } ] } }, { "name": "tournament", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 116, 111, 117, 114, 110, 97, 109, 101, 110, 116 ] }, { "kind": "account", "path": "arena" }, { "kind": "account", "path": "arena.next_id", "account": "PokerArena" } ] } }, { "name": "prize_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 107, 101, 114, 45, 112, 114, 105, 122, 101 ] }, { "kind": "account", "path": "tournament" } ] } }, { "name": "sponsor_tokens", "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "sponsor" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "mint" } ], "program": { "kind": "const", "value": [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { "name": "mint" }, { "name": "token_program", "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "starts_at", "type": "i64" }, { "name": "prize_sdice", "type": "u64" }, { "name": "buy_in", "type": "u64" } ] }, { "name": "seal_mental_deck", "docs": [ "Publishes the locked deck at the positions this hand opens." ], "discriminator": [ 247, 213, 162, 110, 216, 76, 195, 119 ], "accounts": [ { "name": "signer", "docs": [ "A seated player's wallet, or a session key acting for one." ], "signer": true }, { "name": "session", "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "offset", "type": "u8" }, { "name": "locked", "type": { "vec": { "array": [ "u8", 32 ] } } } ] }, { "name": "set_endpoint_cap", "docs": [ "Raises how many tables one RPC endpoint may carry.", "", "Signed by the faucet authority, because the limit depends on a plan the", "program cannot see and a self-declared one would bind nobody." ], "discriminator": [ 194, 35, 13, 252, 202, 238, 80, 109 ], "accounts": [ { "name": "authority", "writable": true, "signer": true }, { "name": "faucet", "pda": { "seeds": [ { "kind": "const", "value": [ 102, 97, 117, 99, 101, 116 ] } ] } }, { "name": "endpoint_quota", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 110, 100, 112, 111, 105, 110, 116 ] }, { "kind": "arg", "path": "endpoint" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "endpoint", "type": { "array": [ "u8", 32 ] } }, { "name": "cap", "type": "u16" } ] }, { "name": "set_ready", "docs": [ "Opts into or out of the next hand." ], "discriminator": [ 105, 78, 7, 162, 181, 167, 186, 43 ], "accounts": [ { "name": "wallet", "signer": true }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "ready", "type": "bool" } ] }, { "name": "start_hand_mental", "docs": [ "Starts a hand the players shuffle themselves. Needs three seats." ], "discriminator": [ 36, 68, 166, 196, 192, 206, 149, 95 ], "accounts": [ { "name": "cranker", "docs": [ "Permissionless, like every other way of starting a hand." ], "writable": true, "signer": true }, { "name": "config", "docs": [ "Tournament blinds are frozen into this config for the entire new hand." ], "writable": true }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "deal", "docs": [ "Created on the first mental hand at this table and reused after." ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 109, 101, 110, 116, 97, 108, 95, 100, 101, 97, 108 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "start_next_hand", "docs": [ "Permissionless crank replacing the server's next-hand tick." ], "discriminator": [ 203, 232, 72, 243, 122, 202, 37, 150 ], "accounts": [ { "name": "signer", "docs": [ "Either the seat's wallet or an authorized session key." ], "signer": true }, { "name": "session", "docs": [ "Present only when acting through a session key." ], "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [] }, { "name": "set_auto_check_fold", "docs": [ "Owner/session authorized persistent auto check/fold. Blinds continue." ], "discriminator": [ 132, 183, 130, 182, 213, 49, 249, 77 ], "accounts": [ { "name": "signer", "docs": [ "Either the seat's wallet or an authorized session key." ], "signer": true }, { "name": "session", "docs": [ "Present only when acting through a session key." ], "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 101, 115, 115, 105, 111, 110 ] }, { "kind": "account", "path": "session.authority", "account": "SessionKey" }, { "kind": "account", "path": "config" } ] } }, { "name": "config" }, { "name": "table_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 116, 97, 98, 108, 101, 95, 115, 116, 97, 116, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_state", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "hand_cards", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 104, 97, 110, 100, 95, 99, 97, 114, 100, 115 ] }, { "kind": "account", "path": "config" } ] } } ], "args": [ { "name": "enabled", "type": "bool" } ] } ], "accounts": [ { "name": "EndpointQuota", "discriminator": [ 212, 34, 34, 102, 6, 154, 27, 219 ] }, { "name": "FaucetConfig", "discriminator": [ 216, 31, 49, 154, 106, 125, 143, 142 ] }, { "name": "HandCards", "discriminator": [ 210, 237, 179, 35, 82, 19, 208, 11 ] }, { "name": "HandState", "discriminator": [ 85, 99, 137, 55, 120, 251, 40, 38 ] }, { "name": "MentalDeal", "discriminator": [ 6, 117, 250, 13, 208, 225, 210, 220 ] }, { "name": "PlayerProfile", "discriminator": [ 82, 226, 99, 87, 164, 130, 181, 80 ] }, { "name": "PokerArena", "discriminator": [ 81, 221, 60, 131, 234, 86, 30, 243 ] }, { "name": "PokerPotSettlement", "discriminator": [ 104, 103, 143, 194, 223, 32, 137, 90 ] }, { "name": "PokerTournament", "discriminator": [ 3, 182, 24, 155, 163, 220, 189, 215 ] }, { "name": "SessionKey", "discriminator": [ 93, 186, 163, 139, 160, 255, 81, 112 ] }, { "name": "TableConfig", "discriminator": [ 170, 18, 158, 124, 72, 3, 198, 193 ] }, { "name": "TableState", "discriminator": [ 23, 164, 74, 0, 1, 230, 109, 140 ] }, { "name": "UsernameClaim", "discriminator": [ 83, 191, 129, 214, 239, 228, 224, 240 ] } ], "errors": [ { "code": 6000, "name": "InvalidUsername", "msg": "Usernames are 3 to 20 characters of letters, digits, or underscores." }, { "code": 6001, "name": "UsernameTaken", "msg": "That username is already claimed." }, { "code": 6002, "name": "FaucetCooldown", "msg": "The faucet is not ready to refill this account yet." }, { "code": 6003, "name": "SeatOccupied", "msg": "That seat is already taken." }, { "code": 6004, "name": "NoSeat", "msg": "You do not have a seat at this table." }, { "code": 6005, "name": "SeatEmpty", "msg": "That seat is empty." }, { "code": 6006, "name": "AlreadySeated", "msg": "You are already seated at this table." }, { "code": 6007, "name": "RebuyNotAvailable", "msg": "Rebuy is available after you run out of chips." }, { "code": 6008, "name": "HandInProgress", "msg": "You cannot do that during a hand." }, { "code": 6009, "name": "NoActiveHand", "msg": "There is no active hand." }, { "code": 6010, "name": "WrongHand", "msg": "That action belongs to an earlier hand." }, { "code": 6011, "name": "StaleVersion", "msg": "The table changed before that action arrived." }, { "code": 6012, "name": "NotYourTurn", "msg": "It is not your turn." }, { "code": 6013, "name": "ActionExpired", "msg": "The action timer has expired." }, { "code": 6014, "name": "CannotCheckFacingBet", "msg": "You cannot check while facing a bet." }, { "code": 6015, "name": "NoBetToCall", "msg": "There is no bet to call." }, { "code": 6016, "name": "RaiseNotReopened", "msg": "Raising has not been reopened." }, { "code": 6017, "name": "RaiseUnavailable", "msg": "Raising is not available." }, { "code": 6018, "name": "RaiseBelowMinimum", "msg": "That raise is below the minimum." }, { "code": 6019, "name": "RaiseExceedsStack", "msg": "That raise exceeds your stack." }, { "code": 6020, "name": "RaiseNotAboveCurrentBet", "msg": "A raise must exceed the current bet." }, { "code": 6021, "name": "NotEnoughPlayers", "msg": "A hand needs at least two ready players." }, { "code": 6022, "name": "TimerNotExpired", "msg": "The action timer has not expired yet." }, { "code": 6023, "name": "NextHandNotDue", "msg": "The next hand is not due yet." }, { "code": 6024, "name": "UnauthorizedActor", "msg": "This signer may not act for that seat." }, { "code": 6025, "name": "SessionExpired", "msg": "That session key has expired." }, { "code": 6026, "name": "SessionTableMismatch", "msg": "That session key is scoped to a different table." }, { "code": 6027, "name": "SessionMayNotDelegate", "msg": "A session key may not authorize another session key." }, { "code": 6028, "name": "InvalidBuyIn", "msg": "Buy-in must match the table configuration." }, { "code": 6029, "name": "InvalidTableConfig", "msg": "Table settings are outside the supported range." }, { "code": 6030, "name": "VaultUnderfunded", "msg": "The vault balance does not cover the table's chips." }, { "code": 6031, "name": "PartialCashOutUnsupported", "msg": "Cash out the whole stack; partial withdrawals are not supported." }, { "code": 6032, "name": "AbortedComputation", "msg": "The confidential computation was aborted." }, { "code": 6033, "name": "NotConfidential", "msg": "This hand has not been dealt confidentially." }, { "code": 6034, "name": "NotAwaitingCards", "msg": "The hand is not waiting for a card reveal." }, { "code": 6035, "name": "WrongCardCount", "msg": "The reveal delivered the wrong number of cards." }, { "code": 6036, "name": "NotEnoughPlayersForMentalDeal", "msg": "A player-shuffled hand needs at least three ready players." }, { "code": 6037, "name": "InvalidUnlockShare", "msg": "That unlock share is not a usable scalar for this card." }, { "code": 6038, "name": "UnlockKeyNotCommitted", "msg": "That unlock key is not the one its author committed to." }, { "code": 6039, "name": "UnlockShareAlreadyGiven", "msg": "You have already published an unlock share for that card." }, { "code": 6040, "name": "UnlockDidNotOpenACard", "msg": "The unlock shares did not open a card; somebody published a wrong one." }, { "code": 6041, "name": "UnknownDealPlayer", "msg": "That player is not part of this deal." }, { "code": 6042, "name": "NotYourDealTurn", "msg": "It is not your turn to publish a round." }, { "code": 6043, "name": "WrongDealPhase", "msg": "The deal is not at that stage." }, { "code": 6044, "name": "EmptyRoundCommitment", "msg": "A round commitment may not be empty." }, { "code": 6045, "name": "DealNotLocked", "msg": "Every player must lock the deck before it can be sealed." }, { "code": 6046, "name": "UnknownDealSlot", "msg": "That is not a position this hand deals." }, { "code": 6047, "name": "WrongDealSlotCount", "msg": "The wrong number of card positions was supplied." }, { "code": 6048, "name": "BoardCardNotDue", "msg": "That board card is not due to be opened yet." }, { "code": 6049, "name": "CardNotOpenYet", "msg": "That card is not open yet; some player has not published a share." }, { "code": 6050, "name": "CannotRecoverYourOwnKey", "msg": "Publish your own unlock share with publish_unlocks, not this." }, { "code": 6051, "name": "RecoveryNotDue", "msg": "That seat has not been given long enough to publish its own share." }, { "code": 6052, "name": "HoleAlreadyRevealed", "msg": "That seat has already shown its hand." }, { "code": 6053, "name": "RoundAlreadyCommitted", "msg": "You have already committed that round." }, { "code": 6054, "name": "TableLocked", "msg": "This table is private. Joining it needs its password." }, { "code": 6055, "name": "EndpointNotAllowed", "msg": "Tables are played through a Helius endpoint." }, { "code": 6056, "name": "EndpointAtCapacity", "msg": "That endpoint is already carrying as many tables as it may." }, { "code": 6057, "name": "NotFaucetAuthority", "msg": "Only the faucet authority may change an endpoint's table limit." }, { "code": 6058, "name": "NotTableCreator", "msg": "Only the player who created this table may close it." }, { "code": 6059, "name": "TableNotEmpty", "msg": "A table can only be closed once every seat is empty." }, { "code": 6060, "name": "SessionKeyReplaced", "msg": "This session key has been replaced. Authorize a new one and retry." }, { "code": 6061, "name": "TournamentAccountRequired", "msg": "Include this table's on-chain tournament registry." }, { "code": 6062, "name": "InvalidTournament", "msg": "The tournament accounts or schedule are invalid." }, { "code": 6063, "name": "TournamentTableReserved", "msg": "This table is reserved for the scheduled tournament." }, { "code": 6064, "name": "TournamentNotDue", "msg": "The scheduled takeover time has not arrived." }, { "code": 6065, "name": "TournamentAlreadyScheduled", "msg": "That poker arena already has a funded tournament." }, { "code": 6066, "name": "InvalidPotFee", "msg": "The completed hand's pot fee is invalid." }, { "code": 6067, "name": "PotFeesPending", "msg": "This completed hand still has pot fees to settle." }, { "code": 6068, "name": "PotFeeAlreadyPaid", "msg": "That winner's pot fee was already paid." }, { "code": 6069, "name": "TournamentFull", "msg": "All thirty tournament registration places are taken" }, { "code": 6070, "name": "TournamentAlreadyRegistered", "msg": "This wallet is already registered in this tournament" }, { "code": 6071, "name": "TournamentEntryClosed", "msg": "The tournament's fifteen-minute entry window has closed" }, { "code": 6072, "name": "TournamentResultPending", "msg": "Record the completed tournament hand before starting another hand" } ], "types": [ { "name": "CashRules", "type": { "kind": "struct", "fields": [ { "name": "buy_in", "type": "u64" }, { "name": "small_blind", "type": "u64" }, { "name": "big_blind", "type": "u64" }, { "name": "ante", "type": "u64" } ] } }, { "name": "DealPhase", "docs": [ "How far along a mental deal is." ], "type": { "kind": "enum", "variants": [ { "name": "Shuffling" }, { "name": "Locking" }, { "name": "Sealed" } ] } }, { "name": "DealRound", "docs": [ "Which round a commitment covers." ], "type": { "kind": "enum", "variants": [ { "name": "Shuffle" }, { "name": "Lock" } ] } }, { "name": "DealSlot", "docs": [ "One dealt position, as the chain tracks it while the players open it.", "", "`point` starts as the card the players locked and loses one layer per", "published unlock share. When every player has contributed it *is* a card", "point, and `card` is which one. The chain is never told the card." ], "type": { "kind": "struct", "fields": [ { "name": "position", "docs": [ "The deck position, as the engine indexes it." ], "type": "u8" }, { "name": "owner", "docs": [ "The seat this card belongs to, or `NO_SEAT` for a board card." ], "type": "u8" }, { "name": "point", "type": { "array": [ "u8", 32 ] } }, { "name": "unlocked", "docs": [ "Players who have published a share. Indexed by player, not by seat." ], "type": "u16" }, { "name": "card", "docs": [ "`u8::MAX` until the last layer comes off." ], "type": "u8" } ] } }, { "name": "EndpointQuota", "docs": [ "How many tables one RPC endpoint is carrying, and how many it may.", "", "A table is played through the endpoint whoever opened it brought, and one", "endpoint carrying too many is slow for everybody at all of them. The count", "is here rather than in the client because a client-side limit is not a limit", "at all: `create_table` is public and anybody can call it directly.", "", "The *cap* cannot be derived the same way. It depends on the plan behind the", "key, and a program has no network to ask — Helius publishes nothing about a", "plan over RPC either, which was measured rather than assumed: no header, no", "method, no difference in rate behaviour. So every endpoint starts at", "`DEFAULT_ENDPOINT_CAP` and the faucet authority raises the ones it has", "checked by hand. Self-declaring a plan would be worth nothing, since the", "declaration would come from the same client the limit is meant to bind." ], "type": { "kind": "struct", "fields": [ { "name": "endpoint", "docs": [ "SHA-256 of the endpoint URL, which is also this account's seed — so the", "quota for one endpoint cannot be spent by naming another's account." ], "type": { "array": [ "u8", 32 ] } }, { "name": "cap", "docs": [ "How many tables this endpoint may carry at once." ], "type": "u16" }, { "name": "tables", "docs": [ "How many it is carrying. Raised by `create_table`, lowered by", "`close_table` — otherwise abandoning a table would spend a slot for ever." ], "type": "u16" }, { "name": "bump", "type": "u8" } ] } }, { "name": "Entrant", "type": { "kind": "struct", "fields": [ { "name": "wallet", "type": "pubkey" }, { "name": "status", "type": { "defined": { "name": "EntryStatus" } } }, { "name": "table", "type": "u8" }, { "name": "seat", "type": "u8" }, { "name": "stack", "docs": [ "Whole SDICE backed by custody, excluding the separate sponsored prize." ], "type": "u64" }, { "name": "elimination_order", "docs": [ "Same-hand eliminations share an order; pre-hand stack breaks that tie." ], "type": "u64" }, { "name": "pre_elimination_stack", "type": "u64" }, { "name": "cash_out", "docs": [ "Historical amount returned atomically on withdrawal; not a second debt." ], "type": "u64" } ] } }, { "name": "EntryStatus", "type": { "kind": "enum", "variants": [ { "name": "Empty" }, { "name": "Registered" }, { "name": "Seated" }, { "name": "Eliminated" }, { "name": "Withdrawn" } ] } }, { "name": "FaucetConfig", "docs": [ "Faucet configuration for the play-money mint." ], "type": { "kind": "struct", "fields": [ { "name": "mint", "type": "pubkey" }, { "name": "authority", "type": "pubkey" }, { "name": "claim_amount", "docs": [ "Amount minted per claim, in base units." ], "type": "u64" }, { "name": "cooldown_seconds", "docs": [ "Seconds a profile must wait between claims." ], "type": "i64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "FinishReason", "type": { "kind": "enum", "variants": [ { "name": "FinalTwo" }, { "name": "TimeLimit" }, { "name": "InsufficientEntrants" } ] } }, { "name": "HandCards", "docs": [ "Card material for one hand.", "", "There is no deck here, and there must never be one again. The players hold", "the deck between themselves; what the chain keeps is in `MentalDeal` — a", "digest per round and the twenty-five locked positions a hand opens — and", "what lands here is only what a showdown has already made public." ], "type": { "kind": "struct", "fields": [ { "name": "table", "type": "pubkey" }, { "name": "hand_id", "type": "u64" }, { "name": "revealed", "docs": [ "Bitmask of seats revealed at showdown.", "", "Written at settlement as the live contenders, and read by the client to", "decide whose cards it may render face up." ], "type": "u16" }, { "name": "confidential", "docs": [ "This hand's cards are dealt confidentially, so the engine holds no deck.", "", "Set when the hand starts, before a single round is committed, because", "the engine has to know from the first action that it must park for its", "cards rather than deal them itself." ], "type": "bool" }, { "name": "bump", "type": "u8" }, { "name": "hole_cards", "docs": [ "Hole cards revealed at showdown, in the clear.", "", "Only ever written for seats that reached showdown without folding, by", "`reveal_mental_hole` once every player has published a share for that", "seat's two positions. Entries accumulate across several transactions —", "one reveal per contender — which is why they persist here rather than", "living inside a single instruction.", "", "Revealed board cards land on `HandState`, not here." ], "type": { "array": [ { "array": [ "u8", 2 ] }, 10 ] } } ] } }, { "name": "HandStage", "type": { "kind": "enum", "variants": [ { "name": "Idle" }, { "name": "Preflop" }, { "name": "Flop" }, { "name": "Turn" }, { "name": "River" }, { "name": "Complete" } ] } }, { "name": "HandState", "docs": [ "Per-hand betting state. Holds no card material other than the public board." ], "type": { "kind": "struct", "fields": [ { "name": "table", "type": "pubkey" }, { "name": "hand_id", "type": "u64" }, { "name": "stage", "type": { "defined": { "name": "HandStage" } } }, { "name": "version", "type": "u32" }, { "name": "dealer_seat", "type": "u8" }, { "name": "small_blind_seat", "type": "u8" }, { "name": "big_blind_seat", "type": "u8" }, { "name": "active_seats", "type": "u16" }, { "name": "folded", "type": "u16" }, { "name": "all_in", "type": "u16" }, { "name": "acted", "type": "u16" }, { "name": "street_bets", "type": { "array": [ "u64", 10 ] } }, { "name": "contributions", "type": { "array": [ "u64", 10 ] } }, { "name": "current_bet", "type": "u64" }, { "name": "min_raise", "type": "u64" }, { "name": "actor_seat", "docs": [ "`u8::MAX` when nobody is on the clock." ], "type": "u8" }, { "name": "action_deadline", "docs": [ "Unix milliseconds." ], "type": "i64" }, { "name": "board", "type": { "array": [ "u8", 5 ] } }, { "name": "board_len", "type": "u8" }, { "name": "deck_index", "type": "u8" }, { "name": "settled", "type": "bool" }, { "name": "awaiting", "docs": [ "Which reveal the hand is parked on, if any. 0 none, 1 flop, 2 turn,", "3 river, 4 all-in run-out, 5 showdown, 6 the deal itself. The pause", "spans transactions, so it has to be persisted rather than held in the", "engine." ], "type": "u8" }, { "name": "revealed_holes", "docs": [ "Contenders whose hole cards have been revealed at showdown. Settlement", "cannot run until this covers every live seat." ], "type": "u16" }, { "name": "timed_out", "docs": [ "Seats skipped by `force_timeout` this hand.", "", "Persisted because the decision it feeds spans transactions: the skip", "happens in one instruction and the un-readying in whichever later one", "completes the hand. Cleared with the rest of the hand when the next", "starts." ], "type": "u16" }, { "name": "winners", "type": { "array": [ { "defined": { "name": "WinnerRecord" } }, 10 ] } }, { "name": "winner_count", "type": "u8" }, { "name": "bump", "type": "u8" } ] } }, { "name": "MentalDeal", "docs": [ "A hand the players deal themselves.", "", "Almost nothing of the protocol lives here. The shuffle rounds and lock", "rounds are large — thousands of bytes each, per player — and every player", "verifies them off chain, so what the chain keeps is a digest of each: enough", "that nobody can show one transcript to one player and a different one to", "another, and enough to say whose round was wrong when a card fails to open.", "", "What the chain does hold in full is the twenty-five positions a hand", "actually opens, and it opens them itself. See `crate::mental`." ], "type": { "kind": "struct", "fields": [ { "name": "table", "type": "pubkey" }, { "name": "hand_id", "docs": [ "The hand these slots belong to. Everything here is stale for any other." ], "type": "u64" }, { "name": "seats", "docs": [ "Player index to seat. Only the first `players` entries mean anything." ], "type": { "array": [ "u8", 10 ] } }, { "name": "players", "type": "u8" }, { "name": "threshold", "docs": [ "How many players it takes to rebuild an absent one's board key: every", "player but one, so any two honest players can stop the board being", "opened early. Never fewer than two, which is why a hand needs three", "seats.", "", "Recorded for the clients, not used here. This program opens a slot only", "when every player has peeled it (`Slot::is_open`), so it never rebuilds", "anybody's key — but the browsers size their share packages off this", "field, so it is load-bearing for them." ], "type": "u8" }, { "name": "next_round", "docs": [ "Whose turn it is to commit a round. Rounds are sequential: each player", "masks the deck the one before them handed on.", "", "**It means something else once the deck is sealed**, and an operator", "reading a stuck hand needs to know which. Rounds are finished by then —", "`commit_deal_round` refuses to run outside `Shuffling` and `Locking`,", "and `seal_mental_deck` will not seal until this has wrapped back to zero", "— so `abandon_mental_deal` borrows the byte to remember which board", "street has already spent its one grace, holding `board_len + 1`. So at", "`phase = Sealed`, a `4` here means the turn has had its grace and the", "next ask will void the hand; it does **not** mean the deal is waiting on", "player 4, who at a three-handed table does not exist.", "", "Borrowed rather than given its own field for three measured reasons, in", "increasing order of how final they are: `MentalDeal` is created", "`init_if_needed`, and Anchor neither resizes an existing account (it", "fails `AccountDidNotDeserialize`) nor tolerates one padded with slack", "(it fails `ConstraintSpace`, because the space assertion is exact); and", "`StartMentalHand::try_accounts` has one byte of BPF stack headroom left,", "measured — a `u8` still builds and two bytes does not. Growing this", "struct is not a thing that can be done without a migration crank and a", "frame to spare." ], "type": "u8" }, { "name": "phase", "type": { "defined": { "name": "DealPhase" } } }, { "name": "shuffle_commitments", "type": { "array": [ { "array": [ "u8", 32 ] }, 10 ] } }, { "name": "lock_commitments", "type": { "array": [ { "array": [ "u8", 32 ] }, 10 ] } }, { "name": "slots", "type": { "array": [ { "defined": { "name": "DealSlot" } }, 25 ] } }, { "name": "slot_count", "type": "u8" }, { "name": "deadline", "docs": [ "Unix milliseconds after which anyone may abandon this deal.", "", "Refreshed by every step that makes progress, so a slow deal is never", "abandoned, only a stopped one. Without it a hand whose cards never", "arrive sits with the blinds in the pot and nothing on chain able to move", "it: `force_timeout` needs somebody on the clock, and `start_next_hand`", "needs a completed hand." ], "type": "i64" }, { "name": "sealed_slots", "docs": [ "How much of the locked deck has landed.", "", "A ten-seat deck is twenty-five points, and twenty-five points do not fit", "in a transaction alongside their accounts — measured at 1,285 bytes", "against a 1,232-byte limit, which is how this field came to exist. So it", "arrives in contiguous chunks and nothing opens until `slot_count` of", "them are down." ], "type": "u8" }, { "name": "bump", "type": "u8" } ] } }, { "name": "Phase", "type": { "kind": "enum", "variants": [ { "name": "Scheduled" }, { "name": "Draining" }, { "name": "Running" }, { "name": "Finishing" }, { "name": "Complete" }, { "name": "Cancelled" } ] } }, { "name": "PlayerProfile", "docs": [ "Wallet to username, plus lifetime statistics.", "", "Replaces the `localStorage` reconnect-token scheme the off-chain build used." ], "type": { "kind": "struct", "fields": [ { "name": "wallet", "type": "pubkey" }, { "name": "username", "type": "string" }, { "name": "normalized", "docs": [ "Lowercased form the `UsernameClaim` is seeded on." ], "type": "string" }, { "name": "created_at", "type": "i64" }, { "name": "hands_played", "type": "u64" }, { "name": "hands_won", "type": "u64" }, { "name": "last_faucet_claim", "type": "i64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "PokerAction", "type": { "kind": "enum", "variants": [ { "name": "Fold" }, { "name": "Check" }, { "name": "Call" }, { "name": "AllIn" }, { "name": "Raise", "fields": [ { "name": "to", "type": "u64" } ] } ] } }, { "name": "PokerArena", "type": { "kind": "struct", "fields": [ { "name": "operator", "type": "pubkey" }, { "name": "mint", "type": "pubkey" }, { "name": "tables", "type": { "array": [ "pubkey", 4 ] } }, { "name": "bank_program", "type": "pubkey" }, { "name": "bank", "type": "pubkey" }, { "name": "cash_rules", "type": { "array": [ { "defined": { "name": "CashRules" } }, 4 ] } }, { "name": "running", "docs": [ "Cached by native activation/reconciliation, so every private-dealing", "packet need not carry the full tournament account as an extra key." ], "type": "bool" }, { "name": "ends_at", "type": "i64" }, { "name": "reconciled", "type": { "array": [ "u64", 4 ] } }, { "name": "decision_counter", "docs": [ "Native decision order, captured with the actual hand completion rather", "than whichever keeper submits the later fee/score reconciliation first." ], "type": "u64" }, { "name": "completed_hand", "type": { "array": [ "u64", 4 ] } }, { "name": "completion_order", "type": { "array": [ "u64", 4 ] } }, { "name": "active", "type": "pubkey" }, { "name": "next_id", "type": "u64" }, { "name": "starts_at", "type": "i64" }, { "name": "cash_closes_at", "type": "i64" }, { "name": "drained", "type": "u8" }, { "name": "bump", "type": "u8" } ] } }, { "name": "PokerPotSettlement", "type": { "kind": "struct", "fields": [ { "name": "table", "type": "pubkey" }, { "name": "hand", "type": "u64" }, { "name": "paid", "type": "u16" }, { "name": "bump", "type": "u8" } ] } }, { "name": "PokerTournament", "type": { "kind": "struct", "fields": [ { "name": "arena", "type": "pubkey" }, { "name": "id", "type": "u64" }, { "name": "state", "type": { "defined": { "name": "TournamentState" } } }, { "name": "finish_reason", "type": { "option": { "defined": { "name": "FinishReason" } } } }, { "name": "finalized_at", "type": "i64" }, { "name": "refunded", "docs": [ "Entry-index mask. Ranking stacks remain frozen after their cash-out." ], "type": "u64" }, { "name": "prizes_paid", "type": "u16" }, { "name": "awards", "type": { "vec": { "defined": { "name": "PrizeAward" } } } }, { "name": "bump", "type": "u8" }, { "name": "vault_bump", "type": "u8" } ] } }, { "name": "PrizeAward", "type": { "kind": "struct", "fields": [ { "name": "wallet", "type": "pubkey" }, { "name": "amount", "docs": [ "Token-2022 base units, separate from this wallet's real table balance." ], "type": "u64" } ] } }, { "name": "SeatRecord", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "stack", "type": "u64" }, { "name": "occupied", "type": "bool" }, { "name": "ready", "type": "bool" }, { "name": "connected", "type": "bool" }, { "name": "leave_after_hand", "type": "bool" }, { "name": "sitting_out_since", "docs": [ "Unix milliseconds this seat stopped being ready, or 0 while it is.", "", "The clock the takeover grace period is measured from. It has to be a", "timestamp rather than a count of hands, because the case that most needs", "it is a table that cannot deal a hand *at all* — three seats with one", "player away is a stuck table, and a hand-based grace period would never", "come due there." ], "type": "i64" } ] } }, { "name": "SessionKey", "docs": [ "Scoped action authority so a player signs once per table rather than once", "per action.", "", "A leaked session key can fold one player's hands at one table until expiry.", "It can never move funds: buy-in, rebuy, and cash-out all require the wallet." ], "type": { "kind": "struct", "fields": [ { "name": "authority", "docs": [ "The real wallet that authorized this session." ], "type": "pubkey" }, { "name": "session_key", "docs": [ "The ephemeral keypair allowed to sign actions." ], "type": "pubkey" }, { "name": "table", "docs": [ "Scoped to a single table." ], "type": "pubkey" }, { "name": "expiry", "docs": [ "Unix seconds after which the key is dead." ], "type": "i64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "TableConfig", "docs": [ "Immutable table settings." ], "type": { "kind": "struct", "fields": [ { "name": "creator", "type": "pubkey" }, { "name": "mint", "type": "pubkey" }, { "name": "name", "type": "string" }, { "name": "rpc_url", "docs": [ "The RPC endpoint this table is played through.", "", "Every client at a table talks to the chain constantly — a hand is", "forty-four transactions three-handed and two hundred and six at a full", "table, on top of the account subscriptions every seat holds open — so", "one shared endpoint is the ceiling on how many tables can exist at once", "rather than how many players want to play. Whoever opens a table brings", "the endpoint it runs on, and the cost scales with tables instead of", "landing on whoever deployed the app.", "", "Stored here rather than agreed off chain because every seat needs the", "same answer and there is no other place all of them already read. It is", "public, and that is understood: a browser cannot reach an endpoint", "without the URL, so any endpoint a client uses is visible to anyone who", "opens the page. Restricting the key to an origin is what makes it safe,", "which is the same protection the deployment's own endpoint has always", "relied on — see `scrubSecrets` in `app/chain/wallet-log.ts`.", "", "200 is a Helius URL with room: the host, the path, and an `api-key`", "query parameter of a UUID's length, with slack for a longer key or a", "different provider." ], "type": "string" }, { "name": "join_key", "docs": [ "The public half of a key derived from this table's password, or all", "zeroes for a table anyone may sit at.", "", "A password cannot be checked on chain by being sent to the chain: an", "instruction's data is public for ever, so the first player to join a", "private table would publish its password to everyone watching. Nor can", "it be stored here hashed and compared, for the same reason — the", "comparison needs the password.", "", "So the password never leaves the client. It is stretched into a keypair", "(see `tableGate` in `app/chain/table-gate.ts`), and this is that", "keypair's public half. Joining means *signing the join transaction* with", "the private half, which proves the password without naming it: the", "signature covers a message nobody else will send again, so it cannot be", "replayed, and a signature reveals nothing about the key behind it.", "", "What this does not defend against is grinding. The public key is here", "for anyone to read, so passwords can be tried offline as fast as", "keypairs can be derived — which is why the client stretches with PBKDF2", "rather than hashing once, and why the table says so when it asks for one." ], "type": "pubkey" }, { "name": "table_id", "type": "u64" }, { "name": "small_blind", "type": "u64" }, { "name": "big_blind", "type": "u64" }, { "name": "ante", "type": "u64" }, { "name": "buy_in", "type": "u64" }, { "name": "max_players", "type": "u8" }, { "name": "action_time_ms", "docs": [ "Stored creation timer. New tables require 60,000; the native bridge also", "enforces 60,000 for legacy accounts without changing their layout." ], "type": "i64" }, { "name": "bump", "type": "u8" }, { "name": "vault_bump", "type": "u8" } ] } }, { "name": "TableState", "docs": [ "Mutable table state: who is seated, their stacks, and the button." ], "type": { "kind": "struct", "fields": [ { "name": "table", "type": "pubkey" }, { "name": "seats", "type": { "array": [ { "defined": { "name": "SeatRecord" } }, 10 ] } }, { "name": "dealer_seat", "docs": [ "`u8::MAX` when no hand has been dealt yet." ], "type": "u8" }, { "name": "hand_counter", "type": "u64" }, { "name": "next_hand_at", "docs": [ "Unix seconds; 0 when no hand is scheduled." ], "type": "i64" }, { "name": "version", "type": "u64" }, { "name": "escrowed", "docs": [ "Chips escrowed in the vault for this table. Must equal the sum of seat", "stacks plus any live pot." ], "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "TournamentState", "type": { "kind": "struct", "fields": [ { "name": "creator", "type": "pubkey" }, { "name": "prize_sdice", "type": "u64" }, { "name": "buy_in", "type": "u64" }, { "name": "starts_at", "type": "i64" }, { "name": "cash_closes_at", "type": "i64" }, { "name": "entry_closes_at", "type": "i64" }, { "name": "ends_at", "type": "i64" }, { "name": "phase", "type": { "defined": { "name": "Phase" } } }, { "name": "drained_tables", "type": "u8" }, { "name": "registered", "type": "u8" }, { "name": "entered", "type": "u8" }, { "name": "elimination_order", "type": "u64" }, { "name": "rake_paid", "type": "u64" }, { "name": "last_hand", "type": { "array": [ "u64", 4 ] } }, { "name": "entries", "type": { "vec": { "defined": { "name": "Entrant" } } } } ] } }, { "name": "UsernameClaim", "docs": [ "Seeded on the normalized username so uniqueness is enforced by the runtime", "refusing to initialize the same PDA twice. No server registry needed." ], "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "normalized", "type": "string" }, { "name": "bump", "type": "u8" } ] } }, { "name": "WinnerRecord", "type": { "kind": "struct", "fields": [ { "name": "seat", "type": "u8" }, { "name": "amount", "type": "u64" }, { "name": "category", "docs": [ "Hand category index, or `u8::MAX` for a pot won uncontested." ], "type": "u8" } ] } } ] }