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

coindemo source realm

Realm coindemo is a deliberately minimal third consumer proving the extracted primitives compose: coinio handles ever...

Overview

Realm coindemo is a deliberately minimal third consumer proving the extracted primitives compose: coinio handles every coin movement, feeledger handles every balance. It is an echo-vault: deposit GNOT, claim it back in full (no fees), owner sweeps out-of-band surplus.

Conservation: H == U + S (no fee pot, no app escrow), where U is the ledger's users total and S >= 0 is out-of-band surplus, recoverable only via the owner's Sweep which reserves U.

Constants 1

const Denom

1const Denom = "ugnot"
source

Denom is the only asset this realm accepts.

Functions 9

func ClaimAll

crossing Action
1func ClaimAll(cur realm)
source

ClaimAll sends the caller's entire balance back. Fails if empty.

func Deposit

crossing Action
1func Deposit(cur realm)
source

Deposit credits the caller with the attached GNOT, in full.

func Held

Action
1func Held() int64
source

Held returns the ugnot actually held at the realm address.

func Render

1func Render(_ string) string
source

Render shows totals and the conservation check.

func Sweep

crossing Action
1func Sweep(cur realm)
source

Sweep sends ugnot held above user liabilities to the owner. Owner only; user balances are reserved by construction.

func TransferOwner

crossing Action
1func TransferOwner(cur realm, next address)
source

TransferOwner hands the sweep role to next. Owner only; zero address rejected (audit Y3: without rotation, key loss permanently orphans surplus sweeping).

Imports 5

Source Files 2