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

data state

Back to all declarations

DELAY

untyped bigint

DELAY is how long a ready release waits before it takes over. It is a constant so that it can never be shortened.

Value

(259200 <untyped> bigint)

maxKey

untyped bigint

Limits: every call is bounded.

Value

(128 <untyped> bigint)

maxValue

untyped bigint

Limits: every call is bounded.

Value

(16384 <untyped> bigint)

maxOps

untyped bigint

Limits: every call is bounded.

Value

(64 <untyped> bigint)

maxPage

untyped bigint

Limits: every call is bounded.

Value

(100 <untyped> bigint)

maxColls

untyped bigint

// per role

Value

(32 <untyped> bigint)

maxCollName

untyped bigint

Limits: every call is bounded.

Value

(32 <untyped> bigint)

maxPath

untyped bigint

Limits: every call is bounded.

Value

(100 <untyped> bigint)

self

string

// this realm's path

Value

"gno.land/r/nym-alexiscolin000/gnoradio/data"

proposed

[4]string

// "" = role unchanged by the release

Open
OID
0c9660…3858:13
proposed details

Inspect array

at

int64

// when the release takes over; 0 until every proposed realm said Ready

Value

0

past

*v0.BPTree

// address -> pkgpath of every realm that has been a writer

Open
OID
0c9660…3858:22
past details

Inspect pointer

frozen

int64

// seconds some role has been paused, ended pauses only

Value

0

frozeAt

int64

// when the current pause of some role began, 0 if none

Value

0

nextGuardian

.uverse.address

// the owner's replacement for the guardian, "" if none

Value

<zero>

guardianAt

int64

// when nextGuardian takes over

Value

0

start

func(deployer .uverse.address)

start puts release 1 in force (gno.land/r/\<ns>/gnoradio/\<role>/v1), with the deployer as owner and guardian.

Open
OID
0c9660…3858:30
start details

Inspect func

nftPath

func() string

nftPath is the permanent ticket NFT realm (phase 5). It is not a writer: it mints and transfers only for the tickets writer, and like every GnoRadio realm it never takes vault payouts.

Open
OID
0c9660…3858:31
nftPath details

Inspect func

roleOf

func(name string) int

roleOf is the role of a collection or vault account: its name's prefix.

Open
OID
0c9660…3858:34
roleOf details

Inspect func

settle

func()

settle puts a release whose delay is over in force.

Open
OID
0c9660…3858:38
settle details

Inspect func

drop

func()

drop forgets the release not yet in force.

Open
OID
0c9660…3858:39
drop details

Inspect func

Writer

func(r string) string

Writer is the realm that writes a role's collections now.

Open
OID
0c9660…3858:40
Writer details

Inspect func

gate

func(name string)

gate lets only the writer of a collection's or account's role through, and only while that role is not paused. The writer is the immediate caller: accounts, MsgRun and the owner never pass.

Open
OID
0c9660…3858:41
gate details

Inspect func

IsGnoRadio

func(addr .uverse.address) bool

IsGnoRadio reports whether addr is a GnoRadio realm: this one, the ticket NFT realm, or any current, proposed or past writer.

Open
OID
0c9660…3858:42
IsGnoRadio details

Inspect func

checkPath

func(p string)

checkPath refuses anything but a plain realm path.

Open
OID
0c9660…3858:44
checkPath details

Inspect func

Propose

func(r string, pkgpath string)

Propose adds a role's new writer to the next release. Any change restarts the clock. Owner only.

Open
OID
0c9660…3858:45
Propose details

Inspect func

Ready

func()

Ready is a proposed realm's own call (each rules realm exposes it): once every proposed realm said it, the release takes over DELAY later.

Open
OID
0c9660…3858:46
Ready details

Inspect func

Cancel

func()

Cancel drops the release not yet in force. Owner or guardian. It never touches a guardian replacement.

Open
OID
0c9660…3858:47
Cancel details

Inspect func

Pause

func(r string, on bool)

Pause stops a role's writes and vault operations at once ("" every role); reads and VaultWithdraw go on. on=false resumes the same writer. The owner pauses and resumes; the guardian only pauses, and only while there is an owner to resume.

Open
OID
0c9660…3858:48
Pause details

Inspect func

Renounce

