export type Crafting = { version: '0.1.0'; name: 'crafting'; instructions: [ { name: 'addConsumableInputToRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'mint'; isMut: false; isSigner: false; docs: ['The Mint Account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The System program']; } ]; args: [ { name: 'input'; type: { defined: 'RecipeIngredients'; }; } ]; }, { name: 'addCraftingFacilityRecipeCategory'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipeCategory'; isMut: false; isSigner: false; docs: ['The [`RecipeCategory`] account']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'KeyIndexInput'; }; } ]; }, { name: 'addNonConsumableInputToRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'mint'; isMut: false; isSigner: false; docs: ['The Cargo Type Account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The System program']; } ]; args: [ { name: 'input'; type: { defined: 'RecipeIngredients'; }; } ]; }, { name: 'addOutputToRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'craftableItem'; isMut: false; isSigner: false; docs: ['The Craftable Item that the output represents']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The System program']; } ]; args: [ { name: 'input'; type: { defined: 'RecipeIngredients'; }; } ]; }, { name: 'addRecipeIngredient'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'authority'; isMut: false; isSigner: true; docs: ['The [`CraftingProcess`] authority']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: false; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'tokenFrom'; isMut: true; isSigner: false; docs: ['The recipe ingredient token account.']; }, { name: 'tokenTo'; isMut: true; isSigner: false; docs: [ 'The token account owned by the `crafting_process` which holds the ingredient in escrow' ]; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The [Token] program']; } ]; args: [ { name: 'input'; type: { defined: 'AddRecipeIngredientInput'; }; } ]; }, { name: 'burnConsumableIngredient'; accounts: [ { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'tokenFrom'; isMut: true; isSigner: false; docs: [ 'The token account owned by the `crafting_process` which holds the ingredient in escrow' ]; }, { name: 'mint'; isMut: true; isSigner: false; docs: ['The mint of the consumable recipe ingredient']; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The [Token] program']; } ]; args: [ { name: 'input'; type: { defined: 'BurnConsumableIngredientInput'; }; } ]; }, { name: 'cancelCraftingProcess'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'authority'; isMut: false; isSigner: true; docs: ['The [`CraftingProcess`] authority']; }, { name: 'fundsTo'; isMut: true; isSigner: false; docs: ['The funds_to - receives rent refund']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; } ]; args: []; }, { name: 'claimNonConsumableIngredient'; accounts: [ { name: 'authority'; isMut: false; isSigner: false; docs: ['The owner/authority of crafting_process account']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'tokenFrom'; isMut: true; isSigner: false; docs: [ 'The token account owned by the `crafting_process` which holds the ingredient in escrow' ]; }, { name: 'tokenTo'; isMut: true; isSigner: false; docs: ['The token account to receive the non-consumable ingredient.']; }, { name: 'mint'; isMut: true; isSigner: false; docs: ['The mint of the recipe ingredient']; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The [Token] program']; } ]; args: [ { name: 'input'; type: { defined: 'ClaimNonConsumableIngredientInput'; }; } ]; }, { name: 'claimRecipeOutput'; accounts: [ { name: 'authority'; isMut: false; isSigner: false; docs: ['The owner/authority of crafting_process account']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'tokenFrom'; isMut: true; isSigner: false; docs: ['The token account owned by `craftable_item`.']; }, { name: 'tokenTo'; isMut: true; isSigner: false; docs: ['The recipe ingredient token account.']; }, { name: 'craftableItem'; isMut: false; isSigner: false; docs: ['The craftable_item (this is also the mint authority)']; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The [Token] program']; } ]; args: [ { name: 'input'; type: { defined: 'ClaimRecipeOutputInput'; }; } ]; }, { name: 'closeCraftingProcess'; accounts: [ { name: 'authority'; isMut: false; isSigner: true; docs: ['The [`CraftingProcess`] authority']; }, { name: 'fundsTo'; isMut: true; isSigner: false; docs: ['The funds_to - receives rent refund']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; } ]; args: []; }, { name: 'createCraftingProcess'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'authority'; isMut: false; isSigner: true; docs: ['The owner/authority for the new crafting_process account']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'CreateCraftingProcessInput'; }; } ]; }, { name: 'deregisterCraftingFacility'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'fundsTo'; isMut: true; isSigner: false; docs: ['The funds_to - receives rent refund']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; } ]; args: [ { name: 'input'; type: { defined: 'KeyIndexInput'; }; } ]; }, { name: 'deregisterRecipeCategory'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'fundsTo'; isMut: true; isSigner: false; docs: ['The funds_to - receives rent refund']; }, { name: 'recipeCategory'; isMut: true; isSigner: false; docs: ['The [RecipeCategory] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'KeyIndexInput'; }; } ]; }, { name: 'drainCraftableItemBank'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'fundsTo'; isMut: true; isSigner: false; docs: ['The funds_to - receives rent refund']; }, { name: 'craftableItem'; isMut: true; isSigner: false; docs: ['The Craftable Item account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [omain account']; }, { name: 'tokenFrom'; isMut: true; isSigner: false; docs: ['The craftable item token bank to drain']; }, { name: 'tokenTo'; isMut: true; isSigner: false; docs: ['Where to send tokens from the bank']; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The token program']; } ]; args: [ { name: 'input'; type: { defined: 'KeyIndexInput'; }; } ]; }, { name: 'initializeDomain'; accounts: [ { name: 'signer'; isMut: true; isSigner: true; docs: ['The entity calling this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: [ 'The [`Profile`] that handles the crafting program permissions' ]; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'domain'; isMut: true; isSigner: true; docs: ['The [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['Solana System program']; } ]; args: [ { name: 'namespace'; type: { array: ['u8', 32]; }; } ]; }, { name: 'legitimizeRecipeIngredient'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'authority'; isMut: false; isSigner: true; docs: ['The [`CraftingProcess`] authority']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: false; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'tokenTo'; isMut: true; isSigner: false; docs: [ 'The token account owned by the `crafting_process` which holds the ingredient in escrow' ]; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The [Token] program']; } ]; args: [ { name: 'input'; type: { defined: 'LegitimizeRecipeIngredientInput'; }; } ]; }, { name: 'registerCraftableItem'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'mint'; isMut: true; isSigner: false; docs: ['The mint of the Craftable Item to be registered']; }, { name: 'craftableItem'; isMut: true; isSigner: false; docs: ['The Craftable Item to be registered']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'RegisterCraftableItemInput'; }; } ]; }, { name: 'registerCraftingFacility'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'craftingFacility'; isMut: true; isSigner: true; docs: ['The [`CraftingFacility`] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; }, { name: 'location'; isMut: false; isSigner: false; docs: ['The Location address']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'RegisterCraftingFacilityInput'; }; } ]; }, { name: 'registerRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: true; docs: ['The [Recipe] account']; }, { name: 'recipeCategory'; isMut: true; isSigner: false; docs: ['The [RecipeCategory] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'RegisterRecipeInput'; }; } ]; }, { name: 'registerRecipeCategory'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipeCategory'; isMut: true; isSigner: true; docs: ['The [RecipeCategory] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'RegisterRecipeCategoryInput'; }; } ]; }, { name: 'removeConsumableInputFromRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The System program']; } ]; args: [ { name: 'input'; type: { defined: 'RemoveRecipeIngredients'; }; } ]; }, { name: 'removeCraftingFacilityRecipeCategory'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipeCategory'; isMut: false; isSigner: false; docs: ['The recipe category to remove.']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The Solana System program']; } ]; args: [ { name: 'input'; type: { defined: 'RemoveCraftingFacilityRecipeCategoryInput'; }; } ]; }, { name: 'removeNonConsumableInputFromRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The System program']; } ]; args: [ { name: 'input'; type: { defined: 'RemoveRecipeIngredients'; }; } ]; }, { name: 'removeOutputFromRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'funder'; isMut: true; isSigner: true; docs: ['The funder - pays for account rent']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['The [Domain] account']; }, { name: 'systemProgram'; isMut: false; isSigner: false; docs: ['The System program']; } ]; args: [ { name: 'input'; type: { defined: 'RemoveRecipeIngredients'; }; } ]; }, { name: 'removeRecipeIngredient'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'authority'; isMut: false; isSigner: true; docs: ['The [`CraftingProcess`] authority']; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: false; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: false; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'tokenFrom'; isMut: true; isSigner: false; docs: [ 'The token account owned by the `crafting_process` which holds the ingredient in escrow' ]; }, { name: 'tokenTo'; isMut: true; isSigner: false; docs: ['The token account that receives the recipe ingredient.']; }, { name: 'mint'; isMut: true; isSigner: false; docs: ['The mint of the recipe ingredient']; }, { name: 'tokenProgram'; isMut: false; isSigner: false; docs: ['The [`Token`] program']; } ]; args: [ { name: 'input'; type: { defined: 'RemoveRecipeIngredientInput'; }; } ]; }, { name: 'startCraftingProcess'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: false; isSigner: false; docs: ['The [`CraftingFacility`] account']; } ]; args: [ { name: 'input'; type: { defined: 'StartCraftingProcessInput'; }; } ]; }, { name: 'stopCraftingProcess'; accounts: [ { name: 'location'; isMut: false; isSigner: true; docs: [ "The entity calling this instruction, this is the Crafting Facility's location", 'Having the location as the signer is an implicit check that this is the correct location' ]; }, { name: 'craftingProcess'; isMut: true; isSigner: false; docs: ['The [`CraftingProcess`] account']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [`Recipe`] account']; }, { name: 'craftingFacility'; isMut: false; isSigner: false; docs: ['The [`CraftingFacility`] account']; } ]; args: [ { name: 'input'; type: { defined: 'StopCraftingProcessInput'; }; } ]; }, { name: 'updateCraftingFacility'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'craftingFacility'; isMut: true; isSigner: false; docs: ['The [`CraftingFacility`] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; } ]; args: [ { name: 'input'; type: { defined: 'UpdateCraftingFacilityInput'; }; } ]; }, { name: 'updateDomain'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'newProfile'; isMut: false; isSigner: false; docs: ['The new crafting permissions profile']; }, { name: 'domain'; isMut: true; isSigner: false; docs: ['the [Domain] account']; } ]; args: [ { name: 'input'; type: { defined: 'KeyIndexInput'; }; } ]; }, { name: 'updateRecipe'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] to update']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; } ]; args: [ { name: 'input'; type: { defined: 'UpdateRecipeInput'; }; } ]; }, { name: 'updateRecipeCategory'; accounts: [ { name: 'key'; isMut: false; isSigner: true; docs: ['The key authorized for this instruction']; }, { name: 'profile'; isMut: false; isSigner: false; docs: ['The crafting permissions [`Profile`]']; }, { name: 'recipe'; isMut: true; isSigner: false; docs: ['The [Recipe] to update']; }, { name: 'recipeCategoryOld'; isMut: true; isSigner: false; docs: ['The old [RecipeCategory] account']; }, { name: 'recipeCategoryNew'; isMut: true; isSigner: false; docs: ['The new [RecipeCategory] account']; }, { name: 'domain'; isMut: false; isSigner: false; docs: ['the [Domain] account']; } ]; args: [ { name: 'input'; type: { defined: 'KeyIndexInput'; }; } ]; } ]; accounts: [ { name: 'craftableItem'; docs: [ 'This PDA represents a token registered as an item that can be crafted' ]; type: { kind: 'struct'; fields: [ { name: 'version'; docs: ['The data version of this account.']; type: 'u8'; }, { name: 'domain'; docs: ['the domain']; type: 'publicKey'; }, { name: 'mint'; docs: ['the mint representing the items crafted']; type: 'publicKey'; }, { name: 'creator'; docs: ['TODO: remove this']; type: 'publicKey'; }, { name: 'namespace'; docs: ['the name of this account']; type: { array: ['u8', 32]; }; }, { name: 'bump'; docs: ['bump for PDA']; type: 'u8'; } ]; }; }, { name: 'craftingFacility'; docs: ['Represents a crafting facility account']; type: { kind: 'struct'; fields: [ { name: 'version'; docs: ['The data version of this account.']; type: 'u8'; }, { name: 'domain'; docs: ['the domain']; type: 'publicKey'; }, { name: 'location'; docs: ["the location's pubkey"]; type: 'publicKey'; }, { name: 'locationType'; docs: ['the location type']; type: 'u8'; }, { name: 'maxConcurrentProcesses'; docs: [ 'the max. number of concurrent crafting processes that can be handled by this facility', 'if 0 then there is no max' ]; type: 'u32'; }, { name: 'numConcurrentProcesses'; docs: ['the current number of concurrent crafting processes']; type: 'u32'; }, { name: 'efficiency'; docs: [ 'the efficiency rate for this crafting_facility (as basis points)' ]; type: 'u32'; }, { name: 'numRecipeCategories'; docs: ['number of recipe categories']; type: 'u32'; } ]; }; }, { name: 'craftingProcess'; docs: ['This account represents crafting in progress']; type: { kind: 'struct'; fields: [ { name: 'version'; docs: ['The data version of this account.']; type: 'u8'; }, { name: 'craftingId'; docs: ['the crafting id']; type: 'u64'; }, { name: 'authority'; docs: ['the owner/authority of this crafting process']; type: 'publicKey'; }, { name: 'recipe'; docs: ['the recipe']; type: 'publicKey'; }, { name: 'craftingFacility'; docs: ['the crafting facility']; type: 'publicKey'; }, { name: 'inputsChecksum'; docs: ['used to check if expected inputs have been supplied']; type: { array: ['u8', 16]; }; }, { name: 'outputsChecksum'; docs: ['used to check if expected outputs have been claimed']; type: { array: ['u8', 16]; }; }, { name: 'quantity'; docs: ['Quantity of outputs to craft']; type: 'u64'; }, { name: 'status'; docs: ['The status of this crafting process']; type: 'u8'; }, { name: 'startTime'; docs: ['the start timestamp']; type: 'i64'; }, { name: 'endTime'; docs: ['the end timestamp']; type: 'i64'; }, { name: 'denyPermissionlessClaiming'; docs: [ 'Whether or not to deny permission-less claiming. True when > 0' ]; type: 'u8'; }, { name: 'useLocalTime'; docs: [ 'Whether or not to local time supplied by the location. True when > 0' ]; type: 'u8'; }, { name: 'bump'; docs: ['bump for PDA']; type: 'u8'; } ]; }; }, { name: 'domain'; docs: [ 'This account allows for a crafting "domain" which allows an admin to set up', 'craftable items, recipes and crafting facilities tied to a domain that the control' ]; type: { kind: 'struct'; fields: [ { name: 'version'; docs: ['The data version of this account.']; type: 'u8'; }, { name: 'profile'; docs: [ 'The [`Profile`] that handles the crafting program permissions' ]; type: 'publicKey'; }, { name: 'namespace'; docs: ['the namespace']; type: { array: ['u8', 32]; }; } ]; }; }, { name: 'recipe'; docs: ['The definition of a recipe.']; type: { kind: 'struct'; fields: [ { name: 'version'; docs: ['The data version of this account.']; type: 'u8'; }, { name: 'domain'; docs: ['the domain']; type: 'publicKey'; }, { name: 'category'; docs: ['The Recipe Category']; type: 'publicKey'; }, { name: 'creator'; docs: ['TODO: remove this']; type: 'publicKey'; }, { name: 'duration'; docs: ['The time required to craft this Recipe.']; type: 'i64'; }, { name: 'minDuration'; docs: ['The minimum time required to craft this Recipe.']; type: 'i64'; }, { name: 'namespace'; docs: ['The name of this recipe.']; type: { array: ['u8', 32]; }; }, { name: 'status'; docs: ['The status of the recipe']; type: 'u8'; }, { name: 'feeAmount'; docs: ['The amount to charge when this recipe is used']; type: 'u64'; }, { name: 'feeRecipient'; docs: [ 'The token account that receives the `fee_amount`. If [`None`] the recipe requires no fees when used.' ]; type: { defined: 'OptionalNonSystemPubkey'; }; }, { name: 'usageCount'; docs: ['The number of times that this recipe has been used']; type: 'u64'; }, { name: 'usageLimit'; docs: ['The maximum number of times that this recipe can be used']; type: 'u64'; }, { name: 'value'; docs: [ 'The value of this recipe e.g. might be "economic value"', 'The precise meaning of "value" is left to the person creating recipes to determine' ]; type: 'u64'; }, { name: 'consumablesCount'; docs: ['The number of consumable inputs in this recipe.']; type: 'u8'; }, { name: 'nonConsumablesCount'; docs: ['The number of non-consumable inputs in this recipe.']; type: 'u8'; }, { name: 'outputsCount'; docs: ['The number of outputs from this recipe.']; type: 'u8'; }, { name: 'totalCount'; docs: ['The number of all inputs and outputs in this recipe.']; type: 'u16'; } ]; }; }, { name: 'recipeCategory'; docs: ['A Crafting Recipe Category account']; type: { kind: 'struct'; fields: [ { name: 'version'; docs: ['The data version of this account.']; type: 'u8'; }, { name: 'domain'; docs: ['the domain']; type: 'publicKey'; }, { name: 'creator'; docs: ['TODO: remove this']; type: 'publicKey'; }, { name: 'recipeCount'; docs: ['The number of recipes in this category.']; type: 'u32'; }, { name: 'namespace'; docs: ['the name of this account']; type: { array: ['u8', 32]; }; } ]; }; } ]; types: [ { name: 'AddRecipeIngredientInput'; docs: ['Struct for data input to add an ingredient']; type: { kind: 'struct'; fields: [ { name: 'amount'; docs: ['the amount of ingredient to deposit']; type: 'u64'; }, { name: 'ingredientIndex'; docs: ['the index of the recipe ingredient']; type: 'u16'; } ]; }; }, { name: 'BurnConsumableIngredientInput'; docs: ['Struct for data input to burn a consumable ingredient']; type: { kind: 'struct'; fields: [ { name: 'ingredientIndex'; docs: ['the index of the consumable recipe ingredient']; type: 'u16'; }, { name: 'localTime'; docs: [ 'the current time as supplied by the location; required if `use_local_time` is set on the `CraftingProcess`' ]; type: { option: 'i64'; }; } ]; }; }, { name: 'ClaimNonConsumableIngredientInput'; docs: ['Struct for data input to claim a non-consumable ingredient']; type: { kind: 'struct'; fields: [ { name: 'ingredientIndex'; docs: ['the index of the recipe ingredient']; type: 'u16'; }, { name: 'localTime'; docs: [ 'the current time as supplied by the location; required if `use_local_time` is set on the `CraftingProcess`' ]; type: { option: 'i64'; }; } ]; }; }, { name: 'ClaimRecipeOutputInput'; docs: ['Struct for data input to claim an output']; type: { kind: 'struct'; fields: [ { name: 'ingredientIndex'; docs: ['the index of the recipe output']; type: 'u16'; }, { name: 'localTime'; docs: [ 'the current time as supplied by the location; required if `use_local_time` is set on the `CraftingProcess`' ]; type: { option: 'i64'; }; } ]; }; }, { name: 'CreateCraftingProcessInput'; docs: ['Struct for data input to create a `CraftingProcess`']; type: { kind: 'struct'; fields: [ { name: 'craftingId'; docs: ['crafting id']; type: 'u64'; }, { name: 'recipeCategoryIndex'; docs: ["the index of the recipe's category"]; type: 'u16'; }, { name: 'quantity'; docs: ['quantity of outputs to craft']; type: 'u64'; }, { name: 'denyPermissionlessClaiming'; docs: [ 'Whether or not to deny permission-less claiming. True when > 0' ]; type: 'bool'; }, { name: 'useLocalTime'; docs: [ 'Whether or not to local time supplied by the location. True when > 0' ]; type: 'bool'; } ]; }; }, { name: 'KeyIndexInput'; docs: ['Struct for data input for that has `key_index`']; type: { kind: 'struct'; fields: [ { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'LegitimizeRecipeIngredientInput'; docs: ['Struct for data input to legitimize an ingredient']; type: { kind: 'struct'; fields: [ { name: 'amount'; docs: ['the amount of ingredient to deposit']; type: 'u64'; }, { name: 'ingredientIndex'; docs: ['the index of the recipe ingredient']; type: 'u16'; } ]; }; }, { name: 'LocationType'; docs: [ 'Represents different types of locations that a `CraftingFacility` might be found' ]; type: { kind: 'enum'; variants: [ { name: 'Starbase'; } ]; }; }, { name: 'OptionalNonSystemPubkey'; docs: [ 'A pubkey sized option that is none if set to the system program.' ]; type: { kind: 'struct'; fields: [ { name: 'key'; type: 'publicKey'; } ]; }; }, { name: 'ProcessStatus'; docs: ['The `CraftingProcess` `status`']; type: { kind: 'enum'; variants: [ { name: 'Initialized'; }, { name: 'Started'; }, { name: 'Completed'; } ]; }; }, { name: 'RecipeIngredients'; docs: [ 'A copy of the [`RecipeInputsOutputs`] struct --> to be used as inputs into the program, avoiding using Borsch Serialization with Zero Copy serialization' ]; type: { kind: 'struct'; fields: [ { name: 'amount'; docs: ['Amount of Input/Output required/produced.']; type: 'u64'; }, { name: 'mint'; docs: ['Mint pubkey of the Input/Output.']; type: 'publicKey'; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'RecipeInputsOutputs'; docs: ['The [`RecipeInputsOutputs`] struct.']; type: { kind: 'struct'; fields: [ { name: 'amount'; docs: ['Amount of Input/Output required/produced.']; type: 'u64'; }, { name: 'mint'; docs: ['Mint pubkey of the Input/Output.']; type: 'publicKey'; } ]; }; }, { name: 'RecipeStatus'; docs: ['Represents the `Recipe` status']; type: { kind: 'enum'; variants: [ { name: 'Initializing'; }, { name: 'Active'; }, { name: 'Deactivated'; } ]; }; }, { name: 'RegisterCraftableItemInput'; docs: ['used as input struct when registering a `CraftableItem`']; type: { kind: 'struct'; fields: [ { name: 'namespace'; docs: ['the `CraftableItem` namespace']; type: { array: ['u8', 32]; }; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'RegisterCraftingFacilityInput'; docs: ['Struct for data input to Register a `CraftingFacility`']; type: { kind: 'struct'; fields: [ { name: 'locationType'; docs: ['`CraftingFacility` location type']; type: { defined: 'LocationType'; }; }, { name: 'efficiency'; docs: ['`CraftingFacility` efficiency']; type: 'u32'; }, { name: 'maxConcurrentProcesses'; docs: [ 'the max. number of concurrent crafting processes that can be handled by this facility', 'if 0 then there is no max' ]; type: 'u32'; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'RegisterRecipeCategoryInput'; docs: ['Struct for data input for `RegisterRecipeCategory`']; type: { kind: 'struct'; fields: [ { name: 'namespace'; docs: ['the `RecipeCategory` namespace']; type: { array: ['u8', 32]; }; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'RegisterRecipeInput'; docs: ['used as input struct when registering a Recipe']; type: { kind: 'struct'; fields: [ { name: 'duration'; docs: ['the recipe duration (seconds)']; type: 'i64'; }, { name: 'minDuration'; docs: ['the recipe minimum duration (seconds)']; type: 'i64'; }, { name: 'namespace'; docs: ['the recipe namespace']; type: { array: ['u8', 32]; }; }, { name: 'feeAmount'; docs: ['the recipe fee amount']; type: { option: 'u64'; }; }, { name: 'usageLimit'; docs: [ 'the maximum number of times that this recipe can be used; if not provided a limit will not be set' ]; type: { option: 'u64'; }; }, { name: 'value'; docs: ["the recipe's value"]; type: { option: 'u64'; }; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'RemoveCraftingFacilityRecipeCategoryInput'; docs: [ 'Struct for data input for removing a [`CraftingFacility`] `RecipeCategory`' ]; type: { kind: 'struct'; fields: [ { name: 'recipeCategoryIndex'; docs: [ 'the index of the `RecipeCategory` in the [`CraftingFacility`]' ]; type: 'u16'; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'RemoveRecipeIngredientInput'; docs: ['Struct for data input to remove an ingredient']; type: { kind: 'struct'; fields: [ { name: 'amount'; docs: ['the amount of ingredient to withdraw/remove']; type: 'u64'; }, { name: 'ingredientIndex'; docs: ['the index of the recipe ingredient']; type: 'u16'; } ]; }; }, { name: 'RemoveRecipeIngredients'; docs: ['used as input struct when removing recipe ingredients']; type: { kind: 'struct'; fields: [ { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; }, { name: 'ingredientIndex'; docs: ['the index of the recipe ingredient']; type: 'u16'; } ]; }; }, { name: 'StartCraftingProcessInput'; docs: ['Inputs for `StartCraftingProcess`']; type: { kind: 'struct'; fields: [ { name: 'recipeDurationOverride'; docs: ['recipe duration override']; type: { option: 'u64'; }; }, { name: 'localTime'; docs: [ 'the current time as supplied by the location; required if `use_local_time` is set on the `CraftingProcess`' ]; type: { option: 'i64'; }; } ]; }; }, { name: 'StopCraftingProcessInput'; docs: ['Inputs for `StopCraftingProcess`']; type: { kind: 'struct'; fields: [ { name: 'localTime'; docs: [ 'the current time as supplied by the location; required if `use_local_time` is set on the `CraftingProcess`' ]; type: { option: 'i64'; }; } ]; }; }, { name: 'UpdateCraftingFacilityInput'; docs: ['Struct for data input to Update `CraftingFacility`']; type: { kind: 'struct'; fields: [ { name: 'efficiency'; docs: ['`CraftingFacility` efficiency']; type: { option: 'u32'; }; }, { name: 'maxConcurrentProcesses'; docs: [ 'the max. number of concurrent crafting processes that can be handled by this facility', 'if 0 then there is no max' ]; type: { option: 'u32'; }; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'UpdateRecipeInput'; docs: ['Struct for data input to Update `Recipe`']; type: { kind: 'struct'; fields: [ { name: 'duration'; docs: ['`Recipe` duration']; type: { option: 'i64'; }; }, { name: 'minDuration'; docs: ['`Recipe` minimum duration']; type: { option: 'i64'; }; }, { name: 'feeAmount'; docs: ['`Recipe` fee amount']; type: { option: 'u64'; }; }, { name: 'status'; docs: ['`Recipe` status']; type: { option: 'u8'; }; }, { name: 'usageLimit'; docs: ['the maximum number of times that this recipe can be used']; type: { option: 'u64'; }; }, { name: 'value'; docs: ["the recipe's value"]; type: { option: 'u64'; }; }, { name: 'keyIndex'; docs: ['the index of the key in the crafting permissions profile']; type: 'u16'; } ]; }; }, { name: 'WrappedRecipeCategory'; docs: [ 'Wrapped recipe category', "We are wrapping this around Pubkey so that we can use Anchor's coder to decode it" ]; type: { kind: 'struct'; fields: [ { name: 'id'; docs: ['The recipe category public key']; type: 'publicKey'; } ]; }; } ]; errors: [ { code: 6000; name: 'IncorrectProfileAddress'; msg: 'Incorrect profile address.'; }, { code: 6001; name: 'IncorrectAuthority'; msg: 'The authority is incorrect.'; }, { code: 6002; name: 'NumericOverflow'; msg: 'Numeric overflow'; }, { code: 6003; name: 'MintAuthorityIsNone'; msg: 'The mint authority should exist.'; }, { code: 6004; name: 'AdminNotMintAuthority'; msg: 'Admin wallet is not the mint authority of the entered token.'; }, { code: 6005; name: 'IncorrectMintAddress'; msg: 'Incorrect mint address entered.'; }, { code: 6006; name: 'LocationTypeNotSupported'; msg: 'The provided location type is not supported.'; }, { code: 6007; name: 'IncorrectLocation'; msg: 'The location is incorrect.'; }, { code: 6008; name: 'IncorrectDomain'; msg: 'The domain is incorrect.'; }, { code: 6009; name: 'IncorrectRecipe'; msg: 'The recipe is incorrect.'; }, { code: 6010; name: 'IncorrectRecipeCategory'; msg: 'The recipe category is incorrect.'; }, { code: 6011; name: 'IncorrectCraftingFacility'; msg: 'The crafting facility is incorrect.'; }, { code: 6012; name: 'OverCraftingFacilityCapacity'; msg: 'The crafting facility capacity has been exceeded.'; }, { code: 6013; name: 'InsufficientAmount'; msg: 'The amount is insufficient.'; }, { code: 6014; name: 'AmountRequired'; msg: 'An amount greater than 0 must be provided.'; }, { code: 6015; name: 'AmountTooMuch'; msg: 'The amount is more than what is required.'; }, { code: 6016; name: 'InputAlreadySupplied'; msg: 'The input has already been supplied.'; }, { code: 6017; name: 'InputNotSupplied'; msg: 'The input has NOT been supplied.'; }, { code: 6018; name: 'OutputAlreadyClaimed'; msg: 'The output has already been claimed.'; }, { code: 6019; name: 'CraftingProcessAlreadyStarted'; msg: 'The crafting process has already started.'; }, { code: 6020; name: 'CraftingProcessNotStarted'; msg: 'The crafting process has not started.'; }, { code: 6021; name: 'CraftingProcessNotCompleted'; msg: 'The crafting process has not completed.'; }, { code: 6022; name: 'CraftingProcessAlreadyCompleted'; msg: 'The crafting process has already completed.'; }, { code: 6023; name: 'IngredientNotAnInput'; msg: 'The ingredient is not an input.'; }, { code: 6024; name: 'IngredientNotAConsumableInput'; msg: 'The ingredient is not a consumable input.'; }, { code: 6025; name: 'IngredientNotANonConsumableInput'; msg: 'The ingredient is not a non-consumable input.'; }, { code: 6026; name: 'IngredientNotAnOutput'; msg: 'The ingredient is not an output.'; }, { code: 6027; name: 'IncorrectInputsChecksum'; msg: 'The inputs checksum is incorrect.'; }, { code: 6028; name: 'IncorrectOutputsChecksum'; msg: 'The outputs checksum is incorrect.'; }, { code: 6029; name: 'RecipeCountNotZero'; msg: 'The recipe count is not zero.'; }, { code: 6030; name: 'RecipeCategoryCountNotZero'; msg: 'The recipe category count is not zero.'; }, { code: 6031; name: 'ConcurrentProcessCountNotZero'; msg: 'The concurrent process count is not zero.'; }, { code: 6032; name: 'KeyIndexOutOfBounds'; msg: 'Key index out of bounds.'; }, { code: 6033; name: 'InvalidDuration'; msg: 'Duration is invalid.'; }, { code: 6034; name: 'MissingRequiredSignature'; msg: 'Missing required signature.'; }, { code: 6035; name: 'AddressMismatchATA'; msg: 'ATA address does not match'; }, { code: 6036; name: 'CannotUpdateDeactivatedRecipe'; msg: 'Cannot Update Deactivated Recipe'; }, { code: 6037; name: 'InvalidRecipeStatus'; msg: 'Invalid Recipe Status'; }, { code: 6038; name: 'EfficiencyIsZero'; msg: 'Crafting Facility Efficiency Is Zero'; }, { code: 6039; name: 'AddressMismatch'; msg: 'Address Mismatch'; }, { code: 6040; name: 'RecipeLimitExceeded'; msg: 'Recipe Limit Exceeded'; } ]; }; export declare const IDL: Crafting; //# sourceMappingURL=crafting.d.ts.map