Class Star

Hierarchy

  • Star

Implements

  • Account

Constructors

  • Parameters

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

    Returns Star

Properties

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

  • get prettyName(): string
  • Returns string

Methods

  • Parameters

    Returns DecodedAccountData<Star>

  • Register a Star

    Returns

    InstructionReturn

    Parameters

    • params: {
          gameId: PublicKey;
          input: RegisterStarInput;
          key: AsyncSigner<unknown>;
          profile: PublicKey;
          program: SageIDLProgram;
          sector: PublicKey;
          star: AsyncSigner<unknown>;
      }

      the params to this functions

      • gameId: PublicKey

        the SAGE game id

      • input: RegisterStarInput

        instruction input params

      • key: AsyncSigner<unknown>

        the key authorized to run this instruction

      • profile: PublicKey

        the profile with the required permissions for the instruction

      • program: SageIDLProgram

        SAGE program

      • sector: PublicKey

        the sector in which the new star will be located

      • star: AsyncSigner<unknown>

        the star

    Returns InstructionReturn

  • Update a Star

    Returns

    InstructionReturn

    Parameters

    • params: {
          gameId: PublicKey;
          input: UpdateStarInput;
          key: AsyncSigner<unknown>;
          profile: PublicKey;
          program: SageIDLProgram;
          star: PublicKey;
      }

      the params to this functions

      • gameId: PublicKey

        the SAGE game id

      • input: UpdateStarInput

        instruction input params

      • key: AsyncSigner<unknown>

        the key authorized to run this instruction

      • profile: PublicKey

        the profile with the required permissions for the instruction

      • program: SageIDLProgram

        SAGE program

      • star: PublicKey

        the star

    Returns InstructionReturn

Generated using TypeDoc