Class Starbase

Hierarchy

  • Starbase

Implements

  • Account

Constructors

  • Parameters

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

    Returns Starbase

Properties

ACCOUNT_NAME: "craftingInstance" | "disbandedFleet" | "fleet" | "fleetShips" | "game" | "gameState" | "mineItem" | "planet" | "resource" | "sagePlayerProfile" | "sector" | "ship" | "star" | "starbase" | "starbasePlayer" | "surveyDataUnitTracker" = 'starbase'
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(): Readonly<PublicKey>
  • Returns Readonly<PublicKey>

Methods

  • Check if a Starbase is a central space station

    Returns

    boolean

    Returns boolean

  • Find the Starbase account address

    Returns

    The PDA and bump respectively

    Parameters

    • program: SageIDLProgram

      SAGE program

    • gameId: PublicKey

      the SAGE game id

    • sectorCoordinates: [BN, BN]

      the sector's coordinates

    Returns [PublicKey, number]

  • Register Starbase

    Returns

    InstructionReturn

    Parameters

    • program: SageIDLProgram

      SAGE program

    • key: AsyncSigner<unknown>

      the key authorized to run this instruction

    • profile: PublicKey

      the profile with the required permissions for the instruction

    • sector: PublicKey

      the sector in which the Starbase exists

    • gameId: PublicKey

      the SAGE game id

    • gameState: PublicKey

      the game state

    • input: ExtendedRegisterStarbaseInput

      the instruction input params

    Returns InstructionReturn

  • Update Starbase

    Returns

    InstructionReturn

    Parameters

    • program: SageIDLProgram

      SAGE program

    • starbase: PublicKey

      the Starbase

    • key: AsyncSigner<unknown>

      the key authorized to run this instruction

    • profile: PublicKey

      the profile with the required permissions for the instruction

    • gameId: PublicKey

      the SAGE game id

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

      the instruction input params

    • Optional craftingDomain: PublicKey

      the crafting domain

    • Optional craftingFacility: PublicKey

      the crafting facility tied to the Starbase

    Returns InstructionReturn

Generated using TypeDoc