Represents a Mission Reward.

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a new MissionReward instance.

    Parameters

    • _mission: NectarMission

      The NectarMission instance that the reward belongs to.

    • _reward: Reward

      The underlying Reward object representing the reward data.

    Returns MissionReward

Properties

_mission: NectarMission
_reward: Reward

Accessors

  • get max(): bignum
  • Gets the maximum amount of the reward.

    Returns bignum

    The maximum amount.

  • get min(): bignum
  • Gets the minimum amount of the reward.

    Returns bignum

    The minimum amount.

  • get uiAmount(): string
  • Gets the user interface (UI) amount representation of the reward.

    Returns string

    The UI amount string.

    Example

    // Example 1:
    const reward = new MissionReward(mission, rewardData);
    console.log(reward.uiAmount); // Output: "5" (if rewardData.min and rewardData.max are both 5000000000)

    // Example 2:
    const reward = new MissionReward(mission, rewardData);
    console.log(reward.uiAmount); // Output: "1-10" (if rewardData.min is 1000000000 and rewardData.max is 10000000000)

Methods

  • Checks if the reward is of type ParticipationCurrencyRewards.

    Returns this is ParticipationCurrencyRewards

    true if the reward is of type ParticipationCurrencyRewards, false otherwise.

Generated using TypeDoc