Hierarchy

  • Recipe

Implements

  • Account

Constructors

Properties

ACCOUNT_NAME: "craftableItem" | "craftingFacility" | "craftingProcess" | "domain" | "recipe" | "recipeCategory" = 'recipe'
MIN_DATA_SIZE: number = RECIPE_MIN_DATA_SIZE

Accessors

  • get data(): Readonly<AnchorTypeDef<Object, AnchorDefined<CraftingIDL, Record<string, never>>>>
  • Returns Readonly<AnchorTypeDef<Object, AnchorDefined<CraftingIDL, Record<string, never>>>>

  • get key(): Readonly<PublicKey>
  • Returns Readonly<PublicKey>

Methods

  • Add a consumable input to a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • mint: PublicKey

      the ingredient's mint

    • recipeIngredient: RecipeInputsOutputs

      the amount and mint for this ingredient

    Returns InstructionReturn

  • Add a non-consumable input to a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • mint: PublicKey

      the ingredient's mint

    • recipeIngredient: RecipeInputsOutputs

      the amount and mint for this ingredient- the amount and mint for this ingredient

    Returns InstructionReturn

  • Add an output to a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • craftableItem: PublicKey

      the craftable item for this output

    • recipeIngredient: RecipeInputsOutputs

      the amount and mint for this ingredient

    Returns InstructionReturn

  • Deregister a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • fundsTo: PublicKey | "funder"

      receives rent refund

    • domain: PublicKey

      the crafting domain

    • recipeCategory: PublicKey

      the crafting recipe category

    • input: KeyIndexInput

      the input parameters

    Returns InstructionReturn

  • Register a Recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: AsyncSigner<unknown>

      the new crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • recipeCategory: PublicKey

      the crafting recipe category

    • input: RegisterRecipeInput

      the input parameters

    • Optional feeRecipient: PublicKey

      The token account that receives the Recipe's feeAmount

    Returns InstructionReturn

  • Remove a consumable input from a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • input: RemoveRecipeIngredients

      the input parameters

    Returns InstructionReturn

  • Remove a non-consumable input from a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • input: RemoveRecipeIngredients

      the input parameters

    Returns InstructionReturn

  • Remove an output from a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • input: RemoveRecipeIngredients

      the input parameters

    Returns InstructionReturn

  • Update a recipe

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • updateRecipeInput: UpdateRecipeInput

      input params

    • Optional feeRecipient: PublicKey

      The token account that receives the Recipe's feeAmount

    Returns InstructionReturn

  • Update a recipe's category

    Returns

    InstructionReturn

    Parameters

    • program: CraftingIDLProgram

      Crafting program

    • recipe: PublicKey

      the crafting recipe

    • key: AsyncSigner<unknown>

      Key authorized to use this instruction

    • profile: PublicKey

      Profile Account with required Crafting Permissions

    • domain: PublicKey

      the crafting domain

    • recipeCategoryOld: PublicKey

      the old recipe category

    • recipeCategoryNew: PublicKey

      the new recipe category

    • input: KeyIndexInput

      the input parameters

    Returns InstructionReturn

Generated using TypeDoc