Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

poker state

Back to all declarations

Challenge

func(tableID uint64, handNo uint64, accused int, kind string, index int, inB64 string, inProofHex string, outB64 string, outProofHex string)

Challenge disputes one element of a shuffle or rekey pass during the challenge window (protocol.md section 5).

Open
OID
05889b…4f14:3
Challenge details

Inspect func

rootAt

func(h *poker.Hand, pass int) []uint8
Open
OID
05889b…4f14:5
rootAt details

Inspect func

phShuffle

untyped bigint

Hand phases.

Value

(0 <untyped> bigint)

phRekey

untyped bigint

Hand phases.

Value

(1 <untyped> bigint)

phDealHole

untyped bigint

Hand phases.

Value

(2 <untyped> bigint)

phPreflop

untyped bigint

Hand phases.

Value

(3 <untyped> bigint)

phDealFlop

untyped bigint

Hand phases.

Value

(4 <untyped> bigint)

phFlop

untyped bigint

Hand phases.

Value

(5 <untyped> bigint)

phDealTurn

untyped bigint

Hand phases.

Value

(6 <untyped> bigint)

phTurn

untyped bigint

Hand phases.

Value

(7 <untyped> bigint)

phDealRiver

untyped bigint

Hand phases.

Value

(8 <untyped> bigint)

phRiver

untyped bigint

Hand phases.

Value

(9 <untyped> bigint)

phReveal

untyped bigint

Hand phases.

Value

(10 <untyped> bigint)

phChallenge

untyped bigint

Hand phases.

Value

(11 <untyped> bigint)

phDone

untyped bigint

Hand phases.

Value

(12 <untyped> bigint)

HandPlayer

type

HandPlayer is a seat's participation in one hand.

Value

poker.HandPlayer

ChallengeRecord

type

ChallengeRecord is one resolved challenge.

Value

poker.ChallengeRecord

Result

type

Result is the outcome of a hand. Credits are what settlement adds to each hand player's stack (winnings, or refund plus penalty share on abort).

Value

poker.Result

Hand

type

Hand is the state of the current or last hand of a table.

Value

poker.Hand

maxSeats

untyped bigint

maxSeats is the largest table; per-player buffers are sized by it.

Value

(6 <untyped> bigint)

isBettingPhase

func(ph int) bool
Open
OID
05889b…4f14:8
isBettingPhase details

Inspect func

isDealPhase

func(ph int) bool
Open
OID
05889b…4f14:10
isDealPhase details

Inspect func

StartHand

func(tableID uint64)

StartHand moves the button, posts blinds and opens the shuffle.

Open
OID
05889b…4f14:11
StartHand details

Inspect func

handFor

func(tableID uint64, handNo uint64) (*poker.Table, *poker.Hand, int)

handFor validates the table, hand number and caller, and returns the hand and the caller's hand index.

Open
OID
05889b…4f14:12
handFor details

Inspect func

SubmitShuffle

func(tableID uint64, handNo uint64, commitHex string, deckB64 string)

SubmitShuffle records the caller's commitment and shuffled deck.

Open
OID
05889b…4f14:13
SubmitShuffle details

Inspect func

SubmitRekey

func(tableID uint64, handNo uint64, deckB64 string)

SubmitRekey records the caller's re-keyed deck.

Open
OID
05889b…4f14:14
SubmitRekey details

Inspect func

ShareKeys

func(tableID uint64, handNo uint64, keysHex string)

ShareKeys publishes the caller's card keys for the current deal step.

Open
OID
05889b…4f14:15
ShareKeys details

Inspect func

Act

func(tableID uint64, handNo uint64, action string, amount int64)

Act applies a betting action by the player to act.

Open
OID
05889b…4f14:16
Act details

Inspect func

RevealSeed

func(tableID uint64, handNo uint64, seedHex string)

RevealSeed opens the caller's seed; published card keys are checked at once.

