Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

advent/v1 package

Overview

Package advent is Gnoël, an on-chain advent calendar with sealed guesses.

Functions

Attempts

func Attempts(day, start int) string

Attempts returns one bounded page of the public record, starting at a 1-based ID.

Params

Command

gnokey query vm/qeval -remote "https://gno-staging.moul.p2p.team" -data "gno.land/r/moul/advent/v1.Attempts(,)"

Result

Calendar

func Calendar() string

Calendar returns tab-separated rows for open doors, with title and clue in base64.

Command

gnokey query vm/qeval -remote "https://gno-staging.moul.p2p.team" -data "gno.land/r/moul/advent/v1.Calendar()"

Result

CarryOver

func CarryOver(cur realm, player address, commitment, sealedSalt string)

CarryOver records a pending seal from the first deployment on Onyx.

Params

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/moul/advent/v1" -func "CarryOver" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "CarryOver" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

FinishCarryOver

func FinishCarryOver(cur realm)

FinishCarryOver closes imports and opens regular submissions and reviews.

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/moul/advent/v1" -func "FinishCarryOver" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "FinishCarryOver" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

Leaders

func Leaders() string

Leaders returns the top 24 addresses with their confirmed solves.

Command

gnokey query vm/qeval -remote "https://gno-staging.moul.p2p.team" -data "gno.land/r/moul/advent/v1.Leaders()"

Result

Progress

func Progress(player string) string

Progress lists the latest status of an address across all 24 doors.

Param

Command

gnokey query vm/qeval -remote "https://gno-staging.moul.p2p.team" -data "gno.land/r/moul/advent/v1.Progress()"

Result

Publish

func Publish(cur realm, day int, title, clue, publicKey string, reviewFrom int64)

Publish opens a case. The RSA-2048 SPKI public key is pinned for that case so that rotating the key for a new door leaves old doors playable.

Params

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/moul/advent/v1" -func "Publish" -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "Publish" -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://gno-staging.moul.p2p.team" -data "gno.land/r/moul/advent/v1.Render()"

Result

ReplaceGuess

func ReplaceGuess(cur realm, day int, commitment, sealedSalt string) int

ReplaceGuess reseals the caller's current guess while it awaits review.

Params

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/moul/advent/v1" -func "ReplaceGuess" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "ReplaceGuess" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

Review

func Review(cur realm, day, start int, verdicts, snapshot string)

Review records one verdict per consecutive attempt, starting at the first pending ID. A stale batch fails before it can apply verdicts to other guesses.

Params

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/moul/advent/v1" -func "Review" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "Review" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

SetOracle

func SetOracle(cur realm, signer address)

Param

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/moul/advent/v1" -func "SetOracle" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "SetOracle" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

SetPublisher

func SetPublisher(cur realm, signer address)

SetPublisher delegates publishing and clue corrections to another account.

Param

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/moul/advent/v1" -func "SetPublisher" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "SetPublisher" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

Submit

func Submit(cur realm, day int, commitment, sealedSalt string) int

Submit publicly records the commitment and its encrypted random salt.

Params

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/moul/advent/v1" -func "Submit" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "Submit" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx
  

UpdateClue

func UpdateClue(cur realm, day int, clue string)

UpdateClue corrects the text of an open door while keeping its review schedule, oracle key and submissions intact.

Params

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/moul/advent/v1" -func "UpdateClue" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "moulstaging-1" -remote "https://gno-staging.moul.p2p.team" ADDRESSgnokey query -remote "https://gno-staging.moul.p2p.team" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/advent/v1" -func "UpdateClue" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "moulstaging-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://gno-staging.moul.p2p.team" call.tx