func()

Renounce gives the owner role up: writers never change again and nothing can be paused. Refused while a role is paused, which could then never write again. It drops the release not yet in force.

Open
OID
0c9660…3858:49
Renounce details

Inspect func

Offer

func(to .uverse.address)

Offer offers the owner role to an address (offering it to the owner cancels the offer); Accept takes it.

Open
OID
0c9660…3858:50
Offer details

Inspect func

GuardianOffer

func(to .uverse.address)

GuardianOffer and GuardianAccept pass the guardian role in two steps; the guardian offers it. The owner's only call on the role is GuardianReplace.

Open
OID
0c9660…3858:52
GuardianOffer details

Inspect func

GuardianRenounce

func()

GuardianRenounce gives the guardian role up. A replacement the owner already announced still takes over.

Open
OID
0c9660…3858:54
GuardianRenounce details

Inspect func

GuardianReplace

func(to .uverse.address)

GuardianReplace is the owner's way out of a lost or stolen guardian key, which could otherwise cancel every release and pause after every resume for good: to becomes the guardian 2x DELAY (six days) later. The guardian cannot cancel it; the owner withdraws it with to = "" or announces another one, which restarts the clock. The wait outlasts a release's DELAY, so a stolen owner key that replaces the guardian is public for six days before its own release can even start its 72 hours. Owner only.

Open
OID
0c9660…3858:55
GuardianReplace details

Inspect func

settleGuardian

func()

settleGuardian puts a replacement whose wait is over in force: a fresh role, so any offer the old guardian left dies with it.

Open
OID
0c9660…3858:56
settleGuardian details

Inspect func

guardianNow

func() (holder .uverse.address, pending .uverse.address)
Open
OID
0c9660…3858:57
guardianNow details

Inspect func

Paused

func(r string) bool

Paused reports whether a role's writes are stopped now.

Open
OID
0c9660…3858:58
Paused details

Inspect func

Writers

func() string

