Class Game

Hierarchy

  • Game

Implements

  • Account

Constructors

  • Parameters

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

    Returns Game

Properties

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

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

  • Parameters

    Returns DecodedAccountData<Game>

  • Create a new Game account

    Returns

    InstructionReturn

    Parameters

    • program: SageIDLProgram

      SAGE program

    • signer: AsyncSigner<unknown>

      the authority for the new game

    • profile: PublicKey

      the profile with the required permissions for the instruction

    • gameId: AsyncSigner<unknown>

      the SAGE game id

    Returns InstructionReturn

  • Update a Game account

    Returns

    InstructionReturn

    Parameters

    • gameId: PublicKey

      the SAGE game id

    • 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

    • keyIndex: number

      the index of the key in the profile permissions

    • Optional pointCategories: {
          lpPointsCategory?: PublicKey;
          xpPointsCategory?: PublicKey;
      }

      point category settings

      • Optional lpPointsCategory?: PublicKey

        LP points category

      • Optional xpPointsCategory?: PublicKey

        XP points category

    • Optional mints: {
          ammo?: PublicKey;
          atlas?: PublicKey;
          food?: PublicKey;
          fuel?: PublicKey;
          polis?: PublicKey;
          repairKit?: PublicKey;
      }

      mint settings

      • Optional ammo?: PublicKey

        ammo token mint

      • Optional atlas?: PublicKey

        atlas token mint

      • Optional food?: PublicKey

        food token mint

      • Optional fuel?: PublicKey

        fuel token mint

      • Optional polis?: PublicKey

        polis token mint

      • Optional repairKit?: PublicKey

        repair kit token mint

    • Optional vaults: {
          atlas?: PublicKey;
          polis?: PublicKey;
      }

      vault settings

      • Optional atlas?: PublicKey

        atlas vault (token account)

      • Optional polis?: PublicKey

        polis vault (token account)

    • Optional crafting: {
          domain?: PublicKey;
      }

      crafting settings

      • Optional domain?: PublicKey

        crafting domain

    • Optional cargo: {
          statsDefinition?: PublicKey;
      }

      cargo settings

      • Optional statsDefinition?: PublicKey

        cargo stats definition

    • Optional riskZones: AnchorTypeDef<Object, Record<string, never>>

      risk zone definitions

    Returns InstructionReturn

Generated using TypeDoc