Open
OID
05889b…4f14:17
RevealSeed details

Inspect func

seedBytes

func(p *poker.HandPlayer) []uint8
Open
OID
05889b…4f14:18
seedBytes details

Inspect func

Accept

func(tableID uint64, handNo uint64)

Accept agrees with the result; when all hand players accept, the hand is finalized without waiting for the window.

Open
OID
05889b…4f14:19
Accept details

Inspect func

Finalize

func(tableID uint64)

Finalize settles the hand once the challenge window has passed.

Open
OID
05889b…4f14:20
Finalize details

Inspect func

Timeout

func(tableID uint64)

Timeout applies the stall rules once the current deadline has passed.

Open
OID
05889b…4f14:21
Timeout details

Inspect func

denom

untyped string

Value

"ugnot"

Seat

type

Seat is an occupied table seat.

Value

poker.Seat

Table

type

Table is a persistent cash table.

Value

poker.Table

txCtx

type

txCtx carries per-transaction values into helpers.

Value

poker.txCtx

sentUgnot

func() int64

sentUgnot returns the ugnot attached to a direct user call and rejects any other denomination.

Open
OID
05889b…4f14:25
sentUgnot details

Inspect func

getTable

func(id uint64) *poker.Table
Open
OID
05889b…4f14:27
getTable details

Inspect func

CreateTable

func(smallBlind int64, bigBlind int64, minBuyIn int64, maxBuyIn int64, maxPlayers int, actionTimeoutBlocks int64, challengeWindowBlocks int64, challengeBond int64) uint64

CreateTable creates a table and returns its id.

Open
OID
05889b…4f14:28
CreateTable details

Inspect func

Join

func(tableID uint64, session string, gasAllowance int64)

Join takes a free seat with the attached ugnot minus gasAllowance as stack and forwards gasAllowance to the session address.

Open
OID
05889b…4f14:29
Join details

Inspect func

TopUp

func(tableID uint64)

TopUp adds the attached ugnot to the caller's stack between hands.

Open
OID
05889b…4f14:30
TopUp details

Inspect func

Leave

func(tableID uint64)

Leave pays out the stack, or marks the seat leaving until the hand ends.

Open
OID
05889b…4f14:31
Leave details

Inspect func

SitOut

func(tableID uint64)

SitOut skips the caller from the next hand on.

Open
OID
05889b…4f14:32
SitOut details

Inspect func

SitIn

func(tableID uint64)

SitIn makes the caller eligible again from the next hand.

Open
OID
05889b…4f14:33
SitIn details

Inspect func

totalEscrow

func() int64

totalEscrow is the ugnot the realm must hold across all tables.

Open
OID
05889b…4f14:34
totalEscrow details

Inspect func

ChallengesEnabled

func() bool

ChallengesEnabled reports whether this deployment accepts challenges.

Open
OID
05889b…4f14:35
ChallengesEnabled details

Inspect func

ListTables

func() string

ListTables returns a JSON array of table summaries.

Open
OID
05889b…4f14:42
ListTables details

Inspect func

GetTable

func(tableID uint64) string

GetTable returns the full table and hand state as JSON.

Open
OID
05889b…4f14:43
GetTable details

Inspect func

GetDeck

func(tableID uint64) string

GetDeck returns the latest deck pass of the current hand as standard base64, or "" before the first pass.

Open
OID
05889b…4f14:44
GetDeck details

Inspect func

renderMaxTables

untyped bigint

renderMaxTables is the most tables the list page shows.

Value

(50 <untyped> bigint)

Render

func(path string) string

Render shows the newest renderMaxTables tables, or one table at path "\<id>".

Open
OID
05889b…4f14:45
Render details

Inspect func

challengesEnabled

untyped bool

Value

true

powModP

func(base []uint8, exp []uint8) []uint8

powModP returns base^exp mod P as 256 bytes.

Open
OID
05889b…4f14:48
powModP details

