order
typeValue
game33.order
padU
func(n uint64, w int) string- OID
- 053b6a…4dfb:3
padU details
hexDigits
untyped stringValue
"0123456789abcdef"
priceKey
func(wantAmt uint64, giveAmt uint64) stringpriceKey = want-per-give × 1e12 as a fixed-width 24-hex-digit number (96 bits; amounts ≤ 1e15 keep it \< 2^90). Lexicographic = numeric order, so ascending book keys are the cheapest asks first for takers.
- OID
- 053b6a…4dfb:5
priceKey details
sideEntryLen
untyped bigint// priceKey(24) + id(12) + maker address(40)
Value
(76 <untyped> bigint)
sideSortLen
untyped bigint// entries sort by priceKey then id (FIFO within a price)
Value
(36 <untyped> bigint)
maxSideOrders
untyped bigint// open orders per book side; bounds every string we rewrite
Value
(256 <untyped> bigint)
encodeOrder
func(o *game33.order) stringmaker record: id12|give|want|remGive|remWant|expiry|pk
- OID
- 053b6a…4dfb:6
encodeOrder details
decodeOrder
func(maker string, rec string) *game33.order- OID
- 053b6a…4dfb:7
decodeOrder details
makerRecs
func(maker string) []string- OID
- 053b6a…4dfb:8
makerRecs details
setMakerRecs
func(maker string, recs []string)- OID
- 053b6a…4dfb:9
setMakerRecs details
loadOrderOf
func(maker string, id uint64) *game33.orderloadOrderOf finds one of maker's open orders (≤ 20 records scanned).
- OID
- 053b6a…4dfb:10
loadOrderOf details
saveOrder
func(o *game33.order)- OID
- 053b6a…4dfb:11
saveOrder details
sideKey
func(want string, give string) string- OID
- 053b6a…4dfb:12
sideKey details
sideEntry
func(o *game33.order) string- OID
- 053b6a…4dfb:13
sideEntry details
sideStr
func(k string) string- OID
- 053b6a…4dfb:14
sideStr details
sideSearch
func(s string, key string) intsideSearch returns the index of the first entry whose sort key is ≥ key.
- OID
- 053b6a…4dfb:15
sideSearch details
sideInsert
func(o *game33.order)- OID
- 053b6a…4dfb:16
sideInsert details
sideRemove
func(o *game33.order)- OID
- 053b6a…4dfb:17
sideRemove details
iterSide
func(pay string, get string, fn func(...))iterSide walks a taker's side (pays \`pay\`, gets \`get\`) best price first.
- OID
- 053b6a…4dfb:18
iterSide details
sideCount
func(pay string, get string) int- OID
- 053b6a…4dfb:19
sideCount details
grinValueMilli
func(coin string, amt uint64) uint64grinValueMilli = amt × reference value (milli-grin), saturating at 2^64-1.
- OID
- 053b6a…4dfb:20
grinValueMilli details
openOrderCount
func(maker string) uint64- OID
- 053b6a…4dfb:21
openOrderCount details
PlaceOrder
func(give string, giveAmt uint64, want string, wantAmt uint64, expirySecs int64) uint64PlaceOrder escrows giveAmt of \`give\` and lists it for wantAmt of \`want\` (any pair). No upfront posting fee — the 0.90% maker fee is deducted from the maker's proceeds at fill time. Returns the order id. expirySecs 0 = 72 h; max 7 days.
- OID
- 053b6a…4dfb:22
PlaceOrder details
closeOrder
func(o *game33.order, reason string)closeOrder refunds the remaining escrow to the MAKER (never anyone else) and deletes the order. Every close path goes through here.
- OID
- 053b6a…4dfb:23
closeOrder details
CancelOrder
func(id uint64)CancelOrder: the maker gets the remaining escrow back. Works while paused and for banned makers; only the maker can cancel.
- OID
- 053b6a…4dfb:24
CancelOrder details
SweepExpiredOrders
func(pay string, get string) intSweepExpiredOrders closes up to maxScanPerTx expired orders of one book side, refunding each maker. Anyone may call it (also while paused).
- OID
- 053b6a…4dfb:25
SweepExpiredOrders details
fillStep
typeValue
game33.fillStep
planFills
func(caller string, pay string, get string, budget uint64, maxFills int, now int64) ([]game33.fillStep, []*game33.order, uint64, uint64)planFills walks the book for a taker (read-only). budget is the most the taker will spend INCLUDING the taker fee. Own orders are skipped (no self-match); expired orders are returned for closing.
- OID
- 053b6a…4dfb:26
planFills details
executeFills
func(caller string, pay string, steps []game33.fillStep) uint64executeFills applies a plan: the taker pays each maker x (plus taker fee), receives g from escrow. The maker receives x minus the 0.90% maker fee (deducted from proceeds, not from escrow). Returns total received by taker.
- OID
- 053b6a…4dfb:27
executeFills details
FillOrders
func(pay string, get string, payAmt uint64, minGet uint64, maxFills int, deadline int64) uint64FillOrders: spend at most payAmt of \`pay\` (taker fee included) on the best-priced orders that give \`get\`; receive at least minGet or revert. ≤ 10 fills and ≤ 20 scanned entries per call.
- OID
- 053b6a…4dfb:28
FillOrders details
orderJSON
func(o *game33.order) string- OID
- 053b6a…4dfb:29
orderJSON details
Order
func(maker string, id uint64) stringOrder shows one open order of \`maker\` (lookups are per maker by design).
- OID
- 053b6a…4dfb:30
Order details
OrdersOf
func(addr string) stringOrdersOf lists an address's open orders (≤ 20 by construction).
- OID
- 053b6a…4dfb:31
OrdersOf details
BookDepth
func(pay string, get string, limit int, offset int) stringBookDepth lists asks for a taker who pays \`pay\` and gets \`get\`, best price first (≤ 50 rows; offset \< maxSideOrders).
- OID
- 053b6a…4dfb:32
BookDepth details
QuoteFill
func(caller string, pay string, get string, payAmt uint64, maxFills int) stringQuoteFill previews FillOrders for a budget (fee included): {"spent","got"}.
- OID
- 053b6a…4dfb:33
QuoteFill details
hubCoin
untyped stringValue
"grin"
poolFeeBps
uint64Value
50
protoFeeBps
uint64Value
15
minLiquidity
uint64// first-deposit shares burned forever
Value
1000
minOpenDepthGrin
uint64// a pool takes swaps only once rGrin ≥ this
Value
2000
warmupSecs
int64// LP fee warm-up (principal always instant)
Value
600
rootKScale
uint64Value
1000000000
takerFeeBps
uint64Value
50
makerFeeBps
uint64Value
90
minOrderGrinX1k
uint64// 50 grin of value (reference table) — size floor only
Value
50000
maxOpenOrders
uint64Value
20
defaultExpiry
int64Value
259200
maxExpiry
int64Value
604800
maxFillsPerTx
untyped bigintValue
(10 <untyped> bigint)
maxScanPerTx
untyped bigintValue
(20 <untyped> bigint)
maxViewLimit
untyped bigintValue
(50 <untyped> bigint)
maxAmount
uint64// 1e15
Value
1000000000000000
prefMilli
[7]uint64Reference value per rarity in milli-grin (RARITY\_VALUE ×1000). Used ONLY for the 50-grin minimum order size — never for prices.
- OID
- 053b6a…4dfb:35
prefMilli details
pools
v0.Tree// coin → \*pool
- OID
- 053b6a…4dfb:37
pools details
lpPositions
v0.Tree// coin+":"+addr → \*lpPos
- OID
- 053b6a…4dfb:39
lpPositions details
adminFees
v0.Tree// coin → admin's accrued protocol fees (pull)
- OID
- 053b6a…4dfb:41
adminFees details
casinoPool
v0.Tree// coin → casino pool balance (fees in, capped jackpots out)
- OID
- 053b6a…4dfb:43
casinoPool details
makerBooks
v0.Tree// maker → ";"-joined compact order records (≤ maxOpenOrders)
- OID
- 053b6a…4dfb:45
makerBooks details
sides
v0.Tree// want+">"+give → sorted fixed-width entries (≤ maxSideOrders)
- OID
- 053b6a…4dfb:47
sides details
openOrderTotal
uint64Value
0
nextOrderId
uint64Value
0
exPaused
boolValue
false
adminFeesWithdrawn
v0.Tree// coin → lifetime withdrawn by the admin
- OID
- 053b6a…4dfb:52
adminFeesWithdrawn details
adminGnotWithdrawn
int64// ugnot withdrawn by WithdrawFunds (≤ passRevenueUgnot)
Value
0
addChk
func(a uint64, b uint64) uint64- OID
- 053b6a…4dfb:54
addChk details
subChk
func(a uint64, b uint64) uint64- OID
- 053b6a…4dfb:56
subChk details
mulDiv
func(a uint64, b uint64, c uint64) uint64mulDiv = floor(a\*b/c) with a 128-bit product; panics if c == 0 or the quotient does not fit in 64 bits.
- OID
- 053b6a…4dfb:57
mulDiv details
mulDivUp
func(a uint64, b uint64, c uint64) uint64mulDivUp = ceil(a\*b/c).
- OID
- 053b6a…4dfb:58
mulDivUp details
isqrt128
func(a uint64, b uint64) uint64isqrt128 = floor(sqrt(a\*b)) for the 128-bit product (Newton, bounded).
- OID
- 053b6a…4dfb:59
isqrt128 details
isqrt
func(n uint64) uint64- OID
- 053b6a…4dfb:60
isqrt details
mulLess
func(a uint64, b uint64, c uint64, d uint64) boolmulLess reports a\*b \< c\*d using 128-bit products.
- OID
- 053b6a…4dfb:61
mulLess details
requireBalance
func(addr string, coin string, amt uint64)requireBalance checks a balance before any write, so a failing call changes nothing (validate-then-write).
- OID
- 053b6a…4dfb:62
requireBalance details
requireAmount
func(name string, v uint64)- OID
- 053b6a…4dfb:63
requireAmount details
u
func(n uint64) string- OID
- 053b6a…4dfb:64
u details
exchangeCaller
func() stringexchangeCaller returns the caller for exchange writes. Only end users (an EOA MsgCall or the user's own MsgRun) may trade: other realms can't act through the exchange, so there is no cross-realm call surface at all.
- OID
- 053b6a…4dfb:65
exchangeCaller details
requireMarketOpen
func(caller string)requireMarketOpen gates NEW activity (swaps, deposits, orders, fills). Trading opens only after FinalizeMigration: MigrateBatch SETs balances, so trading before that could duplicate or lose escrowed coins.
- OID
- 053b6a…4dfb:66
requireMarketOpen details
requireDeadline
func(deadline int64)- OID
- 053b6a…4dfb:67
requireDeadline details
requireCoin
func(coin string) int- OID
- 053b6a…4dfb:68
requireCoin details
accrueProtocolFee
func(coin string, amt uint64)accrueProtocolFee splits amt of coin 50/50: the floor half to the admin's fee ledger, the rest to the casino pool. Both stay inside the realm.
- OID
- 053b6a…4dfb:69
accrueProtocolFee details
WithdrawProtocolFees
func(coin string) uint64WithdrawProtocolFees moves the admin's OWN accrued fees for \`coin\` into the admin's balance. It reads only adminFees (never reserves, escrow, the casino pool or anyone's balance) and works while paused.
- OID
- 053b6a…4dfb:70
WithdrawProtocolFees details
SetExchangePaused
func(p bool)SetExchangePaused stops NEW swaps, deposits, orders and fills. It can't stop RemoveLiquidity, CancelOrder, SweepExpiredOrders or fee withdrawals.
- OID
- 053b6a…4dfb:71
SetExchangePaused details
ExchangeStatus
func() string- OID
- 053b6a…4dfb:72
ExchangeStatus details
ProtocolFees
func(coin string) string- OID
- 053b6a…4dfb:73
ProtocolFees details
DepositGnot
func() uint64DepositGnot wraps the ugnot attached to this MsgCall into the exchange's internal "gnot" balance, enabling the player to trade or provide GNOT liquidity. Attach the desired ugnot amount to the MsgCall as a send value.
- OID
- 053b6a…4dfb:74
DepositGnot details
WithdrawGnot
func(amtStr string)WithdrawGnot converts internal "gnot" balance back to real ugnot and sends it to the caller. Works while the exchange is paused — it is an exit, not a trade. Any player can call this for their own balance at any time.
- OID
- 053b6a…4dfb:75
WithdrawGnot details
gnotPools
v0.Tree// coin → \*pool (reuses the pool struct from exchange\_pool.gno)
- OID
- 053b6a…4dfb:77
gnotPools details
gnotLpPositions
v0.Tree// coin+":"+addr → \*lpPos
- OID
- 053b6a…4dfb:79
gnotLpPositions details
gnotPool
func(coin string) *game33.poolgnotPool returns the COIN/GNOT pool for coin, panicking if it doesn't exist.
- OID
- 053b6a…4dfb:80
gnotPool details
OpenGnotPool
func(coin string, coinAmt uint64, gnotAmt uint64, minShares uint64, deadline int64) uint64OpenGnotPool creates a new COIN/GNOT pool and seeds the first liquidity, atomically setting the opening price. Any player who holds the coin and enough deposited GNOT can call this — no admin required. coinAmt/gnotAmt set the price ratio; whoever opens the pool first controls the opening price. 1,000 shares are permanently burned as a seed.
- OID
- 053b6a…4dfb:82
OpenGnotPool details
AddGnotLiquidity
func(coin string, coinMax uint64, gnotMax uint64, minShares uint64, deadline int64) uint64AddGnotLiquidity deposits up to coinMax of \`coin\` and gnotMax internal GNOT. Follows the current pool ratio. Reverts unless at least minShares are minted.
- OID
- 053b6a…4dfb:83
AddGnotLiquidity details
RemoveGnotLiquidity
func(coin string, shares uint64, minCoin uint64, minGnot uint64, deadline int64) (uint64, uint64)RemoveGnotLiquidity is always available — works while the exchange or pool is paused. Returns (coinOut, gnotOut).
- OID
- 053b6a…4dfb:84
RemoveGnotLiquidity details
poolSwapGnot
func(p *game33.pool, inIsHub bool, amountIn uint64) uint64poolSwapGnot executes one hop (coin↔gnot) for internal routing. The caller's input must already have been debited.
- OID
- 053b6a…4dfb:85
poolSwapGnot details
GnotBalance
func(addr string) stringGnotBalance returns the caller's internal GNOT balance (deposited ugnot).
- OID
- 053b6a…4dfb:86
GnotBalance details
GnotPoolInfo
func(coin string) stringGnotPoolInfo returns the state of the COIN/GNOT pool for \`coin\`.
- OID
- 053b6a…4dfb:87
GnotPoolInfo details
GnotPools
func(limit int, offset int) stringGnotPools lists COIN/GNOT pools (paginated, ≤ 50 per call).
- OID
- 053b6a…4dfb:88
GnotPools details
QuoteGnotSwap
func(coinIn string, coinOut string, amountIn uint64) stringQuoteGnotSwap quotes a single GNOT-pool swap; "0" if unavailable.
- OID
- 053b6a…4dfb:89
QuoteGnotSwap details
GnotLpPosition
func(coin string, addr string) stringGnotLpPosition shows one GNOT LP position and current withdrawal value.
- OID
- 053b6a…4dfb:90
GnotLpPosition details
GnotLpPositions
func(addr string, limit int, offset int) stringGnotLpPositions lists all GNOT LP positions for an address (paginated).
- OID
- 053b6a…4dfb:91
GnotLpPositions details
pool
typeValue
game33.pool
lpPos
typeValue
game33.lpPos
getPool
func(coin string) *game33.pool- OID
- 053b6a…4dfb:92
getPool details
rootKPerShare
func(p *game33.pool) uint64- OID
- 053b6a…4dfb:94
rootKPerShare details
CreatePool
func(coin string)CreatePool opens an empty COIN/GRIN pool (admin, per the launch schedule). It holds nothing until players deposit; the admin can't deposit for anyone, withdraw from it or close it.
- OID
- 053b6a…4dfb:95
CreatePool details
OpenPool
func(coin string, coinAmt uint64, grinAmt uint64, minShares uint64, deadline int64) uint64OpenPool creates a new COIN/GRIN pool and immediately deposits the first liquidity, atomically setting the opening price. Any player who holds the coin and enough Grin can call this — no admin required. coinAmt and grinAmt set the price ratio; whoever calls this first for a coin controls the opening price, so choose amounts that reflect the coin's real value. 1,000 shares are permanently burned as a sandwich-resistance seed. Returns the number of LP shares minted for the caller.
- OID
- 053b6a…4dfb:96
OpenPool details
SetPoolPaused
func(coin string, p bool)SetPoolPaused stops new swaps and deposits on one pool. Withdrawals stay open.
- OID
- 053b6a…4dfb:97
SetPoolPaused details
AddLiquidity
func(coin string, coinMax uint64, grinMax uint64, minShares uint64, deadline int64) uint64AddLiquidity deposits up to coinMax of \`coin\` and grinMax grin. The first deposit sets the price (open economy: any ratio) and burns minLiquidity shares; later deposits take the current ratio (never more than either cap). Reverts unless at least minShares are minted.
- OID
- 053b6a…4dfb:98
AddLiquidity details
lpPayout
func(p *game33.pool, pos *game33.lpPos, shares uint64, now int64) (uint64, uint64)lpPayout computes what \`shares\` of a position withdraw right now: pro-rata of CURRENT reserves (floor). Within the warm-up the fee growth since entry (√k/share above entry) stays in the pool for the other LPs; principal is never cut below its entry-value share.
- OID
- 053b6a…4dfb:99
lpPayout details
RemoveLiquidity
func(coin string, shares uint64, minCoin uint64, minGrin uint64, deadline int64) (uint64, uint64)RemoveLiquidity is instant and ALWAYS available: it works while the exchange or the pool is paused, before or after a ban, and needs no tool. Nobody but the position owner can call it for that position.
- OID
- 053b6a…4dfb:100
RemoveLiquidity details
poolQuote
func(p *game33.pool, inIsHub bool, amountIn uint64) (uint64, uint64)poolQuote returns (out, protoFee) for amountIn of the input side; no writes.
- OID
- 053b6a…4dfb:101
poolQuote details
poolOpenForSwaps
func(p *game33.pool) bool- OID
- 053b6a…4dfb:102
poolOpenForSwaps details
poolSwap
func(p *game33.pool, inIsHub bool, amountIn uint64) uint64poolSwap executes one hop (coin↔grin) for \`caller\`, crediting nothing to the caller: it returns the output so routes can chain hops. The caller's input must already have been debited.
- OID
- 053b6a…4dfb:103
poolSwap details
SwapExactIn
func(coinIn string, coinOut string, amountIn uint64, minOut uint64, deadline int64) uint64SwapExactIn swaps amountIn of coinIn for at least minOut of coinOut through one pool (one side must be grin). For X→Y via grin use SwapRoute.
- OID
- 053b6a…4dfb:104
SwapExactIn details
poolJSON
func(p *game33.pool) string- OID
- 053b6a…4dfb:105
poolJSON details
PoolInfo
func(coin string) string- OID
- 053b6a…4dfb:106
PoolInfo details
Pools
func(limit int, offset int) stringPools lists pools in coin order (paginated, ≤ 50 per call).
- OID
- 053b6a…4dfb:107
Pools details
QuoteSwap
func(coinIn string, coinOut string, amountIn uint64) stringQuoteSwap quotes a single-pool swap; "0" if the pool can't take it.
- OID
- 053b6a…4dfb:108
QuoteSwap details
LpPosition
func(coin string, addr string) stringLpPosition shows one position and what it would withdraw right now.
- OID
- 053b6a…4dfb:109
LpPosition details
LpPositions
func(addr string, limit int, offset int) stringLpPositions lists an address's positions (bounded: at most one per pool, paginated by pool order, ≤ 50 pools scanned per call).
- OID
- 053b6a…4dfb:110
LpPositions details
poolPathOut
func(coinIn string, coinOut string, amountIn uint64) (uint64, bool)poolPathOut quotes amountIn of coinIn → coinOut through the grin pools (one hop if either side is grin, else coinIn→grin→coinOut). ok=false if a needed pool is missing or not open. Read-only.
- OID
- 053b6a…4dfb:111
poolPathOut details
gnotPathOut
func(coinIn string, coinOut string, amountIn uint64) (uint64, bool)gnotPathOut quotes amountIn of coinIn → coinOut through GNOT pools. Handles: gnot↔coin (one GNOT pool hop), coin↔coin via gnot hub (two hops). Read-only; ok=false if no suitable GNOT pool exists or is open.
- OID
- 053b6a…4dfb:113
gnotPathOut details
bestPathOut
func(coinIn string, coinOut string, amountIn uint64) (uint64, bool)bestPathOut returns the best available output from either GRIN or GNOT pools. Read-only; used by routePlanAny for GNOT-aware routing.
- OID
- 053b6a…4dfb:114
bestPathOut details
routePlan
func(caller string, coinIn string, coinOut string, amountIn uint64, maxFills int, now int64) ([]game33.fillStep, []*game33.order, uint64, uint64, uint64)routePlan splits amountIn between book fills (direct pair) and the pool path. A book fill is taken while its rate is at least the pool path's average rate for the whole remainder; everything else goes to the pools.
- OID
- 053b6a…4dfb:115
routePlan details
SwapRoute
func(coinIn string, coinOut string, amountIn uint64, minOut uint64, maxFills int, deadline int64) uint64SwapRoute swaps up to amountIn of coinIn for at least minOut of coinOut, using the order book (direct pair) while it beats the pools and the grin pools for the rest. Coins not needed are never debited.
- OID
- 053b6a…4dfb:116
SwapRoute details
QuoteRoute
func(caller string, coinIn string, coinOut string, amountIn uint64, maxFills int) stringQuoteRoute previews SwapRoute: how much goes to the book vs the pools and the expected output (fees included).
- OID
- 053b6a…4dfb:117
QuoteRoute details
requireCoinOrGnot
func(coin string)requireCoinOrGnot validates a coin for GNOT-aware routes.
- OID
- 053b6a…4dfb:118
requireCoinOrGnot details
gnotRoutePlan
func(caller string, coinIn string, coinOut string, amountIn uint64, maxFills int, now int64) ([]game33.fillStep, []*game33.order, uint64, uint64, uint64)gnotRoutePlan is routePlan extended to also check GNOT pools. It uses bestPathOut (max of GRIN and GNOT pool outputs) for the pool comparison.
- OID
- 053b6a…4dfb:119
gnotRoutePlan details
executeGnotPoolSwap
func(coinIn string, coinOut string, poolIn uint64) uint64executeGnotPoolSwap executes the pool leg of a GNOT-aware swap, choosing the better route (GRIN or GNOT pools) for the given pair.
- OID
- 053b6a…4dfb:120
executeGnotPoolSwap details
SwapRouteGnot
func(coinIn string, coinOut string, amountIn uint64, minOut uint64, maxFills int, deadline int64) uint64SwapRouteGnot swaps coinIn for coinOut where either side may be "gnot". Uses the order book first (same as SwapRoute) then the best available pool (GRIN or GNOT, whichever gives better output).
- OID
- 053b6a…4dfb:121
SwapRouteGnot details
QuoteRouteGnot
func(caller string, coinIn string, coinOut string, amountIn uint64, maxFills int) stringQuoteRouteGnot previews SwapRouteGnot (either side may be "gnot").
- OID
- 053b6a…4dfb:122
QuoteRouteGnot details
init.130
func()- OID
- 053b6a…4dfb:123
init.130 details
isAdmin
func() bool- OID
- 053b6a…4dfb:125
isAdmin details
requireAdmin
func()- OID
- 053b6a…4dfb:126
requireAdmin details
TransferAdmin
func(newAdmin string)TransferAdmin hands the admin role to another address.
- OID
- 053b6a…4dfb:127
TransferAdmin details
transferAdmin
func(newAdmin string)- OID
- 053b6a…4dfb:128
transferAdmin details
UpdateConfig
func(newAdmin string)UpdateConfig is kept for game27/28 API compatibility (= TransferAdmin).
- OID
- 053b6a…4dfb:129
UpdateConfig details
SetClaimSigner
func(pubKeyHex string)SetClaimSigner registers the ed25519 public key (64 hex chars) of the server's claim signer. Pass "" to disable all vouchered calls (kill switch).
- OID
- 053b6a…4dfb:130
SetClaimSigner details
ClaimSigner
func() string- OID
- 053b6a…4dfb:131
ClaimSigner details
Admin
func() string- OID
- 053b6a…4dfb:132
Admin details
SetPaused
func(p bool)- OID
- 053b6a…4dfb:133
SetPaused details
IsPaused
func() bool- OID
- 053b6a…4dfb:134
IsPaused details
requireNotPaused
func()- OID
- 053b6a…4dfb:135
requireNotPaused details
BanAddress
func(targetAddr string, reason string, durationSecs int64)BanAddress bans a player address. durationSecs=0 means permanent.
- OID
- 053b6a…4dfb:136
BanAddress details
UnbanAddress
func(targetAddr string)- OID
- 053b6a…4dfb:137
UnbanAddress details
BlacklistStatus
func(addr string) string- OID
- 053b6a…4dfb:138
BlacklistStatus details
isBlacklisted
func(addr string) bool- OID
- 053b6a…4dfb:139
isBlacklisted details
requirePlayer
func() string- OID
- 053b6a…4dfb:140
requirePlayer details
veinMax
func(coinId string) uint64- OID
- 053b6a…4dfb:141
veinMax details
veinMintedOf
func(coinId string) uint64- OID
- 053b6a…4dfb:142
veinMintedOf details
takeFromVein
func(coinId string, amt uint64) uint64takeFromVein returns how much of amt can still be minted for coinId and records it as minted.
- OID
- 053b6a…4dfb:143
takeFromVein details
SetVeinMax
func(coinId string, maxSupply string)SetVeinMax overrides a coin's vein size. It can't go below what was minted.
- OID
- 053b6a…4dfb:144
SetVeinMax details
setVeinMax
func(coinId string, maxSupply string)- OID
- 053b6a…4dfb:145
setVeinMax details
RegisterVein
func(coinId string, maxSupply string)RegisterVein is the game28 name for SetVeinMax.
- OID
- 053b6a…4dfb:146
RegisterVein details
VeinSupply
func(coinId string) string- OID
- 053b6a…4dfb:147
VeinSupply details
SetPassPrice
func(ugnotPer30Days int64)SetPassPrice sets the ugnot price per 30-day period.
- OID
- 053b6a…4dfb:148
SetPassPrice details
PassPrice
func() int64- OID
- 053b6a…4dfb:149
PassPrice details
ActivateGnomePass
func(durationDays int64)ActivateGnomePass buys durationDays (30..360, multiple of 30) of Gnome Pass. The tx must attach exactly passPrice × durationDays/30 ugnot (MsgCall send).
- OID
- 053b6a…4dfb:150
ActivateGnomePass details
GnomePassExpiry
func(addr string) int64- OID
- 053b6a…4dfb:151
GnomePassExpiry details
HasActivePass
func(addr string) bool- OID
- 053b6a…4dfb:152
HasActivePass details
GnomePassCount
func() int- OID
- 053b6a…4dfb:153
GnomePassCount details
PassRevenue
func() int64- OID
- 053b6a…4dfb:154
PassRevenue details
TreasuryBalance
func() int64TreasuryBalance returns the ugnot held by this realm (pass revenue not yet withdrawn).
- OID
- 053b6a…4dfb:155
TreasuryBalance details
WithdrawFunds
func(to string, amountUgnot int64)WithdrawFunds sends GNOT the admin is OWED — Gnome Pass revenue not yet withdrawn — to \`to\`. It can never touch other ugnot the realm holds (donations, anything a future feature would hold for players).
- OID
- 053b6a…4dfb:156
WithdrawFunds details
WithdrawableFunds
func() int64WithdrawableFunds = pass revenue the admin may still withdraw (ugnot).
- OID
- 053b6a…4dfb:157
WithdrawableFunds details
MigrateBatch
func(batchId string, kind string, rowsJson string) int── Migration (game31 → game32) ────────────────────────────────────────────── MigrateBatch(batchId, kind, rowsJson) imports one batch. rowsJson is a JSON array of string arrays. Kinds and row shapes: balance [addr, coinId, amount] → balances (SET, not add) lifetime [addr, coinId, amount] → lifetimeMined (SET) + miners total tools [addr, "t1,t2,..."] → ownedTools (SET, unknown ids dropped) toollife [addr, toolId, life] → toolLife (SET, clamped to max) skill [addr, skillId, rank] → skillRanks (SET, clamped to max) medal [addr, achievementId] → achievements (allowlisted ids only) pass [addr, expiryUnix] → gnomePasses (SET) guild [guildId, name, leader, "m1,m2,..."] → guilds + members ban [addr, reason, expiryUnix] → blacklist (expiry 0 = permanent) A batchId that was already applied is skipped, and every write is a SET, so re-running a whole migration is a no-op. FinalizeMigration locks it forever. Every unique player address in a batch is recorded in migrationAddrs so that MigrationStatus can report how many distinct players were migrated.
- OID
- 053b6a…4dfb:158
MigrateBatch details
FinalizeMigration
func()- OID
- 053b6a…4dfb:159
FinalizeMigration details
MigrationStatus
func() stringMigrationStatus returns a JSON object with: - finalized: bool — true once FinalizeMigration has been called - batches: int — number of distinct batch IDs applied - addresses: int — number of distinct player addresses migrated across all batches
- OID
- 053b6a…4dfb:160
MigrationStatus details
MigrationBatch
func(batchId string) string- OID
- 053b6a…4dfb:161
MigrationBatch details
validAddr
func(s string) bool- OID
- 053b6a…4dfb:162
validAddr details
migrateRow
func(kind string, r []string) bool- OID
- 053b6a…4dfb:163
migrateRow details
casinoBets
v0.Tree// roundId+":"+addr → \*casinoBet
- OID
- 053b6a…4dfb:165
casinoBets details
casinoReserved
v0.Tree// coin → largest net payouts of unsettled bets (string)
- OID
- 053b6a…4dfb:167
casinoReserved details
casinoDay
v0.Tree// coin → "day:snapshot:paid:received" (UTC day)
- OID
- 053b6a…4dfb:169
casinoDay details
casinoWinRange
uint64// winning rolls per pick (of 100) for flip/wheel
Value
49
rpsWinBelow
uint64// rps: roll \< 33 player wins
Value
33
rpsPushBelow
uint64// rps: 33..64 push
Value
65
casinoBetWindowSec
int64// a committed round takes its bet within 1 h
Value
3600
casinoSeedTimeoutSec
int64// refunds open 30 min after the bet if s is never revealed
Value
1800
casinoSecretTimeoutSec
int64// the bet forfeits 24 h after s if c is never revealed
Value
86400
casinoMaxBetBps
uint64// flip / wheel / rps bet ≤ 0.5% of the free pool
Value
50
slotsMaxBetPPM
uint64// slots bet ≤ 0.004% of the free pool
Value
40
casinoOpenBps
uint64// open reservations on a coin ≤ 20% of the pool
Value
2000
casinoDayBps
uint64// daily net payout ≤ 10% of the day's snapshot
Value
1000
casinoMinPoolMilli
uint64// ≥ 20,000 grin-equivalent …
Value
20000000
casinoMinPoolUnits
uint64// … and ≥ 200 units of the coin
Value
200
casinoMaxAmount
uint64Value
1000000000
casinoRefMilli
[7]uint64Reference value per unit by rarity, in milli-grin (same table as the exchange plan): only used for the pool's opening threshold.
- OID
- 053b6a…4dfb:171
casinoRefMilli details
casinoRound
typeValue
game33.casinoRound
casinoBet
typeValue
game33.casinoBet
isOperator
func() boolisOperator: the casino operator key commits and reveals server seeds. Once an operator is set, only that key can; the admin (treasury) key only stands in while no operator has been named yet (bootstrap and tests).
- OID
- 053b6a…4dfb:172
isOperator details
SetOperator
func(addr string)SetOperator lets the admin name the server account that commits and reveals casino seeds. It must be its own key, never the admin/treasury key. The operator can't move anyone's coins.
- OID
- 053b6a…4dfb:174
SetOperator details
Operator
func() string- OID
- 053b6a…4dfb:175
Operator details
casinoStats
v0.Tree// coin:field or coin:game:field → uint (string)
- OID
- 053b6a…4dfb:177
casinoStats details
casStat
func(coin string, game string, field string, add uint64)- OID
- 053b6a…4dfb:178
casStat details
casRecord
func(coin string, game string, staked uint64, paid uint64)- OID
- 053b6a…4dfb:179
casRecord details
CasinoStats
func(coinId string) stringCasinoStats reports a coin's accounting: pool, reserved, jackpots, seeded, staked, paid, the conservation check and per-game rounds/staked/paid.
- OID
- 053b6a…4dfb:180
CasinoStats details
casGet
func(t *v0.Tree, key string) uint64- OID
- 053b6a…4dfb:181
casGet details
casSet
func(t *v0.Tree, key string, v uint64)- OID
- 053b6a…4dfb:182
casSet details
casAdd
func(a uint64, b uint64) uint64- OID
- 053b6a…4dfb:183
casAdd details
casSub
func(a uint64, b uint64) uint64- OID
- 053b6a…4dfb:184
casSub details
casMulDiv
func(a uint64, b uint64, c uint64) uint64casMulDiv = floor(a\*b/c) with a 128-bit product.
- OID
- 053b6a…4dfb:185
casMulDiv details
casMul
func(a uint64, b uint64) uint64- OID
- 053b6a…4dfb:186
casMul details
casU
func(n uint64) string- OID
- 053b6a…4dfb:187
casU details
casBalOf
func(addr string, coin string) uint64- OID
- 053b6a…4dfb:188
casBalOf details
casCredit
func(addr string, coin string, amt uint64)- OID
- 053b6a…4dfb:189
casCredit details
casDebit
func(addr string, coin string, amt uint64)- OID
- 053b6a…4dfb:190
casDebit details
casGrinValueMilli
func(coin string, amt uint64) uint64- OID
- 053b6a…4dfb:191
casGrinValueMilli details
casIsHex64
func(s string) bool- OID
- 053b6a…4dfb:192
casIsHex64 details
casSafe
func(s string, maxLen int) boolcasSafe: a short \[A-Za-z0-9\_.-] token (no quotes, so it is JSON-safe).
- OID
- 053b6a…4dfb:193
casSafe details
sha256Hex
func(s string) string- OID
- 053b6a…4dfb:194
sha256Hex details
CasinoRoll
func(serverSeed string, clientSecret string, roundId string, game string) uint64CasinoRoll is the on-chain roll: uint32(sha256(s:c:roundId:game)\[0:4]) % 100.
- OID
- 053b6a…4dfb:195
CasinoRoll details
CasinoOutcome
func(game string, roll uint64) stringCasinoOutcome maps a roll to what landed. For rps the outcome is "win" | "push" | "lose" (see rpsHouseMove for the move shown).
- OID
- 053b6a…4dfb:196
CasinoOutcome details
rpsHouseMove
func(choice string, outcome string) stringrpsHouseMove: the house move that produces the outcome against the player's move.
- OID
- 053b6a…4dfb:197
rpsHouseMove details
validCasinoChoice
func(game string, choice string) bool- OID
- 053b6a…4dfb:198
validCasinoChoice details
casinoExposure
func(game string, amt uint64) uint64casinoExposure: the largest net amount a bet can take from the pool.
- OID
- 053b6a…4dfb:199
casinoExposure details
casDayNow
func() int64- OID
- 053b6a…4dfb:200
casDayNow details
casinoDayState
func(coin string) (int64, uint64, uint64, uint64)- OID
- 053b6a…4dfb:201
casinoDayState details
setCasinoDay
func(coin string, day int64, snap uint64, paid uint64, recv uint64)- OID
- 053b6a…4dfb:202
setCasinoDay details
casinoIsOpen
func(coin string, pool uint64) bool- OID
- 053b6a…4dfb:203
casinoIsOpen details
casinoMaxBet
func(game string, free uint64) uint64- OID
- 053b6a…4dfb:204
casinoMaxBet details
casinoCheckBet
func(coin string, game string, amt uint64)casinoCheckBet panics unless the pool can pay the bet's largest win in full (read-only).
- OID
- 053b6a…4dfb:205
casinoCheckBet details
casinoReserve
func(coin string, exp uint64)- OID
- 053b6a…4dfb:206
casinoReserve details
casinoSettle
func(addr string, coin string, amt uint64, exposure uint64, payout uint64) uint64casinoSettle releases the reservation and moves coins: the player receives \`payout\` (0 ≤ payout ≤ stake + exposure) and the pool keeps the rest of the stake or pays the difference. Returns payout.
- OID
- 053b6a…4dfb:207
casinoSettle details
SeedCasinoPool
func(coinId string, amount string)SeedCasinoPool moves the ADMIN'S OWN on-chain coins into a casino pool. Only ever the admin's own balance; nobody can withdraw a pool back.
- OID
- 053b6a…4dfb:208
SeedCasinoPool details
CasinoPool
func(coinId string) stringCasinoPool reports a coin's pool, reservation, max bets and daily counters.
- OID
- 053b6a…4dfb:209
CasinoPool details
casinoGrants
v0.Tree// addr → \*freeSpinGrant
- OID
- 053b6a…4dfb:211
casinoGrants details
casinoJackpot
v0.Tree// coin:tier → pool (string)
- OID
- 053b6a…4dfb:213
casinoJackpot details
casinoJpDust
v0.Tree// coin:tier → contribution remainder in bet×bps units (string)
- OID
- 053b6a…4dfb:215
casinoJpDust details
casinoJpSeed
v0.Tree// coin:tier → reset seed (string)
- OID
- 053b6a…4dfb:217
casinoJpSeed details
casinoJpRef
v0.Tree// coin → reference bet (string)
- OID
- 053b6a…4dfb:219
casinoJpRef details
freeSpinMult
uint64Value
2
jpMajorBps
uint64// 1.0% of each paid slots stake
Value
100
jpGrandBps
uint64// 0.5%
Value
50
jpDefaultRefBet
uint64Value
100
jpResetFreeMultiple
uint64Value
20
hsMiniMult
uint64Value
20
hsMinorMult
uint64Value
75
freeSpinGrant
typeValue
game33.freeSpinGrant
getGrant
func(addr string) *game33.freeSpinGrant- OID
- 053b6a…4dfb:220
getGrant details
jpKey
func(coin string, tier string) string- OID
- 053b6a…4dfb:222
jpKey details
jpRefBet
func(coin string) uint64- OID
- 053b6a…4dfb:223
jpRefBet details
casinoJackpotContribute
func(coin string, amt uint64)casinoJackpotContribute moves 1.0% / 0.5% of a paid slots stake from the house pool into the MAJOR / GRAND pools (remainders carried, nothing rounded away).
- OID
- 053b6a…4dfb:224
casinoJackpotContribute details
casinoJackpotPay
func(addr string, coin string, tier string, bet uint64) uint64casinoJackpotPay pays a jackpot tier to addr: pool × min(1, bet/refBet).
- OID
- 053b6a…4dfb:225
casinoJackpotPay details
slotsHSPayout
func(tiles *[20]uint16, full bool) (uint64, bool, bool)slotsHSPayout turns Hold & Spin tiles into bet multiples (under the cap) and the jackpot tiers won (paid from their pools).
- OID
- 053b6a…4dfb:226
slotsHSPayout details
PlaceCasinoFreeSpin
func(roundId string, clientHash string)PlaceCasinoFreeSpin uses one free spin of the caller's grant in a committed round (no stake). One free spin in flight at a time.
- OID
- 053b6a…4dfb:227
PlaceCasinoFreeSpin details
settleFreeSpin
func(b *game33.casinoBet, win uint64) uint64settleFreeSpin pays a free spin's win out of its grant's reservation.
- OID
- 053b6a…4dfb:228
settleFreeSpin details
FreeSpinGrant
func(addr string) stringFreeSpinGrant reports a player's open free spins (null when none).
- OID
- 053b6a…4dfb:229
FreeSpinGrant details
CasinoJackpots
func(coinId string) stringCasinoJackpots reports the real MAJOR / GRAND pools and how they pay.
- OID
- 053b6a…4dfb:230
CasinoJackpots details
validJpTier
func(tier string) bool- OID
- 053b6a…4dfb:231
validJpTier details
SeedCasinoJackpot
func(coinId string, tier string, amount string)SeedCasinoJackpot adds the ADMIN'S OWN coins to a jackpot pool (never withdrawable).
- OID
- 053b6a…4dfb:232
SeedCasinoJackpot details
SetCasinoJackpotSeed
func(coinId string, tier string, amount string)SetCasinoJackpotSeed sets the level a jackpot is topped back up to after a hit.
- OID
- 053b6a…4dfb:233
SetCasinoJackpotSeed details
SetCasinoJackpotRefBet
func(coinId string, amount string)SetCasinoJackpotRefBet sets the bet that wins a full jackpot (smaller bets win the same share of the pool as their share of this bet).
- OID
- 053b6a…4dfb:234
SetCasinoJackpotRefBet details
getCasinoRound
func(id string) *game33.casinoRound- OID
- 053b6a…4dfb:235
getCasinoRound details
mustCasinoRound
func(id string) *game33.casinoRound- OID
- 053b6a…4dfb:237
mustCasinoRound details
casinoRoundBet
func(r *game33.casinoRound, roundId string) *game33.casinoBet- OID
- 053b6a…4dfb:238
casinoRoundBet details
CommitCasinoSeed
func(roundId string, player string, seedHash string)CommitCasinoSeed opens a round for one player with sha256(s). Operator only; a round id can be used once.
- OID
- 053b6a…4dfb:239
CommitCasinoSeed details
PlaceCasinoBet
func(roundId string, game string, coinId string, betAmount string, choice string, clientHash string)PlaceCasinoBet escrows the player's bet with sha256(c): only the round's player, only before s is revealed, and only if the pool can pay its largest win.
- OID
- 053b6a…4dfb:240
PlaceCasinoBet details
RevealCasinoSeed
func(roundId string, serverSeed string)RevealCasinoSeed publishes s (it must hash to the commit). It settles nothing: the bet settles when the player's secret is revealed.
- OID
- 053b6a…4dfb:241
RevealCasinoSeed details
RevealCasinoSecret
func(roundId string, clientSecret string)RevealCasinoSecret publishes the player's secret c (anyone may relay it: it must hash to the bet's hash) and settles the bet on chain. Works while paused.
- OID
- 053b6a…4dfb:242
RevealCasinoSecret details
casinoResolve
func(roundId string, r *game33.casinoRound, b *game33.casinoBet)casinoResolve rolls the bet from s and c, pays it, and records the result.
- OID
- 053b6a…4dfb:243
casinoResolve details
RefundCasinoBet
func(roundId string)RefundCasinoBet returns the stake only if s was never revealed and 30 minutes have passed since the bet. Never after s is revealed. Works while paused.
- OID
- 053b6a…4dfb:244
RefundCasinoBet details
ForfeitCasinoBet
func(roundId string)ForfeitCasinoBet settles a bet as a loss when s was revealed but the player's secret was not within 24 h (only the player could know the result). Anyone.
- OID
- 053b6a…4dfb:245
ForfeitCasinoBet details
CasinoRound
func(roundId string) string- OID
- 053b6a…4dfb:246
CasinoRound details
CasinoBet
func(roundId string, addr string) stringCasinoBet returns one player's bet and its on-chain result.
- OID
- 053b6a…4dfb:247
CasinoBet details
JackpotPool
func(coinId string) stringJackpotPool reports the GRAND jackpot pool (the casino bankroll is CasinoPool).
- OID
- 053b6a…4dfb:248
JackpotPool details
CasinoHistory
func(string) string- OID
- 053b6a…4dfb:249
CasinoHistory details
realmPkgPath
untyped stringValue
"gno.land/r/g1algwpj0dch4stpy7pd87n7a3cwx3pjymlpexn7/game33"
admin
.uverse.address// deployer; can set roles, prices, veins, migrate, withdraw
Value
<gnolang.StringValue>
operator
.uverse.address// server hot account for casino seeds (defaults to admin)
Value
<gnolang.StringValue>
claimSignerPubKey
[]uint8Value
<zero>
claimNonces
v0.Tree// addr → last used voucher nonce (decimal string)
- OID
- 053b6a…4dfb:254
claimNonces details
balances
v0.Tree// addr+":"+coinId → amount string
- OID
- 053b6a…4dfb:256
balances details
claimBuckets
v0.Tree// addr → "m0:t0|m1:t1|m2:t2|m3:t3|m4:t4|m5:t5|m6:t6" (packed; lazy-migrated from old addr:r keys)
- OID
- 053b6a…4dfb:258
claimBuckets details
veinMinted
v0.Tree// coinId → total ever credited by claims/rewards/migration
- OID
- 053b6a…4dfb:260
veinMinted details
veinMaxOverride
v0.Tree// coinId → admin-set max (overrides the rarity default)
- OID
- 053b6a…4dfb:262
veinMaxOverride details
veinOverrideActive
bool// true once any SetVeinMax has been called; gates the veinMaxOverride AVL read
Value
false
casinoRounds
v0.Tree// roundId → \*casinoRound
- OID
- 053b6a…4dfb:265
casinoRounds details
pvpLobbies
v0.Tree// lobbyId and lobbyId+":field" → string (see game\_pvp.gno)
- OID
- 053b6a…4dfb:267
pvpLobbies details
pvpWagers
v0.Tree// lobbyId → "coinId:amount:creator:challenger"
- OID
- 053b6a…4dfb:269
pvpWagers details
ownedTools
v0.Tree// addr → comma-separated tool IDs
- OID
- 053b6a…4dfb:271
ownedTools details
toolLife
v0.Tree// addr+":"+toolId → remaining life string
- OID
- 053b6a…4dfb:273
toolLife details
lifetimeMined
v0.Tree// addr+":"+coinId → total mined string (real claims only)
- OID
- 053b6a…4dfb:275
lifetimeMined details
rewarded
v0.Tree// addr+":"+coinId → total credited by rewards (medals etc.)
- OID
- 053b6a…4dfb:277
rewarded details
achievements
v0.Tree// addr+":"+achId → "1"
- OID
- 053b6a…4dfb:279
achievements details
dailyCheckins
v0.Tree// addr → unix seconds string
- OID
- 053b6a…4dfb:281
dailyCheckins details
skillRanks
v0.Tree// addr+":"+skillId → rank string
- OID
- 053b6a…4dfb:283
skillRanks details
miners
v0.Tree// addr → total mined all-time string
- OID
- 053b6a…4dfb:285
miners details
playerXp
v0.Tree// addr → cumulative rarity-weighted XP (uint64 string)
- OID
- 053b6a…4dfb:287
playerXp details
lastClaim
v0.Tree// addr → unix timestamp of last ClaimAndMint
- OID
- 053b6a…4dfb:289
lastClaim details
blacklist
v0.Tree// addr → "reason:timestamp"
- OID
- 053b6a…4dfb:291
blacklist details
banExpiries
v0.Tree// addr → unix expiry (0 = permanent)
- OID
- 053b6a…4dfb:293
banExpiries details
guilds
v0.Tree// guildId → JSON{name, leader, memberCount, createdAt}
- OID
- 053b6a…4dfb:295
guilds details
guildMembers
v0.Tree// guildId+":"+addr → "1"
- OID
- 053b6a…4dfb:297
guildMembers details
playerGuild
v0.Tree// addr → guildId
- OID
- 053b6a…4dfb:299
playerGuild details
gnomePasses
v0.Tree// addr → unix expiry timestamp string
- OID
- 053b6a…4dfb:301
gnomePasses details
paused
boolValue
false
passPriceUgnot
int64Value
5000000
passRevenueUgnot
int64// lifetime ugnot received for passes (accounting only)
Value
0
gnotCoinId
stringValue
"gnot"
gnotDeposited
uint64// lifetime ugnot deposited (accounting / audit)
Value
0
pvpCounter
uint64// monotonically increasing lobby number
Value
0
guildCounter
uint64// monotonically increasing guild number
Value
0
relayAddress
.uverse.addressValue
<zero>
relayNonces
v0.Tree// addr → last nonce (decimal string)
- OID
- 053b6a…4dfb:311
relayNonces details
migrationFinalized
boolValue
true
migrationBatches
v0.Tree// batchId → "kind:count"
- OID
- 053b6a…4dfb:314
migrationBatches details
migrationAddrs
v0.Tree// addr → "1" (deduplicates across batch re-runs)
- OID
- 053b6a…4dfb:316
migrationAddrs details
toolOrder
[]stringtoolOrder is the canonical upgrade path from hands to omega.
- OID
- 053b6a…4dfb:318
toolOrder details
toolRequires
map[string]stringtoolRequires: BuyTool must panic unless the caller owns the prerequisite tool.
- OID
- 053b6a…4dfb:320
toolRequires details
toolMaxRarity
map[string]inttoolMaxRarity: highest coin rarity each tool can mine (used by the claim rate cap).
- OID
- 053b6a…4dfb:322
toolMaxRarity details
toolCosts
map[string][][2]stringtoolCosts maps toolId → slice of \[coinId, amount] pairs. Matches catalog.ts TOOLS array exactly. Amounts are for qty=1.
- OID
- 053b6a…4dfb:324
toolCosts details
skillBaseCosts
map[string][][2]stringskillBaseCosts maps skillId → base cost at rank 0. Actual cost at rank N = base × 2^N (doubles per rank).
- OID
- 053b6a…4dfb:532
skillBaseCosts details
skillMaxRanks
map[string]uint64skillMaxRanks maps skillId → maximum rank allowed. Most skills cap at 3 or 4 — see catalog.ts SKILLS\[\*].max.
- OID
- 053b6a…4dfb:1013
skillMaxRanks details
toolMaxLife
map[string]uint64toolMaxLife maps toolId → maximum durability in blocks broken. 0 = indestructible (hands, starter-twig, twig). Matches catalog.ts tool.life.
- OID
- 053b6a…4dfb:1015
toolMaxLife details
coinRarity
map[string]int- OID
- 053b6a…4dfb:1341
coinRarity details
skillDustHeadroom
uint64// ×175/100
Value
175
skillDmgHeadroom
uint64// ×200/100
Value
200
skillDropHeadroom
uint64// ×130/100
Value
130
toolLifeSkillIds
[]stringtoolLifeSkillIds lists the on-chain skills that grant toolLifeBonus. Covers the Things branch (level 50) and the Nature-branch skills that also affect tool wear. Must stay in sync with catalog.ts SKILLS\[\*].toolLifeBonus.
- OID
- 053b6a…4dfb:1018
toolLifeSkillIds details
toolLifeSkillBonus
map[string]uint64toolLifeSkillBonus maps each skill to its per-rank life bonus fraction × 1000. e.g. "tempered\_grip" → 100 means +10.0% per rank (100/1000 = 0.10).
- OID
- 053b6a…4dfb:1020
toolLifeSkillBonus details
claimBucketSecs
int64── Claim rate cap tables (REPORT.md §5) ───────────────────────────────────── claimBucketSecs: how many seconds of allowance the bucket can bank (1 hour).
Value
3600
claimRatePerMin
map[string][7]uint64claimRatePerMin\[toolId]\[rarity] = max coins/min of that rarity the caller may claim (before skill headroom). Indexed 0=dust..6=mythic.
- OID
- 053b6a…4dfb:1022
claimRatePerMin details
veinDefaultMax
[7]uint64── Vein caps (game29) ─────────────────────────────────────────────────────── Every coin in coinRarity has a vein from deploy: its max is the default for its rarity unless the admin overrides it. No per-coin init writes needed. Defaults: ≈1 year of demand per core coin × 1.5 headroom (see REPORT §6).
- OID
- 053b6a…4dfb:1039
veinDefaultMax details
veinCoinDefault
map[string]uint64Per-coin default overrides (static: no deploy-time writes).
- OID
- 053b6a…4dfb:1041
veinCoinDefault details
coinAmt
type── Achievement allowlist (game29) ─────────────────────────────────────────── Static ids with FIXED rewards. Grind ids "g.\<coin>.\<need>" are valid for any allowlisted coin and need ∈ grindRungs. The client can never choose a reward.
Value
game33.coinAmt
achievementRewards
map[string][]game33.coinAmt- OID
- 053b6a…4dfb:1043
achievementRewards details
grindRungs
[]uint64- OID
- 053b6a…4dfb:1161
grindRungs details
grindPay
func(need uint64) uint64- OID
- 053b6a…4dfb:1162
grindPay details
pvpGames
map[string][]string── PvP / casino allowlists ──────────────────────────────────────────────────
- OID
- 053b6a…4dfb:1165
pvpGames details
pvpTimeoutSec
int64// AFK window before ClaimPvpTimeout
Value
600
pvpRakePct
uint64// to admin balance
Value
2
voucherMaxTTL
int64// vouchers must expire within 15 min
Value
900
claimCooldownSec
int64// min seconds between ClaimAndMint
Value
60
claimInitialGraceSec
int64// a new rarity bucket starts with 5 min of allowance
Value
300
init.334
func()- OID
- 053b6a…4dfb:1169
init.334 details
init.335
func()- OID
- 053b6a…4dfb:1171
init.335 details
init.336
func()- OID
- 053b6a…4dfb:1173
init.336 details
maxGuildMembers
untyped bigintValue
(10 <untyped> bigint)
maxGuildNameLen
untyped bigintValue
(24 <untyped> bigint)
guildJSON
func(guildId string, name string, leader string, members int, createdAt int64) string- OID
- 053b6a…4dfb:1175
guildJSON details
guildMemberCount
func(gid string) int- OID
- 053b6a…4dfb:1177
guildMemberCount details
guildMeta
typeValue
game33.guildMeta
guildMetas
map[string]game33.guildMetaguild meta is stored alongside the JSON so it can be re-rendered safely.
- OID
- 053b6a…4dfb:1179
guildMetas details
rewriteGuild
func(gid string)- OID
- 053b6a…4dfb:1180
rewriteGuild details
CreateGuild
func(name string) string- OID
- 053b6a…4dfb:1181
CreateGuild details
JoinGuild
func(guildId string)- OID
- 053b6a…4dfb:1182
JoinGuild details
LeaveGuild
func()- OID
- 053b6a…4dfb:1183
LeaveGuild details
PlayerGuild
func(addr string) string- OID
- 053b6a…4dfb:1184
PlayerGuild details
GuildInfo
func(guildId string) string- OID
- 053b6a…4dfb:1185
GuildInfo details
TopGuilds
func(limit int) string- OID
- 053b6a…4dfb:1186
TopGuilds details
kvJSON
func(prefixAddr string, t *v0.Tree) string- OID
- 053b6a…4dfb:1187
kvJSON details
AllBalances
func(playerAddr string) string- OID
- 053b6a…4dfb:1188
AllBalances details
LifetimeMined
func(playerAddr string) string- OID
- 053b6a…4dfb:1189
LifetimeMined details
PlayerXp
func(playerAddr string) stringPlayerXp returns the caller's cumulative rarity-weighted XP earned from ClaimAndMint calls as a plain decimal string (e.g. "12345"). Returns "0" for players who have not yet minted anything on this realm version.
- OID
- 053b6a…4dfb:1190
PlayerXp details
Rewarded
func(playerAddr string) stringRewarded returns what rewards (medals etc.) credited, per coin. Separate from LifetimeMined.
- OID
- 053b6a…4dfb:1191
Rewarded details
SkillRanks
func(playerAddr string) string- OID
- 053b6a…4dfb:1192
SkillRanks details
ToolLife
func(playerAddr string) string- OID
- 053b6a…4dfb:1193
ToolLife details
OwnedTools
func(playerAddr string) string- OID
- 053b6a…4dfb:1194
OwnedTools details
PlayerProfile
func(playerAddr string) string- OID
- 053b6a…4dfb:1195
PlayerProfile details
AllMiners
func(limit int, offset int) stringAllMiners returns the leaderboard sorted by total mined (desc), paginated. (game28 returned it in address order.)
- OID
- 053b6a…4dfb:1196
AllMiners details
GetMedals
func(playerAddr string) string- OID
- 053b6a…4dfb:1197
GetMedals details
DailyCheckinStatus
func(playerAddr string) string- OID
- 053b6a…4dfb:1198
DailyCheckinStatus details
ListTasks
func(string) string- OID
- 053b6a…4dfb:1199
ListTasks details
Render
func(string) string- OID
- 053b6a…4dfb:1200
Render details
deductBalances
func(caller string, costs [][2]string)deductBalances checks all balances, then deducts (no partial deductions).
- OID
- 053b6a…4dfb:1201
deductBalances details
guildRow
typeValue
game33.guildRow
guildRows
typeValue
game33.guildRows
minerRow
typeValue
game33.minerRow
minerRows
typeValue
game33.minerRows
VoucherMessage
func(kind string, player string, nonce int64, expiry int64, payload string) stringVoucherMessage builds the canonical message that the server signs and the realm verifies. Format: gnomoji-voucher-v2|chainId|kind|player|nonce|expiry|compactPayload v2 changes from v1: realmPkgPath removed; payload is now compact (not raw JSON). For kind="claim": compactPayload = coinId:amount pairs sorted by coinId, comma-joined. e.g. [["grin","100"],["joy","50"]] → "grin:100,joy:50" For kind="ach": compactPayload = achievement IDs sorted, comma-joined. e.g. ["blocks_1","g.grin.10"] → "blocks_1,g.grin.10"
- OID
- 053b6a…4dfb:1202
VoucherMessage details
compactClaimPayload
func(coinsJson string) stringcompactClaimPayload builds the canonical compact payload for a "claim" voucher from a coinsJson string: \[\["coinId","amount"],...]. Output: "coinId:amount" pairs sorted alphabetically by coinId, comma-joined. Must produce the same output as the TypeScript claimVoucherPayload() function in src/lib/game/claim-voucher.ts.
- OID
- 053b6a…4dfb:1204
compactClaimPayload details
compactAchPayload
func(idsJson string) stringcompactAchPayload builds the canonical compact payload for an "ach" voucher from an idsJson string: \["achId",...]. Output: achievement IDs sorted alphabetically, comma-joined.
- OID
- 053b6a…4dfb:1205
compactAchPayload details
LastNonce
func(addr string) int64LastNonce returns the last voucher nonce used by addr (0 if none).
- OID
- 053b6a…4dfb:1206
LastNonce details
useVoucher
func(kind string, player string, nonce int64, expiry int64, payload string, sigHex string)- OID
- 053b6a…4dfb:1207
useVoucher details
bestOwnedTool
func(callerAddr string) stringbestOwnedTool returns the highest-tier tool the caller owns that still has durability (or is indestructible). "hands" if none.
- OID
- 053b6a…4dfb:1208
bestOwnedTool details
effectiveRateFor
func(tool string, r int) uint64- OID
- 053b6a…4dfb:1209
effectiveRateFor details
loadPackedBuckets
func(addr string, nowTs int64) [7][2]uint64loadPackedBuckets reads the packed claimBuckets entry for addr, or creates a fresh one. Returns \[7]\[2]uint64 where \[r]\[0]=accruedMillis, \[r]\[1]=lastTs. Lazy-migrates from the old per-rarity key format (addr+":"+r) on first read after an upgrade.
- OID
- 053b6a…4dfb:1210
loadPackedBuckets details
formatPackedBuckets
func(buckets [7][2]uint64) stringformatPackedBuckets serializes \[7]\[2]uint64 to "m0:t0|m1:t1|...|m6:t6".
- OID
- 053b6a…4dfb:1211
formatPackedBuckets details
bucketState
func(allBuckets [7][2]uint64, r int, tool string, nowTs int64) (uint64, uint64)bucketState returns (accruedMillis, capMillis) for rarity r at nowTs. allBuckets is the result of loadPackedBuckets — pass it in to avoid re-reading the AVL entry for each rarity check.
- OID
- 053b6a…4dfb:1212
bucketState details
enforceClaimRate
func(callerAddr string, byRarity [7]uint64, nowTs int64, tool string)enforceClaimRate checks every rarity first, then deducts (no partial writes). FIX 2A: reads claimBuckets once (packed format) instead of once per rarity.
- OID
- 053b6a…4dfb:1213
enforceClaimRate details
decrementToolLife
func(callerAddr string, totalCoins uint64, tool string)decrementToolLife wears the best tool by the number of non-dust coins. FIX 1A: accepts pre-computed tool to avoid a second bestOwnedTool call.
- OID
- 053b6a…4dfb:1214
decrementToolLife details
parseCoinClaims
func(coinsJson string) ([]string, map[string]uint64, [7]uint64)parseCoinClaims parses \[\["coinId","amount"],...]. Unknown ids panic (allowlist); duplicate ids are summed; at most 20 entries.
- OID
- 053b6a…4dfb:1215
parseCoinClaims details
guildBonusPct
func(addr string) uint64- OID
- 053b6a…4dfb:1216
guildBonusPct details
creditMined
func(addr string, coinId string, amt uint64) uint64creditMined credits a mined/reward amount to addr, capped by the vein, and records lifetime total. Returns the amount credited. FIX 1B: miners update removed — caller must addU(&miners, addr, total) after the loop.
- OID
- 053b6a…4dfb:1217
creditMined details
creditReward
func(addr string, coinId string, amt uint64) uint64creditReward credits a reward (medal/achievement or any future event). It still draws from the vein (so rewards can't exceed supply caps) but is tracked in its own counter: it never touches lifetimeMined or the miners leaderboard, so rewards can't unlock grind medals or inflate rankings.
- OID
- 053b6a…4dfb:1218
creditReward details
ClaimAndMint
func(coinsJson string, nonce int64, expiry int64, sigHex string) stringClaimAndMint credits mined coins to the caller's on-chain balance. coinsJson: \[\["coinId","amount"],...]. Requires a server voucher (see VoucherMessage) for exactly this coinsJson, plus the on-chain rate cap for the caller's best tool, the coin allowlist and the vein caps. Returns a JSON object of what was actually credited (after bonuses/veins).
- OID
- 053b6a…4dfb:1219
ClaimAndMint details
ClaimMine
func(coinsJson string)ClaimMine (game27/28 two-step flow) is retired: pending mints are gone.
- OID
- 053b6a…4dfb:1220
ClaimMine details
PendingMints
func(playerAddr string) stringPendingMints is kept for client compatibility; game29 has no pending step.
- OID
- 053b6a…4dfb:1221
PendingMints details
ClaimAllowance
func(playerAddr string) stringClaimAllowance returns the current per-rarity allowance for addr.
- OID
- 053b6a…4dfb:1222
ClaimAllowance details
lget
func(id string, f string) string- OID
- 053b6a…4dfb:1223
lget details
lset
func(id string, f string, v string)- OID
- 053b6a…4dfb:1225
lset details
renderLobby
func(id string)- OID
- 053b6a…4dfb:1226
renderLobby details
touch
func(id string)- OID
- 053b6a…4dfb:1227
touch details
lastAction
func(id string) int64- OID
- 053b6a…4dfb:1228
lastAction details
CreatePvpLobby
func(game string, coinId string, betAmount string) stringCreatePvpLobby escrows the creator's wager and opens a lobby.
- OID
- 053b6a…4dfb:1229
CreatePvpLobby details
JoinPvpLobby
func(lobbyId string)- OID
- 053b6a…4dfb:1230
JoinPvpLobby details
pvpWagered
func(id string) boolpvpWagered: a lobby that escrowed coins before wagers were switched off. It can only be cancelled or refunded after the timeout.
- OID
- 053b6a…4dfb:1231
pvpWagered details
CancelPvpLobby
func(lobbyId string)CancelPvpLobby lets the creator close an open lobby nobody joined (refund). Works while paused: a refund of the player's own escrow is never blocked.
- OID
- 053b6a…4dfb:1232
CancelPvpLobby details
memberOf
func(lobbyId string, addr string) bool- OID
- 053b6a…4dfb:1233
memberOf details
CommitPvpMove
func(lobbyId string, moveHash string)CommitPvpMove stores sha256(choice+":"+salt) for the caller. Members only, once per player per lobby, only while the lobby is joined.
- OID
- 053b6a…4dfb:1234
CommitPvpMove details
validChoice
func(game string, choice string) bool- OID
- 053b6a…4dfb:1235
validChoice details
moveHash
func(choice string, salt string) string- OID
- 053b6a…4dfb:1236
moveHash details
RevealPvpMove
func(lobbyId string, choice string, salt string)RevealPvpMove reveals a committed move. The tx fails unless sha256(choice+":"+salt) equals the stored commit. A matching reveal of an invalid choice forfeits the match. When both have revealed, it settles.
- OID
- 053b6a…4dfb:1237
RevealPvpMove details
pvpWinner
func(game string, creator string, challenger string, cChoice string, chChoice string, cSalt string, chSalt string) stringpvpWinner: rps uses the usual rules. coin\_flip / higher\_lower flip a coin from sha256(creatorSalt:challengerSalt) — neither player controls it alone — and whoever alone called it wins (both or neither right = draw).
- OID
- 053b6a…4dfb:1238
pvpWinner details
settlePvp
func(lobbyId string, result string)settlePvp pays out the escrow. result = winner addr, "draw" or "refund".
- OID
- 053b6a…4dfb:1239
settlePvp details
ClaimPvpTimeout
func(lobbyId string)ClaimPvpTimeout resolves a stuck match after pvpTimeoutSec without action: - only one player committed → that player wins; - both committed, only one revealed → the revealer wins; - otherwise → both refunded. Any lobby member may call it. Escrow can never stay locked.
- OID
- 053b6a…4dfb:1240
ClaimPvpTimeout details
ExpireLobbies
func()ExpireLobbies is a no-op kept for API compatibility (timeouts are per lobby).
- OID
- 053b6a…4dfb:1241
ExpireLobbies details
PvpLobby
func(lobbyId string) string- OID
- 053b6a…4dfb:1242
PvpLobby details
OpenLobbies
func() string- OID
- 053b6a…4dfb:1243
OpenLobbies details
sha256Sum
func(s string) string- OID
- 053b6a…4dfb:1244
sha256Sum details
zeroPad
func(n uint64, w int) stringzeroPad formats n with leading zeros to width w (ufmt has no %0Nd).
- OID
- 053b6a…4dfb:1245
zeroPad details
effectiveMaxLife
func(callerAddr string, toolId string) uint64effectiveMaxLife = toolMaxLife × (1000 + Σ rank × bonus‰) / 1000. FIX 1C: fast-path for players with no tool-life skills trained (the common case), avoiding 22 AVL reads (11 skills × Has+Get) that all return 0.
- OID
- 053b6a…4dfb:1246
effectiveMaxLife details
ownsTool
func(addr string, toolId string) bool- OID
- 053b6a…4dfb:1248
ownsTool details
Transfer
func(coinId string, toAddr string, amountStr string)Transfer sends coins to another player. It is a player's own money, so the admin can't stop it: it works while the game is paused and for banned addresses (bans only stop earning). It needs a finalized migration (MigrateBatch SETs balances). There is no receive cap: any coin can be sent to any player, whatever tools they own.
- OID
- 053b6a…4dfb:1249
Transfer details
BuyTool
func(toolId string)- OID
- 053b6a…4dfb:1250
BuyTool details
RepairTool
func(toolId string)- OID
- 053b6a…4dfb:1251
RepairTool details
TrainSkill
func(skillId string)- OID
- 053b6a…4dfb:1252
TrainSkill details
parseGrindId
func(id string) (string, uint64, bool)- OID
- 053b6a…4dfb:1253
parseGrindId details
isValidAchievementId
func(id string) bool- OID
- 053b6a…4dfb:1254
isValidAchievementId details
achievementReward
func(addr string, id string) ([]game33.coinAmt, string)achievementReward returns the fixed reward for id, checking any on-chain predicate (grind: lifetimeMined ≥ need; "\<tool>\_own": tool owned). ok=false means the id is unknown or not earned on chain.
- OID
- 053b6a…4dfb:1255
achievementReward details
claimAchievementsFor
func(addr string, ids []string, strict bool) intclaimAchievementsFor claims ids for addr. strict=true panics on any bad id; otherwise bad/claimed ids are skipped. Returns the number claimed.
- OID
- 053b6a…4dfb:1256
claimAchievementsFor details
ClaimAchievement
func(achievementId string, nonce int64, expiry int64, sigHex string)ClaimAchievement claims one allowlisted achievement and credits its fixed reward. Needs a server voucher of kind "ach" with payload = \`\["\<id>"]\`.
- OID
- 053b6a…4dfb:1257
ClaimAchievement details
BatchClaimAchievements
func(idsJson string, nonce int64, expiry int64, sigHex string) intBatchClaimAchievements claims several ids (already-claimed / not-earned ids are skipped). idsJson must be exactly the voucher payload.
- OID
- 053b6a…4dfb:1258
BatchClaimAchievements details
HasAchievement
func(addr string, id string) bool- OID
- 053b6a…4dfb:1259
HasAchievement details
parseDailyCheckin
func(raw string) (int64, int64)parseDailyCheckin reads the stored value for an address and returns (lastDay, streak). It handles both the new "\<lastDay>:\<streak>" format and the legacy "\<unix seconds>" format (which stores raw epoch seconds; treated as lastDay = seconds/86400, streak = 1).
- OID
- 053b6a…4dfb:1260
parseDailyCheckin details
DailyCheckin
func()- OID
- 053b6a…4dfb:1261
DailyCheckin details
CreateTask
func(taskId string, desc string)Tasks: game28 let anyone mark any task done. In game29 tasks are created and completed for a player only by the operator (server) — no free medals.
- OID
- 053b6a…4dfb:1262
CreateTask details
CompleteTask
func(taskId string)- OID
- 053b6a…4dfb:1263
CompleteTask details
CompleteTaskFor
func(player string, taskId string)- OID
- 053b6a…4dfb:1264
CompleteTaskFor details
relayMaxTTL
int64// 5 minutes — relay vouchers are short-lived
Value
300
relayVoucherMessage
func(kind string, player string, extra string, nonce int64, expiry int64) stringrelayVoucherMessage builds the canonical message the server signs.
- OID
- 053b6a…4dfb:1265
relayVoucherMessage details
lastRelayNonce
func(player string) int64lastRelayNonce returns the last relay nonce for player (0 if none).
- OID
- 053b6a…4dfb:1267
lastRelayNonce details
useRelayVoucher
func(kind string, player string, extra string, nonce int64, expiry int64, sigHex string)useRelayVoucher verifies and consumes a relay voucher for player. Panics on any failure so the entire tx is rolled back.
- OID
- 053b6a…4dfb:1268
useRelayVoucher details
requireRelay
func()requireRelay panics unless the caller is the registered relay address.
- OID
- 053b6a…4dfb:1269
requireRelay details
SetRelayAddress
func(addr string)SetRelayAddress registers the treasury wallet address as the relay. Pass "" to disable the relay.
- OID
- 053b6a…4dfb:1270
SetRelayAddress details
RelayAddress
func() string- OID
- 053b6a…4dfb:1271
RelayAddress details
RelayBuyTool
func(player string, toolId string, nonce int64, expiry int64, sigHex string)RelayBuyTool executes BuyTool logic on behalf of \`player\` (the relay pays gas). The server must sign a relay voucher with MOJI\_CLAIM\_SIGNER\_SEED: gnomoji-relay-v1|<chainId>|BuyTool|<player>|<toolId>|<nonce>|<expiry> All prerequisites (coin balance, tool chain, existing ownership) are checked the same as BuyTool — the relay cannot bypass them.
- OID
- 053b6a…4dfb:1272
RelayBuyTool details
RelayTrainSkill
func(player string, skillId string, nonce int64, expiry int64, sigHex string)RelayTrainSkill executes TrainSkill logic on behalf of \`player\`. Relay voucher message: gnomoji-relay-v1|<chainId>|TrainSkill|<player>|<skillId>|<nonce>|<expiry> Same checks as TrainSkill; max rank and coin deduction apply normally.
- OID
- 053b6a…4dfb:1273
RelayTrainSkill details
LastRelayNonce
func(addr string) int64LastRelayNonce returns the last relay nonce used by addr (0 if none). Used by the server to compute the next nonce.
- OID
- 053b6a…4dfb:1274
LastRelayNonce details
slotsReels
untyped bigintValue
(5 <untyped> bigint)
slotsRows
untyped bigintValue
(4 <untyped> bigint)
slotsCells
untyped bigintValue
(20 <untyped> bigint)
slotsStripLen
untyped bigintValue
(40 <untyped> bigint)
slotsBetStep
uint64// bet must be a multiple of the 25 lines
Value
25
slotsMaxWinMult
uint64Value
500
symWild
uint8Value
0
symScatter
uint8Value
8
symVault
uint8Value
9
hsLandBelow
uint8// a free cell lands a coin when its byte \< 8 (3.125%)
Value
8
hsRespins
untyped bigintValue
(3 <untyped> bigint)
hsMini
uint16Value
101
hsMinor
uint16Value
102
hsMajor
uint16Value
103
hsGrand
uint16Value
104
slotsStrip
untyped stringOne strip for all reels: wild 1, seven 3, diamond 4, trophy 5, star 6, clover 6, flame 7, coin 6, scatter 1, vault 1 (digits = symbol ids).
Value
"8645732106457321645793216457326457364576"
slotsSymbolNames
[10]string- OID
- 053b6a…4dfb:1276
slotsSymbolNames details
slotsPays
[8][3]uint64line-bet multiples for 3/4/5 of a kind, symbols 0..7
- OID
- 053b6a…4dfb:1278
slotsPays details
slotsPaylines
[25][5]uint8same 25 lines as src/lib/game/slots.ts PAYLINES (row per reel)
- OID
- 053b6a…4dfb:1288
slotsPaylines details
slotsScatterPay
[6]uint64// × bet, by scatter count
- OID
- 053b6a…4dfb:1315
slotsScatterPay details
slotsFreeSpins
[6]uint64- OID
- 053b6a…4dfb:1317
slotsFreeSpins details
slotsStream
typeValue
game33.slotsStream
newSlotsStream
func(serverSeed string, clientSecret string, roundId string) *game33.slotsStream- OID
- 053b6a…4dfb:1318
newSlotsStream details
slotsSpinGrid
func(s *game33.slotsStream) [20]uint8slotsSpinGrid draws the 5 reel stops and returns the 20 visible symbols.
- OID
- 053b6a…4dfb:1320
slotsSpinGrid details
slotsLineMult
func(g *[20]uint8) (uint64, int)slotsLineMult = Σ line pays in line-bet units, and how many lines paid.
- OID
- 053b6a…4dfb:1321
slotsLineMult details
slotsCount
func(g *[20]uint8, sym uint8) int- OID
- 053b6a…4dfb:1322
slotsCount details
hsDrawValue
func(s *game33.slotsStream) uint16hsDrawValue: 1× 50%, 2× 28%, 3× 12%, 5× 6%, MINI 3%, MINOR 0.9%, MAJOR 0.08%, GRAND 0.02%.
- OID
- 053b6a…4dfb:1323
hsDrawValue details
slotsHoldAndSpin
func(s *game33.slotsStream, g *[20]uint8) ([20]uint16, int, bool)slotsHoldAndSpin resolves the whole bonus from the stream: the vault cells start locked with a value each; then while respins remain and the board isn't full, every empty cell (in index order) lands a coin when its byte \< 8, and a landing resets the respins to 3. Returns the 20 tiles (0 = empty), how many respins were played, and whether the board filled (blackout = GRAND).
- OID
- 053b6a…4dfb:1324
slotsHoldAndSpin details
slotsGridString
func(g *[20]uint8) string- OID
- 053b6a…4dfb:1325
slotsGridString details
hsTilesString
func(t *[20]uint16) string- OID
- 053b6a…4dfb:1326
hsTilesString details
jsonStr
func(s string) stringjsonStr returns s as a quoted, escaped JSON string (game28 concatenated raw user strings into JSON, so a guild name with a quote broke every reader).
- OID
- 053b6a…4dfb:1327
jsonStr details
sanitizeName
func(s string) stringsanitizeName trims and strips control characters from a display name.
- OID
- 053b6a…4dfb:1329
sanitizeName details
isSafeId
func(s string, maxLen int) boolisSafeId reports whether s is a short \[a-z0-9\_.-] identifier.
- OID
- 053b6a…4dfb:1330
isSafeId details
isHex64
func(s string) bool- OID
- 053b6a…4dfb:1331
isHex64 details
parseStringRows
func(s string) [][]stringparseStringRows parses a JSON array of arrays of strings, e.g. \[\["g1..","grin","10"],\["g1..","joy","4"]]. Numbers are accepted unquoted. Panics on malformed input.
- OID
- 053b6a…4dfb:1332
parseStringRows details
parseStringList
func(s string) []stringparseStringList parses \["a","b",...].
- OID
- 053b6a…4dfb:1333
parseStringList details
jparser
typeValue
game33.jparser
getU
func(t *v0.Tree, key string) uint64- OID
- 053b6a…4dfb:1334
getU details
setU
func(t *v0.Tree, key string, v uint64)- OID
- 053b6a…4dfb:1335
setU details
addU
func(t *v0.Tree, key string, d uint64) uint64addU adds d to a stored counter; panics instead of wrapping on overflow.
- OID
- 053b6a…4dfb:1336
addU details
balOf
func(addr string, coin string) uint64- OID
- 053b6a…4dfb:1337
balOf details
creditBal
func(addr string, coin string, amt uint64)- OID
- 053b6a…4dfb:1338
creditBal details
debitBal
func(addr string, coin string, amt uint64)- OID
- 053b6a…4dfb:1339