import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; import { Account, AsyncSigner, DecodedAccountData, InstructionReturn } from '@staratlas/data-source'; import { CombatConfigAccount, SageIDL, SageIDLProgram, RegisterCombatConfigInput, BaseUpdateCombatConfigInput } from './constants'; export interface UpdateCombatConfigInput extends Omit { globalCeasefire: boolean; lootExclusivityTime?: number; starbaseUpgradeProgressContinuation?: number; crewRespawnTime?: number; rawShipsRespawnTime?: number; } /** * Check if two `CombatConfigAccount` instances are equal * @param data1 - first CombatConfigAccount * @param data2 - second CombatConfigAccount * @returns a boolean */ export declare function combatConfigDataEquals(data1: CombatConfigAccount, data2: CombatConfigAccount): boolean; export declare class CombatConfig implements Account { private _data; private _key; static readonly ACCOUNT_NAME: NonNullable[number]['name']; static readonly MIN_DATA_SIZE: number; constructor(_data: CombatConfigAccount, _key: PublicKey); get data(): Readonly; get key(): PublicKey; /** * Finds the address of a `CombatConfig` 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 Combat 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 registerCombatConfig(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, gameId: PublicKey, input: RegisterCombatConfigInput): { configKey: [PublicKey, number]; instructions: InstructionReturn; }; /** * Update a Combat 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 updateCombatConfig(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, gameId: PublicKey, input: UpdateCombatConfigInput): InstructionReturn; /** * Deregister a Combat 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 deregisterCombatConfig(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, fundsTo: PublicKey | 'funder', gameId: PublicKey, input: RegisterCombatConfigInput): InstructionReturn; static decodeData(account: KeyedAccountInfo, program: SageIDLProgram): DecodedAccountData; } //# sourceMappingURL=combatConfig.d.ts.map