Class DisbandedFleet

Hierarchy

  • DisbandedFleet

Implements

  • Account

Constructors

  • Parameters

    • _data: AnchorTypeDef<Object, AnchorDefined<SageIDL, Record<string, never>>>
    • _key: PublicKey

    Returns DisbandedFleet

Properties

ACCOUNT_NAME: "craftingInstance" | "disbandedFleet" | "fleet" | "fleetShips" | "game" | "gameState" | "mineItem" | "planet" | "resource" | "sagePlayerProfile" | "sector" | "ship" | "star" | "starbase" | "starbasePlayer" | "surveyDataUnitTracker" = 'disbandedFleet'
MIN_DATA_SIZE: number = ...

Accessors

  • get data(): Readonly<AnchorTypeDef<Object, AnchorDefined<SageIDL, Record<string, never>>>>
  • Returns Readonly<AnchorTypeDef<Object, AnchorDefined<SageIDL, Record<string, never>>>>

  • get key(): PublicKey
  • Returns PublicKey

Methods

  • Closes am empty DisbandedFleet account

    Returns

    InstructionReturn

    Parameters

    • program: SageIDLProgram

      SAGE program

    • key: AsyncSigner<unknown>

      the key authorized to run this instruction

    • playerProfile: PublicKey

      the profile with the required permissions for the instruction

    • fundsTo: PublicKey | "funder"

      the entity that should receive rent refunds

    • disbandedFleet: PublicKey

      the disbanded fleet

    • fleetShips: PublicKey

      the fleet's ships account public key

    • input: AnchorTypeDef<Object, Record<string, never>>

      input params

    Returns InstructionReturn

  • Moves ships from a DisbandedFleet to StarbasePlayer ship escrow

    Returns

    InstructionReturn

    Parameters

    • program: SageIDLProgram

      SAGE program

    • key: AsyncSigner<unknown>

      the key authorized to run this instruction

    • playerProfile: PublicKey

      the profile with the required permissions for the instruction

    • profileFaction: PublicKey

      the profile's faction

    • disbandedFleet: PublicKey

      the disbanded fleet

    • fleetShips: PublicKey

      the fleet's ships account public key

    • ship: PublicKey

      the ship account

    • starbasePlayer: PublicKey

      the Starbase player account tied to the Starbase

    • starbase: PublicKey

      the Starbase in which the ship is currently in

    • gameId: PublicKey

      the SAGE game id

    • gameState: PublicKey

      the game state account

    • input: AnchorTypeDef<Object, Record<string, never>>

      input params

    Returns InstructionReturn

  • Find the DisbandedFleet account address

    Returns

    • The PDA and bump respectively

    Parameters

    • program: SageIDLProgram

      SAGE program

    • game: PublicKey

      the SAGE game id

    • playerProfile: PublicKey

      the profile that owns the fleet

    • fleetLabel: number[]

      the label/name of the fleet

    Returns [PublicKey, number]

Generated using TypeDoc