Writers is the state of every role, as JSON: {"owner","pendingOwner", "guardian","pendingGuardian","nextGuardian","guardianAt","at","roles": {"catalog":{"writer","paused","proposed","ready"},…}}. at is the unix time a ready release takes over, guardianAt the time nextGuardian (the owner's GuardianReplace) does.

Open
OID
0c9660…3858:62
Writers details

Inspect func

mustColl

func(name string) *v0.BPTree
Open
OID
0c9660…3858:64
mustColl details

Inspect func

Make

func(name string)

Make creates a collection under the caller's role (nothing if it exists): "\<role>/\<name>", name of a-z 0-9 \_, at most 32 bytes in all, 32 per role.

Open
OID
0c9660…3858:65
Make details

Inspect func

apply

func(op string, name string, k string, v string) bool

apply is one write of the caller's role: Set, Remove and each op of Batch.

Open
OID
0c9660…3858:66
apply details

Inspect func

Set

func(name string, key string, value string)

Set writes value at key of a collection of the caller's role.

Open
OID
0c9660…3858:67
Set details

Inspect func

Remove

func(name string, key string) bool

Remove deletes a key and reports whether it was there.

Open
OID
0c9660…3858:68
Remove details

Inspect func

Batch

func(ops []string)

Batch applies up to 64 ops of four strings (store.Ops): "set" or "del", collection, key, value. It reads the strings and keeps nothing else of the caller's slice.

Open
OID
0c9660…3858:69
Batch details

Inspect func

Get

func(name string, key string) (string, bool)

Get returns the value at key ("" and false when absent).

Open
OID
0c9660…3858:70
Get details

Inspect func

Has

func(name string, key string) bool
Open
OID
0c9660…3858:71
Has details

Inspect func

Size

func(name string) int

Size is the number of keys of a collection.

Open
OID
0c9660…3858:72
Size details

Inspect func

Index

func(name string, key string) int

Index is the number of keys before key: Index(c, b) - Index(c, a) counts the keys in \[a, b) without a counter. O(log² n).

Open
OID
0c9660…3858:73
Index details

Inspect func

Page

func(name string, start string, end string, limit int, reverse bool) string

Page returns up to limit (1-100) rows with start \<= key \< end ("" no bound), lowest first or highest first when reverse, as store.Row strings (store.Rows decodes them).

Open
OID
0c9660…3858:74
Page details

Inspect func

PageAt

func(name string, offset int, limit int, reverse bool) string

PageAt returns up to limit (1-100) rows from the offset-th key, counted from the highest when reverse.

Open
OID
0c9660…3858:75
PageAt details

Inspect func

denom

untyped string

Value

"ugnot"

daySecs

untyped bigint

Value

(86400 <untyped> bigint)

maxHoldDays

untyped bigint

// a hold lapses at most this many days ahead

Value

(31 <untyped> bigint)

maxAcct

untyped bigint

Value

(64 <untyped> bigint)

vault

*v0.BPTree

// account -> store.Rec(funder, balance, holds)

Open
OID
0c9660…3858:78
vault details

Inspect pointer

vaultTotal

int64

Value

0

account

type

Value

data.account

getAcct

func(name string) data.account
Open
OID
0c9660…3858:81
getAcct details

Inspect func

putAcct

func(name string, a data.account)
Open
OID
0c9660…3858:83
putAcct details

Inspect func

VaultDay

func() int64

VaultDay is the UTC day of the vault's clock, which stands still while any role is paused: a pause never makes a hold lapse, it lapses that much later. The clock lags real time by every past pause, so a hold made after one also lasts that much longer.

Open
OID
0c9660…3858:85
VaultDay details

Inspect func

held

func(list string, e int64) (live int64, atE int64)

held reads the holds still live today, and the one lapsing on day e.

Open
OID
0c9660…3858:87
held details

Inspect func

hold

func(list string, e int64, delta int64) string

hold adds delta to the hold lapsing on day e and drops lapsed ones.

Open
OID
0c9660…3858:88
hold details

Inspect func

send

func(acct string, to .uverse.address, amt int64, event string)

send pays out of the vault: the total goes down before the coins leave.

Open
OID
0c9660…3858:90
send details

Inspect func

VaultCredit

func(acct string, funder .uverse.address, amt int64)

VaultCredit adds amt, which the writer has just sent to this realm, to an account funded by funder. A new funder needs an empty account (VaultRefund first).

Open
OID
0c9660…3858:91
VaultCredit details

Inspect func

VaultHold

func(acct string, amt int64, day int64)

VaultHold reserves amt of the free balance until the end of day on the vault's clock (from VaultDay to 31 days from now).

Open
OID
0c9660…3858:92
VaultHold details

Inspect func

VaultRelease

func(acct string, amt int64, day int64) int64

VaultRelease gives back up to amt of the hold lapsing on day and returns what it released (less when part of it lapsed or was refunded).

Open
OID
0c9660…3858:93
VaultRelease details

Inspect func

VaultPay

func(acct string, to .uverse.address, amt int64, day int64)

VaultPay pays amt from the live hold lapsing on day to an account outside GnoRadio.

Open
OID
0c9660…3858:94
VaultPay details

Inspect func

VaultRefund

func(acct string) int64

VaultRefund pays the whole balance back to the funder and drops the holds (the profile changed hands). It returns the amount.

Open
OID
0c9660…3858:95
VaultRefund details

Inspect func

VaultWithdraw

func(acct string)

VaultWithdraw pays the caller what is free in an account they funded. It works whoever the writer is, while paused and after Renounce.

Open
OID
0c9660…3858:96
VaultWithdraw details

Inspect func

VaultInfo

func(acct string) (funder .uverse.address, balance int64, free int64)

VaultInfo is an account's funder, balance and free part (not held).

Open
OID
0c9660…3858:97
VaultInfo details

Inspect func

VaultHeld

func(acct string, day int64) int64

VaultHeld is the live hold of an account lapsing on day.

Open
OID
0c9660…3858:98
VaultHeld details

Inspect func

VaultTotal

func() int64

VaultTotal is every account's balance: what this realm holds for them.

Open
OID
0c9660…3858:99
VaultTotal details

Inspect func
DELAY : untyped bigint =(259200 <untyped> bigint)
maxKey : untyped bigint =(128 <untyped> bigint)
maxValue : untyped bigint =(16384 <untyped> bigint)
maxOps : untyped bigint =(64 <untyped> bigint)
maxPage : untyped bigint =(100 <untyped> bigint)
maxColls : untyped bigint =(32 <untyped> bigint)
maxCollName : untyped bigint =(32 <untyped> bigint)
maxPath : untyped bigint =(100 <untyped> bigint)
roles : [4]string Inspect
self : string ="gno.land/r/nym-alexiscolin000/gnoradio/data"
owner : *v0.Role Inspect
guardian : *v0.Role Inspect
writer : [4]string Inspect
paused : [4]bool Inspect
proposed : [4]string Inspect
ready : [4]bool Inspect
at : int64 =0
colls : map[string]*v0.BPTree Inspect
nColls : [4]int Inspect
past : *v0.BPTree Inspect
frozen : int64 =0
frozeAt : int64 =0
nextGuardian : .uverse.address =<zero>
guardianAt : int64 =0
init.24 : func() Inspect
start : func(deployer .uverse.address) Inspect
nftPath : func() string Inspect
remember : func(pkgpath string) Inspect
roleIndex : func(r string) int Inspect
roleOf : func(name string) int Inspect
noPayment : func() Inspect
now : func() int64 Inspect
matured : func() bool Inspect
settle : func() Inspect
drop : func() Inspect
Writer : func(r string) string Inspect
gate : func(name string) Inspect
IsGnoRadio : func(addr .uverse.address) bool Inspect
onlyOwner : func() Inspect
checkPath : func(p string) Inspect
Propose : func(r string, pkgpath string) Inspect
Ready : func() Inspect
Cancel : func() Inspect
Pause : func(r string, on bool) Inspect
Renounce : func() Inspect
Offer : func(to .uverse.address) Inspect
Accept : func() Inspect
GuardianOffer : func(to .uverse.address) Inspect
GuardianAccept : func() Inspect
GuardianRenounce : func() Inspect
GuardianReplace : func(to .uverse.address) Inspect
settleGuardian : func() Inspect
guardianNow : func() (holder .uverse.address, pending .uverse.address) Inspect
Paused : func(r string) bool Inspect
anyPaused : func() bool Inspect
Owner : func() .uverse.address Inspect
Guardian : func() .uverse.address Inspect
Writers : func() string Inspect
coll : func(name string) *v0.BPTree Inspect
mustColl : func(name string) *v0.BPTree Inspect
Make : func(name string) Inspect
apply : func(op string, name string, k string, v string) bool Inspect
Set : func(name string, key string, value string) Inspect
Remove : func(name string, key string) bool Inspect
Batch : func(ops []string) Inspect
Get : func(name string, key string) (string, bool) Inspect
Has : func(name string, key string) bool Inspect
Size : func(name string) int Inspect
Index : func(name string, key string) int Inspect
Page : func(name string, start string, end string, limit int, reverse bool) string Inspect
PageAt : func(name string, offset int, limit int, reverse bool) string Inspect
checkLimit : func(limit int) Inspect
denom : untyped string ="ugnot"
daySecs : untyped bigint =(86400 <untyped> bigint)
maxHoldDays : untyped bigint =(31 <untyped> bigint)
maxAcct : untyped bigint =(64 <untyped> bigint)
vault : *v0.BPTree Inspect
vaultTotal : int64 =0
account : type =data.account
getAcct : func(name string) data.account Inspect
putAcct : func(name string, a data.account) Inspect
atoi : func(s string) int64 Inspect
VaultDay : func() int64 Inspect
today : func() int64 Inspect
held : func(list string, e int64) (live int64, atE int64) Inspect
hold : func(list string, e int64, delta int64) string Inspect
positive : func(amt int64) Inspect
send : func(acct string, to .uverse.address, amt int64, event string) Inspect
VaultCredit : func(acct string, funder .uverse.address, amt int64) Inspect
VaultHold : func(acct string, amt int64, day int64) Inspect
VaultRelease : func(acct string, amt int64, day int64) int64 Inspect
VaultPay : func(acct string, to .uverse.address, amt int64, day int64) Inspect
VaultRefund : func(acct string) int64 Inspect
VaultWithdraw : func(acct string) Inspect
VaultInfo : func(acct string) (funder .uverse.address, balance int64, free int64) Inspect
VaultHeld : func(acct string, day int64) int64 Inspect
VaultTotal : func() int64 Inspect