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

/receipt package

Overview

Package receipt is an append-only log of agent execution receipts.

The thesis: provenance is not correctness. A chain can prove *who* committed to an output, *when*, that the bytes have not changed since, and *what* was staked or attested — but it cannot, by itself, prove the output was any good. Correctness comes from an external validation mechanism.

So a receipt stores commitments (hashes) to the task, inputs, outputs, tool calls and runtime, never the raw data — that lives off-chain. The realm then lets independent validators attach attestations: "I re-ran this and it reproduced", "the tests pass", "the output matches the commitment", or "rejected". The receipt's trust level is exactly the sum of the attestations it has collected, and nothing more.

Function

Attest

func Attest(cur realm, seq uint64, verdict, note string)

Attest attaches an independent validator's verdict to a receipt. The same validator cannot attest twice; the author of a receipt cannot attest to their own work (self-attestation proves nothing).

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/receipt" -func "Attest" -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/receipt" -func "Attest" -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