Abort
func Abort(cur realm, gameID string) string
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Abort" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Abort" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
ClaimTimeout
func ClaimTimeout(cur realm, gameID string) string
Link
Execute
ClaimTimeout should be called when the caller believes the game has resulted in a timeout.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "ClaimTimeout" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "ClaimTimeout" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
Draw
func Draw(cur realm, gameID string) string
Link
Execute
Draw implements draw by agreement, as well as "single-party" draw: - Threefold repetition (§9.2) - Fifty-move rule (§9.3) - Insufficient material (§9.4) Note: stalemate happens as a consequence of a Move, and thus is handled in that function.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Draw" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Draw" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
DrawOffer
func DrawOffer(cur realm, gameID string) string
Link
Execute
DrawOffer creates a draw offer in the current game, if one doesn't already exist.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "DrawOffer" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "DrawOffer" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
DrawRefuse
func DrawRefuse(cur realm, gameID string) string
Link
Execute
DrawRefuse refuse a draw offer in the given game.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "DrawRefuse" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "DrawRefuse" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetGame
func GetGame(id string) string
Link
Execute
GetGame returns a game, knowing its ID.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "GetGame" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "GetGame" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetPlayer
func GetPlayer(player string) string
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "GetPlayer" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "GetPlayer" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
Leaderboard
func Leaderboard(category string) string
Link
Execute
Leaderboard returns a list of all users, ordered by their position in the leaderboard. category is one of blitz, rapid or correspondence.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Leaderboard" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Leaderboard" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
ListGames
func ListGames(filters string) string
Link
Execute
ListGames provides game listing functionality, with filter-based search functionality.
available filters:
player:<player> white:<player> black:<player> finished:bool
limit:int id<cmp>int sort:asc/desc
<cmp>: '<' or '>'
<player>: either a bech32 address, "@user" (r/demo/users), or "caller"
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "ListGames" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "ListGames" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
LobbyGameFound
func LobbyGameFound(cur realm) string
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "LobbyGameFound" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "LobbyGameFound" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
LobbyJoin
func LobbyJoin(cur realm, seconds, increment int)
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "LobbyJoin" -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "LobbyJoin" -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
LobbyQuit
func LobbyQuit(cur realm)
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "LobbyQuit" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "LobbyQuit" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
MakeMove
func MakeMove(cur realm, gameID, from, to string, promote chess.Piece) string
Link
Execute
MakeMove specifies a move to be done on the given game, specifying in algebraic notation the square where to move the piece. If the piece is a pawn which is moving to the last row, a promotion piece must be specified. Castling is specified by indicating the king's movement.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "MakeMove" -args " " -args " " -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "MakeMove" -args " " -args " " -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
Resign
func Resign(cur realm, gameID string) string
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Resign" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Resign" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
CategoryFromString
func CategoryFromString(s string) Category
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "CategoryFromString" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "CategoryFromString" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
NewTimeControl
func NewTimeControl(seconds, incr int) *TimeControl
Link
Execute
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "NewTimeControl" -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "NewTimeControl" -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx