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.

kewrchess package

Functions

AcceptDraw

func AcceptDraw(caller address, gameID int) error
Ask AI Claude ChatGPT

AcceptDraw accepts a draw offer from the opponent

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.AcceptDraw(,)"

Result

ClaimTimeout

func ClaimTimeout(caller address, gameID int) error
Ask AI Claude ChatGPT

ClaimTimeout allows the challenger to win the game after the opponent goes AFK/rage quits and turnDeadline has passed without a response move from the opponent.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.ClaimTimeout(,)"

Result

ConfirmSettlement

func ConfirmSettlement(caller address, gameID int) error
Ask AI Claude ChatGPT

ConfirmSettlement allows opponent to immediately approve final result without waiting for challenge window

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.ConfirmSettlement(,)"

Result

CreateGame

func CreateGame(caller address, opponent address) error
Ask AI Claude ChatGPT

CreateGame creates a new direct game challenge

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.CreateGame(,)"

Result

DeclineDraw

func DeclineDraw(caller address, gameID int) error
Ask AI Claude ChatGPT

DeclineDraw declines a draw offer from the opponent

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.DeclineDraw(,)"

Result

DisputeSettlement

func DisputeSettlement(caller address, gameID int) error
Ask AI Claude ChatGPT

DisputeSettlement allows opponent to dispute a fraudulent settlement proposal

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.DisputeSettlement(,)"

Result

FinalizeSettlement

func FinalizeSettlement(caller address, gameID int) error
Ask AI Claude ChatGPT

FinalizeSettlement officially finalizes the game after the challenge period has passed

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.FinalizeSettlement(,)"

Result

GetActiveGameForPlayer

func GetActiveGameForPlayer(addr address) int
Ask AI Claude ChatGPT

GetActiveGameForPlayer searches for the latest active game ("PLAYING") for a given address. Returns -1 if no active game found.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetActiveGameForPlayer()"

Result

GetBoard

func GetBoard(gameID int) [8][8]string
Ask AI Claude ChatGPT

GetBoard returns the 8x8 board for a given game ID

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetBoard()"

Result

GetChallengeDeadline

func GetChallengeDeadline(gameID int) int64
Ask AI Claude ChatGPT

GetChallengeDeadline returns the deadline unix timestamp for challenging settlement

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetChallengeDeadline()"

Result

GetGameStatus

func GetGameStatus(gameID int) string
Ask AI Claude ChatGPT

GetGameStatus returns the game status for a given game ID

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetGameStatus()"

Result

GetGamesCount

func GetGamesCount() int
Ask AI Claude ChatGPT

GetGamesCount returns the total number of games

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetGamesCount()"

Result

GetLatestGameForPlayer

func GetLatestGameForPlayer(addr address) int
Ask AI Claude ChatGPT

GetLatestGameForPlayer returns the latest game ID involving the player, or -1 if none.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetLatestGameForPlayer()"

Result

GetPendingStatus

func GetPendingStatus(gameID int) string
Ask AI Claude ChatGPT

GetPendingStatus returns the pending status of settlement

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetPendingStatus()"

Result

GetQueueCount

func GetQueueCount() int
Ask AI Claude ChatGPT

GetQueueCount returns the number of players waiting in the matchmaking queue

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetQueueCount()"

Result

GetTurnDeadline

func GetTurnDeadline(gameID int) int64
Ask AI Claude ChatGPT

GetTurnDeadline returns the deadline unix timestamp for turn timeout

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.GetTurnDeadline()"

Result

IsInQueue

func IsInQueue(addr address) bool
Ask AI Claude ChatGPT

IsInQueue checks if an address is currently waiting in the matchmaking queue

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.IsInQueue()"

Result

IsWhiteTurn

func IsWhiteTurn(gameID int) bool
Ask AI Claude ChatGPT

IsWhiteTurn returns whether it is White's turn for a given game ID

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.IsWhiteTurn()"

Result

JoinQueue

func JoinQueue(caller address) error
Ask AI Claude ChatGPT

JoinQueue registers a player into the on-chain matchmaking queue. If the queue is empty, the player is added to the queue. If another player is already waiting, both players are immediately matched into a new game.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.JoinQueue()"

Result

LeaveQueue

func LeaveQueue(caller address) error
Ask AI Claude ChatGPT

LeaveQueue cancels and removes a player from the on-chain matchmaking queue

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.LeaveQueue()"

Result

MakeMove

func MakeMove(caller address, gameID int, fromRow, fromCol, toRow, toCol int) error
Ask AI Claude ChatGPT

MakeMove moves a piece (defaults to Queen on promotion)

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.MakeMove(,,,,,)"

Result

MakeMovePromote

func MakeMovePromote(caller address, gameID int, fromRow, fromCol, toRow, toCol int, promoPiece string) error
Ask AI Claude ChatGPT

MakeMovePromote moves a piece with a specified promotion piece (Q, R, B, N)

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.MakeMovePromote(,,,,,,)"

Result

OfferDraw

func OfferDraw(caller address, gameID int) error
Ask AI Claude ChatGPT

OfferDraw offers a draw to the opponent

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.OfferDraw(,)"

Result

ProposeSettlement

func ProposeSettlement(caller address, gameID int, movesUCI string) error
Ask AI Claude ChatGPT

ProposeSettlement submits a victory claim for off-chain chess results. Prevents fraudulent opponent moves: proposal opens a challenge period. Opponent can confirm immediately (ConfirmSettlement), or dispute if cheated (DisputeSettlement). If opponent does not respond, winner can finalize after ChallengeWindowSeconds expires.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.ProposeSettlement(,,)"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.Render()"

Result

Resign

func Resign(caller address, gameID int) error
Ask AI Claude ChatGPT

Resign resigns the game for the calling player

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.Resign(,)"

Result

SettleGame

func SettleGame(caller address, gameID int, movesUCI string) error
Ask AI Claude ChatGPT

SettleGame proposes settlement and finalizes immediately if challenge window is 0

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.SettleGame(,,)"

Result

StartTurnTimer

func StartTurnTimer(caller address, gameID int, currentMovesUCI string) error
Ask AI Claude ChatGPT

StartTurnTimer is initiated when opponent goes AFK or closes browser (Rage Quit) during an off-chain game. Player submits current move history (currentMovesUCI). Smart contract validates the board and ensures it is the OPPONENT'S TURN.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.StartTurnTimer(,,)"

Result

NewGame

func NewGame(id int, white, black address) *Game
Ask AI Claude ChatGPT

NewGame initializes a new game with the standard chess starting layout

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess.NewGame(,,)"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g1g7dna0gp4nec5rza4q25htj0cjgswrxefp37ep/kewrchess, for example a function call with arguments.