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

v0 state

Back to all declarations

Entry

type

Entry is one registered instance.

Value

v0.Entry

entries

v0.Tree

entries maps instance path -> \*Entry. couples maps a pair ID ("keyA~keyB") -> int, how many instances claim that couple.

Open
OID
06da01…2d2f:4
entries details

Inspect ref

couples

v0.Tree

entries maps instance path -> \*Entry. couples maps a pair ID ("keyA~keyB") -> int, how many instances claim that couple.

Open
OID
06da01…2d2f:6
couples details

Inspect ref

Register

func(p *v0.Pair)

Register records the calling realm as an instance. Call it from the instance's init, so that deploying and listing are one transaction: func init(cur realm) { p = pair.New(keyA, keyB, grc20reg.MustGet(keyA), grc20reg.MustGet(keyB)) pairreg.Register(cross(cur), p) } Permissionless by design: anyone may deploy an instance under their own address namespace and land here. Spam is self funded, since the registering transaction pays for the storage it adds.

Open
OID
06da01…2d2f:7
Register details

Inspect func

Get

func(path string) *v0.Entry

Get returns the entry for an instance path, or nil.

Open
OID
06da01…2d2f:9
Get details

Inspect func

Size

func() int

Size returns how many instances are registered.

Open
OID
06da01…2d2f:10
Size details

Inspect func

Couples

func() int

Couples returns how many distinct token couples are represented.

Open
OID
06da01…2d2f:11
Couples details

Inspect func

InstancesFor

func(id string) []string

InstancesFor returns the instance paths claiming a given couple id.

Open
OID
06da01…2d2f:12
InstancesFor details

Inspect func

Render

func(path string) string

Render is the unified frontend: the index of every instance with its live state, or one instance's own page when path is an instance path.

Open
OID
06da01…2d2f:13
Render details

Inspect func

webPath

func(pkgPath string) string

webPath turns a package path into a gnoweb link.

Open
OID
06da01…2d2f:15
webPath details

Inspect func

shortPath

func(pkgPath string) string

shortPath drops the chain domain, which is the same on every row.

Open
OID
06da01…2d2f:16
shortPath details

Inspect func
Entry : type =v0.Entry
entries : v0.Tree Inspect
couples : v0.Tree Inspect
Register : func(p *v0.Pair) Inspect
Get : func(path string) *v0.Entry Inspect
Size : func() int Inspect
Couples : func() int Inspect
InstancesFor : func(id string) []string Inspect
Render : func(path string) string Inspect
countFor : func(id string) int Inspect
webPath : func(pkgPath string) string Inspect
shortPath : func(pkgPath string) string Inspect