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 what one denom says about itself.

Value

v0.Entry

MaxName

untyped bigint

Value

(40 <untyped> bigint)

MaxSymbol

untyped bigint

Value

(12 <untyped> bigint)

MaxDoc

untyped bigint

Value

(200 <untyped> bigint)

MaxDecimals

untyped bigint

Value

(18 <untyped> bigint)

denoms

[]string

// registration order, for a stable Render

Value

<zero>

Register

func(denom string, name string, symbol string, decimals int, doc string)

Register records or rewrites what a denom means. The caller must be the realm the denom names, which is the entire authorization. Calling it again overwrites the entry and bumps \[Entry.Revisions]. An issuer can always re-describe its own coin, and can never describe anybody else's.

Open
OID
0dfd5d…459d:7
Register details

Inspect func

Get

func(denom string) (v0.Entry, bool)

Get returns the entry for a denom, and whether it has one.

Open
OID
0dfd5d…459d:9
Get details

Inspect func

MustGet

func(denom string) v0.Entry

MustGet is [Get](#Get) for a caller that treats an unregistered denom as a bug.

Open
OID
0dfd5d…459d:10
MustGet details

Inspect func

IsRegistered

func(denom string) bool

IsRegistered reports whether a denom has said anything about itself.

Open
OID
0dfd5d…459d:11
IsRegistered details

Inspect func

List

func() []v0.Entry

List returns every entry, in registration order.

Open
OID
0dfd5d…459d:12
List details

Inspect func

ByIssuer

func(pkgPath string) []v0.Entry

ByIssuer returns every entry issued by one realm, in registration order.

Open
OID
0dfd5d…459d:13
ByIssuer details

Inspect func

Count

func() int

Count returns how many denoms are registered.

Open
OID
0dfd5d…459d:14
Count details

Inspect func

IssuerOf

func(denom string) string

IssuerOf returns the package path embedded in a denom, without consulting the registry: the relation is in the string itself. It aborts on anything that is not a realm denom, which includes \`ugnot\`. It is exported because it is useful to anybody handling a denom, registered or not: given a balance, this is how you find the code that can take it away.

Open
OID
0dfd5d…459d:15
IssuerOf details

Inspect func

issuerOf

func(denom string) string
Open
OID
0dfd5d…459d:16
issuerOf details

Inspect func

assertLen

func(what string, s string, max int)
Open
OID
0dfd5d…459d:17
assertLen details

Inspect func

Render

func(path string) string

Render lists the registry. \`?\<denom>\` shows one entry, \`?\<pkgpath>\` shows everything one realm issues.

Open
OID
0dfd5d…459d:18
Render details

Inspect func

renderDenom

func(denom string) string
Open
OID
0dfd5d…459d:21
renderDenom details

Inspect func

renderIssuer

func(pkgPath string) string
Open
OID
0dfd5d…459d:22
renderIssuer details

Inspect func

safeIssuer

func(denom string) string

safeIssuer is IssuerOf for a Render, which must never abort on a path a reader typed into the URL bar.

Open
OID
0dfd5d…459d:23
safeIssuer details

Inspect func
Entry : type =v0.Entry
MaxName : untyped bigint =(40 <untyped> bigint)
MaxSymbol : untyped bigint =(12 <untyped> bigint)
MaxDoc : untyped bigint =(200 <untyped> bigint)
MaxDecimals : untyped bigint =(18 <untyped> bigint)
byDenom : *v0.Tree Inspect
denoms : []string =<zero>
Register : func(denom string, name string, symbol string, decimals int, doc string) Inspect
Get : func(denom string) (v0.Entry, bool) Inspect
MustGet : func(denom string) v0.Entry Inspect
IsRegistered : func(denom string) bool Inspect
List : func() []v0.Entry Inspect
ByIssuer : func(pkgPath string) []v0.Entry Inspect
Count : func() int Inspect
IssuerOf : func(denom string) string Inspect
issuerOf : func(denom string) string Inspect
assertLen : func(what string, s string, max int) Inspect
Render : func(path string) string Inspect
renderIndex : func() string Inspect
renderDenom : func(denom string) string Inspect
renderIssuer : func(pkgPath string) string Inspect
safeIssuer : func(denom string) string Inspect