Function cleanCargoPodsByStarbasePlayer

  • Clean up Starbase cargo pods for the provided StarbasePlayer account

    Removes any extra StarbasePlayer-owned cargo pods by transferring all the cargo to the main cargo pod at a Starbase.

    Returns

    InstructionReturn[]

    Parameters

    • connection: Connection

      Solana connection

    • sageProgram: SageIDLProgram

      the SAGE program

    • cargoProgram: CargoIDLProgram

      the Cargo program

    • starbasePlayer: PublicKey

      the StarbasePlayer

    • starbase: PublicKey

      the Starbase associated with the starbasePlayer

    • playerProfile: PublicKey

      the player profile

    • profileFaction: PublicKey

      the player profile's faction

    • cargoStatsDefinition: PublicKey

      the cargo stats definition

    • gameId: PublicKey

      the SAGE game id

    • gameState: PublicKey

      the game state account associated with gameId

    • key: AsyncSigner<unknown>

      the key authorized to run this instruction, should have at least ADD_REMOVE_CARGO SAGE permissions

    • keyIndex: number

      the index of the key in the playerProfile permissions

    Returns Promise<InstructionReturn[]>

Generated using TypeDoc