pet
typepet is the persisted record for one owner's tamagotchi.
Value
v1.pet
pets
v0.Tree// owner address string -> \*pet
- OID
- 0d598d…7f73:4
pets details
clamp
func(v int, lo int, hi int) int- OID
- 0d598d…7f73:5
clamp details
get
func(owner .uverse.address) (*v1.pet, bool)- OID
- 0d598d…7f73:7
get details
project
func(p *v1.pet, height int64) (hunger int, happiness int, energy int, alive bool)project computes display stats as of height without mutating the pet, so Render can show a live-looking view without writing state on a query.
- OID
- 0d598d…7f73:8
project details
ageStageName
func(born int64, height int64) string- OID
- 0d598d…7f73:9
ageStageName details
requireLivingPet
func(owner .uverse.address, height int64) *v1.petrequireLivingPet ticks and fetches the caller's pet, panicking with a friendly message if there is none or it has died.
- OID
- 0d598d…7f73:10
requireLivingPet details
hatch
func(owner .uverse.address, name string, height int64) stringhatch is the non-crossing core of Hatch, kept separate so unit tests can exercise its panics directly without going through a realm-crossing call.
- OID
- 0d598d…7f73:11
hatch details
Hatch
func(name string) stringHatch creates a new pet for the caller. Lifetime feeds/plays/deaths carry over from any previous pet so the leaderboard tracks long-term care.
- OID
- 0d598d…7f73:12
Hatch details
feed
func(owner .uverse.address, height int64) stringfeed is the non-crossing core of Feed.
- OID
- 0d598d…7f73:13
feed details
Feed
func() stringFeed reduces hunger and gives a small energy boost.
- OID
- 0d598d…7f73:14
Feed details
play
func(owner .uverse.address, height int64) stringplay is the non-crossing core of Play.
- OID
- 0d598d…7f73:15
play details
Play
func() stringPlay boosts happiness at the cost of energy and a bit of hunger. Refuses to run a tired pet into the ground — rest first.
- OID
- 0d598d…7f73:16
Play details
sleep
func(owner .uverse.address, height int64) stringsleep is the non-crossing core of Sleep.
- OID
- 0d598d…7f73:17
sleep details
Sleep
func() stringSleep restores energy at the cost of a little hunger.
- OID
- 0d598d…7f73:18
Sleep details
byAliveThenOwner
typebyAliveThenOwner ranks living pets before dead ones, then orders each group by owner address so the leaderboard is fully deterministic.
Value
v1.byAliveThenOwner
bar
func(v int) string- OID
- 0d598d…7f73:19
bar details
renderCard
func(p *v1.pet, height int64) string- OID
- 0d598d…7f73:20
renderCard details
Render
func(path string) stringRender shows either every pet ever hatched (path == "") or a single pet's detail card when path is a bech32 owner address.
- OID
- 0d598d…7f73:21