import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; import { Account, AsyncSigner, DecodedAccountData, InstructionReturn } from '@staratlas/data-source'; import { ClosePlayerCrewRecordInput, PlayerCrewRecordAccount, SageIDL, SageIDLProgram } from './constants'; /** * Check if two `PlayerCrewRecordAccount` instances are equal * @param data1 - first PlayerCrewRecordAccount * @param data2 - second PlayerCrewRecordAccount * @returns a boolean */ export declare function playerCrewRecordDataEquals(data1: PlayerCrewRecordAccount, data2: PlayerCrewRecordAccount): boolean; export declare class PlayerCrewRecord implements Account { private _data; private _key; static readonly ACCOUNT_NAME: NonNullable[number]['name']; static readonly MIN_DATA_SIZE: number; constructor(_data: PlayerCrewRecordAccount, _key: PublicKey); get data(): Readonly; get key(): PublicKey; /** * Find the PlayerCrewRecord account address * @param program - SAGE program * @param playerProfile - the player's profile * @param gameId - the SAGE game id * @returns The PDA and bump respectively */ static findAddress(program: SageIDLProgram, playerProfile: PublicKey, gameId: PublicKey): [PublicKey, number]; /** * Closes a PlayerCrewRecord and transfers crew to the Starbase * @param params - the params to this functions * @param params.program - SAGE program * @param params.key - the key authorized to run this instruction * @param params.fundsTo - recipient of the rent refund * @param params.profile - the profile with the required permissions for the instruction * @param params.profileFaction - the profile's faction * @param params.starbasePlayer - the Starbase player account for the profile at the Starbase * @param params.starbase - the Starbase (must be a central space station) * @param params.gameId - the SAGE game id * @param params.input - instruction input params * @returns InstructionReturn */ static closePlayerCrewRecord(params: { program: SageIDLProgram; key: AsyncSigner; fundsTo: PublicKey | 'funder'; profile: PublicKey; profileFaction: PublicKey; starbase: PublicKey; starbasePlayer: PublicKey; gameId: PublicKey; input: ClosePlayerCrewRecordInput; }): InstructionReturn; static decodeData(account: KeyedAccountInfo, program: SageIDLProgram): DecodedAccountData; } //# sourceMappingURL=playerCrewRecord.d.ts.map