import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; import { Account, AsyncSigner, DecodedAccountData, InstructionReturn } from '@staratlas/data-source'; import { CraftableItemAccount, CraftingIDL, CraftingIDLProgram, DrainCraftableItemBankIxInput, RegisterCraftableItemIxInput } from './constants'; /** * Checks equality between two Craftable Item Accounts * @param data1 - First Craftable Item Account * @param data2 - Second Craftable Item Account * @returns boolean */ export declare function craftableItemDataEquals(data1: CraftableItemAccount, data2: CraftableItemAccount): boolean; export declare class CraftableItem implements Account { private _data; private _key; static readonly ACCOUNT_NAME: NonNullable[number]['name']; static readonly MIN_DATA_SIZE: number; constructor(_data: CraftableItemAccount, _key: PublicKey); get data(): Readonly; get key(): PublicKey; /** * Finds PDA for Craftable Item Account * @param program - Crafting IDL program * @param domain - Domain Account key * @param mint - Mint key * @returns PDA key & bump */ static findAddress(program: CraftingIDLProgram, domain: PublicKey, mint: PublicKey): [PublicKey, number]; /** * Register a new Craftable Item Account * @param program - Crafting IDL program * @param key - Key authorized for this instruction * @param profile - Profile Account key with the required Crafting Permissions * @param domain - Domain Account key * @param mint - Mint key * @param input - Input struct for registerCraftableItem instruction * @returns InstructionReturn */ static registerCraftableItem(program: CraftingIDLProgram, key: AsyncSigner, profile: PublicKey, domain: PublicKey, mint: PublicKey, input: RegisterCraftableItemIxInput): InstructionReturn; /** * Funds Token Account owned by Craftable Item Account * @param craftableItem - Craftable Item Account key * @param mint - Mint key, * @param tokenFromOwner - Owner of Token Account being credited * @param tokenFrom - Token Account being credited * @param amount - Amount of token being debited to Craftable Item Token Account * @returns InstructionReturn */ static fundCraftableItemBank(craftableItem: PublicKey, mint: PublicKey, tokenFromOwner: AsyncSigner, tokenFrom: PublicKey, amount: number): InstructionReturn; /** * Drains the CraftableItem token bank and closes it * @param program - Crafting IDL program * @param craftableItem - Craftable Item Account key * @param key - Key authorized to use this instruction * @param profile - Profile Account with required Crafting Permissions * @param fundsTo - Account to which the rent fees are debited * @param domain - Domain Account key * @param tokenFrom - The craftable item token bank to drain * @param tokenTo - Where to send tokens from the bank * @param input - Input struct for deregisterCraftableItem instruction * @returns InstructionReturn */ static drainCraftableItemBank(program: CraftingIDLProgram, craftableItem: PublicKey, key: AsyncSigner, profile: PublicKey, fundsTo: PublicKey | 'funder', domain: PublicKey, tokenFrom: PublicKey, tokenTo: PublicKey, input: DrainCraftableItemBankIxInput): InstructionReturn; static decodeData(account: KeyedAccountInfo, program: CraftingIDLProgram): DecodedAccountData; } //# sourceMappingURL=craftableItem.d.ts.map