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