Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

heirrealm state

Back to all declarations

Denom

untyped string

Denom is the only coin this realm accepts: ugnot (GNOT).

Value

"ugnot"

KeeperFeeBPS

untyped bigint

KeeperFeeBPS is the keeper's cut of a released vault, in basis points. 200 bps = 2%.

Value

(200 <untyped> bigint)

MinCheckInIntervalSeconds

untyped bigint

MinCheckInIntervalSeconds is the shortest check-in window: 60s. It exists so the demo can fast-forward through a full lifecycle in about a minute.

Value

(60 <untyped> bigint)

MaxCheckInIntervalSeconds

untyped bigint

MaxCheckInIntervalSeconds is the longest check-in window: 365 days.

Value

(31536000 <untyped> bigint)

vaults

v0.Tree

// vault ID (string) -> \*Vault

Open
OID
0e78a5…a348:4
vaults details

Inspect ref

nextVault

int

Value

2

Vault

type

Vault is one inheritance vault.

Value

heirrealm.Vault

CreateVault

func(beneficiary .uverse.address, intervalSeconds int64) int

CreateVault opens a vault for beneficiary with a check-in window of intervalSeconds. Attach the initial deposit with -send ugnot. The caller becomes the owner. The beneficiary must not be the owner. The deposit must be more than 0 ugnot.

Open
OID
0e78a5…a348:6
CreateVault details

Inspect func

Deposit

func(id int) int64

Deposit tops up an active vault. Only the owner may deposit, and only ugnot is accepted. The check-in timer is NOT reset by a deposit — only CheckIn resets it.

Open
OID
0e78a5…a348:8
Deposit details

Inspect func

CheckIn

func(id int) time.Time

CheckIn resets the vault's deadline to now + the check-in interval. Only the owner may check in, only while the vault is active, and only BEFORE the deadline has passed. After the deadline the vault is claimable and checking in can no longer save it.

Open
OID
0e78a5…a348:9
CheckIn details

Inspect func

TriggerRelease

func(id int) (beneficiaryShare int64, keeperFee int64)

TriggerRelease releases an expired vault. Anyone may call it — that is the keeper's job — but the keeper may not be the owner or the beneficiary, and the deadline must have passed. The keeper earns 2% of the balance; the beneficiary receives the remaining 98%. The keeper is paid for doing the work, never a custodian: they cannot release early, change the beneficiary, or touch the funds before expiry.

Open
OID
0e78a5…a348:10
TriggerRelease details

Inspect func

Cancel

func(id int) int64

Cancel closes an active vault and refunds the full balance to the owner. Only the owner may cancel, and only BEFORE the deadline. After expiry the funds belong to the beneficiary and the owner can no longer claw them back.

Open
OID
0e78a5…a348:11
Cancel details

Inspect func

GetVault

func(id int) heirrealm.Vault

GetVault returns a copy of the vault with the given ID. Read-only: callable as a query, no transaction needed.

Open
OID
0e78a5…a348:12
GetVault details

Inspect func

VaultCount

func() int

VaultCount returns the number of vaults ever created.

Open
OID
0e78a5…a348:13
VaultCount details

Inspect func

requireActive

func(v *heirrealm.Vault)

requireActive panics unless the vault is still live.

Open
OID
0e78a5…a348:14
requireActive details

Inspect func

mustGetVault

func(id int) *heirrealm.Vault

mustGetVault loads a vault by ID or panics.

Open
OID
0e78a5…a348:15
mustGetVault details

Inspect func

Render

func(path string) string

Render is the gnoweb homepage for the realm. It lists every vault with its owner, beneficiary, balance, deadline and status, plus a short how-to. A single vault can be viewed at /\<id>.

Open
OID
0e78a5…a348:16
Render details

Inspect func

renderVault

func(v *heirrealm.Vault) string
Open
OID
0e78a5…a348:18
renderVault details

Inspect func
Denom : untyped string ="ugnot"
KeeperFeeBPS : untyped bigint =(200 <untyped> bigint)
MinCheckInIntervalSeconds : untyped bigint =(60 <untyped> bigint)
MaxCheckInIntervalSeconds : untyped bigint =(31536000 <untyped> bigint)
vaults : v0.Tree Inspect
nextVault : int =2
Vault : type =heirrealm.Vault
CreateVault : func(beneficiary .uverse.address, intervalSeconds int64) int Inspect
Deposit : func(id int) int64 Inspect
CheckIn : func(id int) time.Time Inspect
TriggerRelease : func(id int) (beneficiaryShare int64, keeperFee int64) Inspect
Cancel : func(id int) int64 Inspect
GetVault : func(id int) heirrealm.Vault Inspect
VaultCount : func() int Inspect
requireActive : func(v *heirrealm.Vault) Inspect
mustGetVault : func(id int) *heirrealm.Vault Inspect
Render : func(path string) string Inspect
renderVault : func(v *heirrealm.Vault) string Inspect