Inspect func
Challenge : func(tableID uint64, handNo uint64, accused int, kind string, index int, inB64 string, inProofHex string, outB64 string, outProofHex string) Inspect
rootAt : func(h *poker.Hand, pass int) []uint8 Inspect
phShuffle : untyped bigint =(0 <untyped> bigint)
phRekey : untyped bigint =(1 <untyped> bigint)
phDealHole : untyped bigint =(2 <untyped> bigint)
phPreflop : untyped bigint =(3 <untyped> bigint)
phDealFlop : untyped bigint =(4 <untyped> bigint)
phFlop : untyped bigint =(5 <untyped> bigint)
phDealTurn : untyped bigint =(6 <untyped> bigint)
phTurn : untyped bigint =(7 <untyped> bigint)
phDealRiver : untyped bigint =(8 <untyped> bigint)
phRiver : untyped bigint =(9 <untyped> bigint)
phReveal : untyped bigint =(10 <untyped> bigint)
phChallenge : untyped bigint =(11 <untyped> bigint)
phDone : untyped bigint =(12 <untyped> bigint)
phaseNames : []string (len=13) Inspect
HandPlayer : type =poker.HandPlayer
ChallengeRecord : type =poker.ChallengeRecord
Result : type =poker.Result
Hand : type =poker.Hand
maxSeats : untyped bigint =(6 <untyped> bigint)
isBettingPhase : func(ph int) bool Inspect
isDealPhase : func(ph int) bool Inspect
StartHand : func(tableID uint64) Inspect
handFor : func(tableID uint64, handNo uint64) (*poker.Table, *poker.Hand, int) Inspect
SubmitShuffle : func(tableID uint64, handNo uint64, commitHex string, deckB64 string) Inspect
SubmitRekey : func(tableID uint64, handNo uint64, deckB64 string) Inspect
ShareKeys : func(tableID uint64, handNo uint64, keysHex string) Inspect
Act : func(tableID uint64, handNo uint64, action string, amount int64) Inspect
RevealSeed : func(tableID uint64, handNo uint64, seedHex string) Inspect
seedBytes : func(p *poker.HandPlayer) []uint8 Inspect
Accept : func(tableID uint64, handNo uint64) Inspect
Finalize : func(tableID uint64) Inspect
Timeout : func(tableID uint64) Inspect
denom : untyped string ="ugnot"
Seat : type =poker.Seat
Table : type =poker.Table
tables : []*poker.Table (len=4) Inspect
txCtx : type =poker.txCtx
newCtx : func() *poker.txCtx Inspect
sentUgnot : func() int64 Inspect
assertNoSend : func() Inspect
getTable : func(id uint64) *poker.Table Inspect
CreateTable : func(smallBlind int64, bigBlind int64, minBuyIn int64, maxBuyIn int64, maxPlayers int, actionTimeoutBlocks int64, challengeWindowBlocks int64, challengeBond int64) uint64 Inspect
Join : func(tableID uint64, session string, gasAllowance int64) Inspect
TopUp : func(tableID uint64) Inspect
Leave : func(tableID uint64) Inspect
SitOut : func(tableID uint64) Inspect
SitIn : func(tableID uint64) Inspect
totalEscrow : func() int64 Inspect
ChallengesEnabled : func() bool Inspect
i64s : func(v int64) string Inspect
itoa : func(v int) string Inspect
qs : func(s string) string Inspect
bools : func(b bool) string Inspect
intList : func(xs []int) string Inspect
ListTables : func() string Inspect
GetTable : func(tableID uint64) string Inspect
GetDeck : func(tableID uint64) string Inspect
renderMaxTables : untyped bigint =(50 <untyped> bigint)
Render : func(path string) string Inspect
challengesEnabled : untyped bool =true
primeP : []uint8 (len=256) Inspect
powModP : func(base []uint8, exp []uint8) []uint8 Inspect