import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; import { BN } from '@staratlas/anchor'; import { Account, AsyncSigner, DecodedAccountData, InstructionReturn } from '@staratlas/data-source'; import { ProgressionConfigAccount, ProgressionItem, SageIDL, SageIDLProgram } from './constants'; export declare enum ProgressionItemType { Subwarp = 0, Warp = 1, WarpLane = 2, AsteroidExit = 3, ScanUnsuccessful = 4, ScanSuccessful = 5, Mining = 6, Crafting = 7, Upkeep = 8, Upgrade = 9 } export interface ProgressionItemInput { itemType: ProgressionItemType; item: ProgressionItem; } export interface PointsLimitInput { dailyLpLimit?: BN; dailyCouncilRankXpLimit?: BN; dailyPilotXpLimit?: BN; dailyDataRunningXpLimit?: BN; dailyMiningXpLimit?: BN; dailyCraftingXpLimit?: BN; } export interface UpdateProgressionConfigInput extends PointsLimitInput { keyIndex: number; items?: ProgressionItemInput[]; } export interface SetProgressionItemsInput { keyIndex: number; items: ProgressionItemInput[]; } export interface RegisterProgressionConfigInput extends PointsLimitInput { keyIndex: number; } /** * Check if two `ProgressionConfigAccount` instances are equal * @param data1 - first ProgressionConfigAccount * @param data2 - second ProgressionConfigAccount * @returns a boolean */ export declare function progressionConfigDataEquals(data1: ProgressionConfigAccount, data2: ProgressionConfigAccount): boolean; export declare class ProgressionConfig implements Account { private _data; private _key; private _items; static readonly ACCOUNT_NAME: NonNullable[number]['name']; static readonly MIN_DATA_SIZE: number; static readonly PROGRESSION_ITEM_DATA_SIZE = 4; constructor(_data: ProgressionConfigAccount, _key: PublicKey, _items: ProgressionItem[]); get data(): Readonly; get key(): PublicKey; get items(): Readonly; /** * Finds the address of a `ProgressionConfig` account * @param program - the SAGE program * @param game - the game id * @returns - The PDA and bump respectively */ static findAddress(program: SageIDLProgram, game: PublicKey): [PublicKey, number]; /** * Register a Progression Config * @param program - SAGE program * @param key - the key authorized to run this instruction * @param profile - the profile with the required permissions for the instruction * @param gameId - the SAGE game id * @param input - instruction input params * @returns InstructionReturn */ static registerProgressionConfig(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, gameId: PublicKey, input: RegisterProgressionConfigInput): { configKey: [PublicKey, number]; instructions: InstructionReturn; }; /** * Update a Progression Config * @param program - SAGE program * @param key - the key authorized to run this instruction * @param profile - the profile with the required permissions for the instruction * @param gameId - the SAGE game id * @param input - instruction input params * @returns InstructionReturn */ static updateProgressionConfig(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, gameId: PublicKey, input: UpdateProgressionConfigInput): InstructionReturn; /** * Deregister a Progression Config * @param program - SAGE program * @param key - the key authorized to run this instruction * @param profile - the profile with the required permissions for the instruction * @param fundsTo - the entity that should receive rent refunds * @param gameId - the SAGE game id * @param input - instruction input params * @returns InstructionReturn */ static deregisterProgressionConfig(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, fundsTo: PublicKey | 'funder', gameId: PublicKey, input: RegisterProgressionConfigInput): InstructionReturn; static decodeData(account: KeyedAccountInfo, program: SageIDLProgram): DecodedAccountData; } //# sourceMappingURL=progressionConfig.d.ts.map