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

craft state

Back to all declarations

SetRecipeEvent

untyped string

Value

"SetRecipe"

DeleteRecipeEvent

untyped string

Value

"DeleteRecipe"

DeleteRecipesEvent

untyped string

Value

"DeleteRecipes"

SetListLimitEvent

untyped string

Value

"SetListLimit"

SetCraftFeeEvent

untyped string

Value

"SetCraftFee"

CraftEvent

untyped string

Value

"Craft"

listLimit

int

Value

100

craftFee

int64

Value

1000000

SetRecipe

func(recipe string, itemID uint32)

SetRecipe stores the item definition ID produced by a canonical recipe.

Open
OID
05ce2a…386a:11
SetRecipe details

Inspect func

SetRecipes

func(recipesCSV string, itemIDsCSV string)

SetRecipes stores up to 100 canonical recipe and item ID pairs in one transaction.

Open
OID
05ce2a…386a:12
SetRecipes details

Inspect func

setRecipe

func(canonicalRecipe string, itemID uint32)
Open
OID
05ce2a…386a:13
setRecipe details

Inspect func

DeleteRecipe

func(recipe string)
Open
OID
05ce2a…386a:14
DeleteRecipe details

Inspect func

DeleteRecipes

func(recipesCSV string)
Open
OID
05ce2a…386a:15
DeleteRecipes details

Inspect func

deleteRecipe

func(canonicalRecipe string)
Open
OID
05ce2a…386a:16
deleteRecipe details

Inspect func

HasRecipe

func(recipe string) bool
Open
OID
05ce2a…386a:17
HasRecipe details

Inspect func

GetRecipe

func(recipe string) uint32
Open
OID
05ce2a…386a:18
GetRecipe details

Inspect func

ListRecipes

func(page int, count int) []map[string]string
Open
OID
05ce2a…386a:20
ListRecipes details

Inspect func

SetListLimit

func(limit int)
Open
OID
05ce2a…386a:21
SetListLimit details

Inspect func

Craft

func(recipe string) uint64

Craft burns a canonical recipe and mints the next GRC721 equipment token.

Open
OID
05ce2a…386a:25
Craft details

Inspect func

mustCanonicalRecipe

func(recipe string) string
Open
OID
05ce2a…386a:26
mustCanonicalRecipe details

Inspect func

mustGetRecipeItemID

func(recipe string) uint32
Open
OID
05ce2a…386a:27
mustGetRecipeItemID details

Inspect func

assertCraftNoCoins

func()
Open
OID
05ce2a…386a:28
assertCraftNoCoins details

Inspect func

assertExactUgnotPayment

func(expected int64)
Open
OID
05ce2a…386a:29
assertExactUgnotPayment details

Inspect func

renderRecipeHome

func() string
Open
OID
05ce2a…386a:32
renderRecipeHome details

Inspect func

renderRecipeList

func(rawPage string) string
Open
OID
05ce2a…386a:33
renderRecipeList details

Inspect func

renderRecipeResult

func(recipe string) string
Open
OID
05ce2a…386a:34
renderRecipeResult details

Inspect func

renderRecipeError

func(message string) string
Open
OID
05ce2a…386a:35
renderRecipeError details

Inspect func

formatRecipeCode

func(recipe string) string

Recipes use | and - as syntax. A code span keeps those characters literal so gnoweb does not show backslash escapes.

Open
OID
05ce2a…386a:36
formatRecipeCode details

Inspect func

recipeBatchLimit

untyped bigint

Value

(100 <untyped> bigint)

maxRecipeIngredients

untyped bigint

Value

(16 <untyped> bigint)

defaultRecipeListLimit

untyped bigint

Value

(100 <untyped> bigint)

defaultCraftFee

int64

Value

1000000

craftIngredient

type

Value

craft.craftIngredient

mustParseRecipeCSV

func(recipesCSV string, itemIDsCSV string) ([]string, []uint32)
Open
OID
05ce2a…386a:37
mustParseRecipeCSV details

Inspect func

mustParseRecipeKeyCSV

func(recipesCSV string) []string
Open
OID
05ce2a…386a:39
mustParseRecipeKeyCSV details

Inspect func

mustParseRecipe

