import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; import { Account, AsyncSigner, DecodedAccountData, InstructionReturn } from '@staratlas/data-source'; import { KeyIndexInput } from './common'; import { CraftingFacilityAccount, CraftingIDL, CraftingIDLProgram } from './constants'; export declare enum CraftingFacilityLocationType { Starbase = 0 } export interface RegisterCraftingFacilityInput extends KeyIndexInput { locationType: CraftingFacilityLocationType; efficiency: number; maxConcurrentProcesses: number; } export interface UpdateCraftingFacilityInput extends KeyIndexInput { efficiency?: number; maxConcurrentProcesses?: number; } export interface RemoveCraftingFacilityRecipeCategoryInput extends KeyIndexInput { recipeCategoryIndex: number; } export interface WrappedRecipeCategory { id: PublicKey; } export declare const CRAFTING_FACILITY_MIN_DATA_SIZE: number; /** * Checks equality between 2 Crafting Facility Accounts * @param data1 - First Crafting Facility Account * @param data2 - Second Crafting Facility Account * @returns boolean */ export declare function craftingFacilityDataEquals(data1: CraftingFacilityAccount, data2: CraftingFacilityAccount): boolean; export declare class CraftingFacility implements Account { private _data; private _key; private _recipeCategories; static readonly ACCOUNT_NAME: NonNullable[number]['name']; static readonly MIN_DATA_SIZE: number; constructor(_data: CraftingFacilityAccount, _key: PublicKey, _recipeCategories: PublicKey[]); get data(): Readonly; get key(): PublicKey; get recipeCategories(): Readonly; /** * Registers new Crafting Facility * @param program - Crafting IDL program * @param craftingFacility - The new Crafting Facility Account * @param key - Key authorized to use this instruction * @param profile - Profile Account with required Crafting Permissions * @param domain - Domain Account key * @param location - Location Address key * @param input - input params * @returns InstructionReturn */ static registerCraftingFacility(program: CraftingIDLProgram, craftingFacility: AsyncSigner, key: AsyncSigner, profile: PublicKey, domain: PublicKey, location: PublicKey, input: RegisterCraftingFacilityInput): InstructionReturn; /** * Updates existing Crafting Facility Account * @param program - Crafting IDL program * @param craftingFacility - Crafting Facility Account key * @param key - Key authorized to use this instruction * @param profile - Profile Account with the required Crafting Permissions * @param domain - Domain Account key * @param input - input params * @returns InstructionReturn */ static updateCraftingFacility(program: CraftingIDLProgram, craftingFacility: PublicKey, key: AsyncSigner, profile: PublicKey, domain: PublicKey, input: UpdateCraftingFacilityInput): InstructionReturn; /** * Updates a Crafting Facility's Recipe Category * @param program - Crafting IDL program * @param craftingFacility - Crafting Facility Account key * @param key - Key authorized to use this instruction * @param profile - Profile with required Crafting Permissions * @param domain - Domain Account key * @param recipeCategory - New Recipe Category Account key * @param input - Key index * @returns InstructionReturn */ static addCraftingFacilityRecipeCategory(program: CraftingIDLProgram, craftingFacility: PublicKey, key: AsyncSigner, profile: PublicKey, domain: PublicKey, recipeCategory: PublicKey, input: KeyIndexInput): InstructionReturn; /** * Removes a Crafting Facility's Recipe Category * @param program - Crafting IDL program * @param craftingFacility - Crafting Facility key * @param key - Key authorized to use this instruction * @param profile - Profile with the required Crafting permissions * @param domain - Domain Account key * @param recipeCategory - Recipe Category to be removed * @param input - Input struct for removeCraftingFacilityRecipeCategory instruction * @returns InstructionReturn */ static removeCraftingFacilityRecipeCategory(program: CraftingIDLProgram, craftingFacility: PublicKey, key: AsyncSigner, profile: PublicKey, domain: PublicKey, recipeCategory: PublicKey, input: RemoveCraftingFacilityRecipeCategoryInput): InstructionReturn; /** * Deregisters and Closes a Crafting Facility * @param program - Crafting IDL program * @param craftingFacility - Crafting Facility to close * @param key - Key authorized to use this instruction * @param profile - Profile with required Crafting Permission * @param fundsTo - Account where rent fees are debited * @param domain - Domain Account * @param input - Key index * @returns InstructionReturn */ static deregisterCraftingFacility(program: CraftingIDLProgram, craftingFacility: PublicKey, key: AsyncSigner, profile: PublicKey, fundsTo: PublicKey | 'funder', domain: PublicKey, input: KeyIndexInput): InstructionReturn; static decodeData(account: KeyedAccountInfo, program: CraftingIDLProgram): DecodedAccountData; } //# sourceMappingURL=craftingFacility.d.ts.map