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

/jury package

Overview

Package jury is a commit-reveal adversarial review protocol for disputes over agent work.

The hard part of an agent economy is not paying agents — it is deciding what happens when an agent's output is disputed. This realm runs a small jury: a fixed panel of reviewers each *commit* to a hidden verdict, then *reveal* it. Commit-reveal means no juror can copy another's vote or be swayed after seeing the tally; every verdict is locked in blind.

The subject of a case is an opaque string — a receipt sequence, a claim id, an off-chain artifact hash — so this realm composes with the receipt and gnomem demos without depending on them.

Bonding and slashing (a juror stakes coins, loses them for provably bad verdicts) are the natural economic layer on top; this demo shows the mechanism without the money.

Functions

Commit

func Commit(cur realm, caseID uint64, commitment string)

Commit locks in a juror's hidden verdict. commitment must equal commit.Verdict(verdict, salt) — computed off-chain. When the last juror commits, the case advances to the reveal phase automatically.

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/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury" -func "Commit" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury" -func "Commit" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

Count

func Count() int

Count returns the number of cases.

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury.Count()"

Result

OpenCase

func OpenCase(cur realm, subject string, jurors []address) uint64

OpenCase starts a dispute with a fixed panel of jurors. An odd panel size avoids ties; duplicates are rejected.

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/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury" -func "OpenCase" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury" -func "OpenCase" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

Outcome

func Outcome(caseID uint64) string

Outcome returns the recorded outcome, or "" if the case is still open.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury.Outcome()"

Result

Render

func Render(path string) string

Render shows all cases, or one case's panel + tally at :<id>.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury.Render()"

Result

Reveal

func Reveal(cur realm, caseID uint64, verdict bool, salt string)

Reveal opens a juror's verdict. The (verdict, salt) must reproduce the commitment made earlier, or the reveal is rejected. When the last juror reveals, the case closes and the majority outcome is recorded.

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/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury" -func "Reveal" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury" -func "Reveal" -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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

Get

func Get(caseID uint64) Case

Get returns a copy of a case (jurors flattened separately via Jury).

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/jury.Get()"

Result