import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; import { BN } from '@staratlas/anchor'; import { Account, AsyncSigner, DecodedAccountData, FixedSizeArray, InstructionReturn } from '@staratlas/data-source'; import { PlanetAccount, SageIDL, SageIDLProgram } from './constants'; export declare enum SectorRing { Inner = 1, Mid = 2, Outer = 3 } export declare enum PlanetType { Terrestrial = 0, Volcanic = 1, Barren = 2, AsteroidBelt = 3, GasGiant = 4, IceGiant = 5, Dark = 6 } export interface RegisterPlanetInput { name: string; keyIndex: number; size: BN; subCoordinates: FixedSizeArray; planetType: PlanetType; position: SectorRing; maxHp: BN; } export interface UpdatePlanetInput { name?: string; size?: BN; maxHp?: BN; subCoordinates?: FixedSizeArray; keyIndex: number; } /** * Check if two `PlanetAccount` instances are equal * @param data1 - first PlanetAccount * @param data2 - second PlanetAccount * @returns boolean */ export declare function planetDataEquals(data1: PlanetAccount, data2: PlanetAccount): boolean; export declare class Planet implements Account { private _data; private _key; static readonly ACCOUNT_NAME: NonNullable[number]['name']; static readonly MIN_DATA_SIZE: number; constructor(_data: PlanetAccount, _key: PublicKey); get data(): Readonly; get key(): PublicKey; get prettyName(): string; /** * Register a planet * @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 planet - the planet being registered * @param sector - the sector in which the planet is located * @param gameId - the SAGE game id * @param input - input params * @returns InstructionReturn */ static registerPlanet(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, planet: AsyncSigner, sector: PublicKey, gameId: PublicKey, input: RegisterPlanetInput): InstructionReturn; /** * Update a planet * @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 planet - the planet being updated * @param gameId - the SAGE game id * @param input - input params * @returns InstructionReturn */ static updatePlanet(program: SageIDLProgram, key: AsyncSigner, profile: PublicKey, planet: PublicKey, gameId: PublicKey, input: UpdatePlanetInput): InstructionReturn; static decodeData(account: KeyedAccountInfo, program: SageIDLProgram): DecodedAccountData; } //# sourceMappingURL=planet.d.ts.map