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

minIncubation

int64

minIncubation is the minimum number of blocks an egg must sit before it can hatch.

Value

20

waitCap

int64

waitCap is the incubation-time bonus cap (in blocks) used by rarityTier, so waiting forever doesn't guarantee a legendary — it just improves odds.

Value

200

egg

type

egg is the persisted record for one planted egg, hatched or not.

Value

v0.egg

eggs

v0.Tree

// id string -> \*egg

Open
OID
0b9438…af10:10
eggs details

Inspect ref

nextID

int

Value

0

totalPlanted

int

Value

0

totalHatched

int

Value

0

hashSeed

func(parts []string) string

hashSeed hashes the given parts (joined with ":") to a deterministic hex digest. Used to derive an egg's species and rarity roll from facts already fixed at plant time, so nobody — not even the owner — can game the outcome after the fact.

Open
OID
0b9438…af10:18
hashSeed details

Inspect func

seedBytes

func(seedHex string) (uint8, uint8)

seedBytes pulls the first two bytes out of a hex digest for use as two independent 0-255 rolls (species pick, rarity roll).

Open
OID
0b9438…af10:19
seedBytes details

Inspect func

rarityTier

func(roll uint8, waitBlocks int64) int

rarityTier turns a 0-255 roll plus the blocks waited into a tier index 0..3 (common..legendary). Waiting longer raises the effective score, so patience improves your odds, but a bad roll can still land common even after a long wait, and a lucky roll can hatch rare almost immediately.

Open
OID
0b9438…af10:20
rarityTier details

Inspect func

plant

func(owner .uverse.address, height int64) *v0.egg

plant is the non-crossing core of PlantEgg.

Open
OID
0b9438…af10:21
plant details

Inspect func

PlantEgg

func() string

PlantEgg starts incubating a new egg for the caller. Returns its ID.

Open
OID
0b9438…af10:22
PlantEgg details

Inspect func

hatch

func(e *v0.egg, height int64) string

hatch is the non-crossing core of Hatch.

Open
OID
0b9438…af10:23
hatch details

Inspect func

Hatch

func(id string) string

Hatch hatches an incubated egg the caller owns.

Open
OID
0b9438…af10:24
Hatch details

Inspect func

train

func(e *v0.egg) string

train is the non-crossing core of Train.

Open
OID
0b9438…af10:25
train details

Inspect func

Train

func(id string) string

Train gives a hatched creature the caller owns some experience, leveling it up every 50 XP.

Open
OID
0b9438…af10:26
Train details

Inspect func

rename

func(e *v0.egg, name string) string

rename is the non-crossing core of Rename.

Open
OID
0b9438…af10:27
rename details

Inspect func

Rename

func(id string, name string) string

Rename gives a hatched creature the caller owns a custom name.

Open
OID
0b9438…af10:28
Rename details

Inspect func

escapeInline

func(s string) string

escapeInline neutralizes markdown-active characters in untrusted text before it's embedded inline in Render output.

Open
OID
0b9438…af10:29
escapeInline details

Inspect func

shortAddr

func(a .uverse.address) string
Open
OID
0b9438…af10:30
shortAddr details

Inspect func

byIDNumeric

type

byIDNumeric orders eggs by their numeric ID, ascending.

Value

v0.byIDNumeric

renderEgg

func(id string, height int64) string
Open
OID
0b9438…af10:33
renderEgg details

Inspect func

renderOwner

func(rawAddr string) string
Open
OID
0b9438…af10:34
renderOwner details

Inspect func

Render

func(path string) string

Render shows the full egg list at "", a single egg's detail when path is a numeric ID, or one owner's eggs when path is a bech32 address.

Open
OID
0b9438…af10:35
Render details

Inspect func
minIncubation : int64 =20
waitCap : int64 =200
speciesNames : [8]string Inspect
rarityNames : [4]string Inspect
rarityEmoji : [4]string Inspect
egg : type =v0.egg
eggs : v0.Tree Inspect
nextID : int =0
totalPlanted : int =0
totalHatched : int =0
rarityCounts : [4]int Inspect
get : func(id string) (*v0.egg, bool) Inspect
hashSeed : func(parts []string) string Inspect
seedBytes : func(seedHex string) (uint8, uint8) Inspect
rarityTier : func(roll uint8, waitBlocks int64) int Inspect
plant : func(owner .uverse.address, height int64) *v0.egg Inspect
PlantEgg : func() string Inspect
hatch : func(e *v0.egg, height int64) string Inspect
Hatch : func(id string) string Inspect
train : func(e *v0.egg) string Inspect
Train : func(id string) string Inspect
rename : func(e *v0.egg, name string) string Inspect
Rename : func(id string, name string) string Inspect
escapeInline : func(s string) string Inspect
shortAddr : func(a .uverse.address) string Inspect
byIDNumeric : type =v0.byIDNumeric
allEggs : func() []*v0.egg Inspect
renderHome : func() string Inspect
renderEgg : func(id string, height int64) string Inspect
renderOwner : func(rawAddr string) string Inspect
Render : func(path string) string Inspect