func(recipe string) (string, []craft.craftIngredient)
Open
OID
05ce2a…386a:40
mustParseRecipe details

Inspect func

parseRecipe

func(recipe string) (string, []craft.craftIngredient, string)

A valid recipe is "\<4-hex occupancy>|\<ingredient>|...". Occupancy bits choose slots 0-15 in order; each ingredient is "tokenId:amount" or "slot:tokenId:amount". Example: "0013|iron:1|iron:2|stick:2" (bits 0,1,4) canonicalizes to "0013|0:iron:1|1:iron:2|4:stick:2".

Open
OID
05ce2a…386a:41
parseRecipe details

Inspect func

parseRecipeIngredient

func(entry string, expectedSlot uint) (craft.craftIngredient, string)
Open
OID
05ce2a…386a:42
parseRecipeIngredient details

Inspect func

occupiedSlots

func(occupancy uint16) []uint
Open
OID
05ce2a…386a:43
occupiedSlots details

Inspect func

formatOccupancy

func(occupancy uint16) string
Open
OID
05ce2a…386a:44
formatOccupancy details

Inspect func

assertRecipeListPageCount

func(page int, count int)
Open
OID
05ce2a…386a:45
assertRecipeListPageCount details

Inspect func
SetRecipeEvent : untyped string ="SetRecipe"
DeleteRecipeEvent : untyped string ="DeleteRecipe"
DeleteRecipesEvent : untyped string ="DeleteRecipes"
SetListLimitEvent : untyped string ="SetListLimit"
SetCraftFeeEvent : untyped string ="SetCraftFee"
CraftEvent : untyped string ="Craft"
recipes : *v0.BPTree Inspect
listLimit : int =100
craftFee : int64 =1000000
init.9 : func() Inspect
resetCraftState : func() Inspect
SetRecipe : func(recipe string, itemID uint32) Inspect
SetRecipes : func(recipesCSV string, itemIDsCSV string) Inspect
setRecipe : func(canonicalRecipe string, itemID uint32) Inspect
DeleteRecipe : func(recipe string) Inspect
DeleteRecipes : func(recipesCSV string) Inspect
deleteRecipe : func(canonicalRecipe string) Inspect
HasRecipe : func(recipe string) bool Inspect
GetRecipe : func(recipe string) uint32 Inspect
GetRecipeCount : func() int Inspect
ListRecipes : func(page int, count int) []map[string]string Inspect
SetListLimit : func(limit int) Inspect
GetListLimit : func() int Inspect
SetCraftFee : func(fee int64) Inspect
GetCraftFee : func() int64 Inspect
Craft : func(recipe string) uint64 Inspect
mustCanonicalRecipe : func(recipe string) string Inspect
mustGetRecipeItemID : func(recipe string) uint32 Inspect
assertCraftNoCoins : func() Inspect
assertExactUgnotPayment : func(expected int64) Inspect
Render : func(iURL string) string Inspect
renderRecipeHome : func() string Inspect
renderRecipeList : func(rawPage string) string Inspect
renderRecipeResult : func(recipe string) string Inspect
renderRecipeError : func(message string) string Inspect
formatRecipeCode : func(recipe string) string Inspect
recipeBatchLimit : untyped bigint =(100 <untyped> bigint)
maxRecipeIngredients : untyped bigint =(16 <untyped> bigint)
defaultRecipeListLimit : untyped bigint =(100 <untyped> bigint)
defaultCraftFee : int64 =1000000
craftIngredient : type =craft.craftIngredient
mustParseRecipeCSV : func(recipesCSV string, itemIDsCSV string) ([]string, []uint32) Inspect
mustParseRecipeKeyCSV : func(recipesCSV string) []string Inspect
mustParseRecipe : func(recipe string) (string, []craft.craftIngredient) Inspect
parseRecipe : func(recipe string) (string, []craft.craftIngredient, string) Inspect
parseRecipeIngredient : func(entry string, expectedSlot uint) (craft.craftIngredient, string) Inspect
occupiedSlots : func(occupancy uint16) []uint Inspect
formatOccupancy : func(occupancy uint16) string Inspect
assertRecipeListPageCount : func(page int, count int) Inspect