Skip to main content

RewardsController Actions

89 actions registered.

NameDeprecated
addPointsEstimateToHistory
calculateTierStatus
canChangeRewardsEnvUrl
checkOptInStatusAgainstCache
claimReward
convertInternalAccountToCaipAccountId
convertToSeasonStatusDto
estimatePoints
getActivePointsBoosts
getActivityIfChanged
getActivityLastUpdated
getActualSubscriptionId
getBenefits
getCampaignParticipantStatus
getCampaigns
getCandidateSubscriptionId
getClientVersionRequirements
getDefaultRewardsEnvUrl
getFirstSubscriptionId
getHasAccountOptedIn
getMoneyAccountSweepstakesDrawProof
getMoneyAccountSweepstakesParticipantOutcome
getMoneyAccountSweepstakesPrizePool
getMoneyAccountSweepstakesStatsMe
getMoneyAccountSweepstakesVolumeStats
getOffDeviceSubscriptionAccounts
getOndoCampaignActivity
getOndoCampaignDeposits
getOndoCampaignLeaderboard
getOndoCampaignLeaderboardPosition
getOndoCampaignParticipantOutcome
getOndoCampaignPortfolioPosition
getOptInStatus
getPerpsDiscountForAccount
getPerpsTradingCampaignLeaderboard
getPerpsTradingCampaignLeaderboardPosition
getPerpsTradingCampaignParticipantOutcome
getPerpsTradingCampaignPrizePool
getPerpsTradingCampaignVolume
getPerpsTradingFeeGrant
getPointsEvents
getPointsEventsIfChanged
getPointsEventsLastUpdated
getPredictThePitchLeaderboard
getPredictThePitchLeaderboardPosition
getPredictThePitchParticipantOutcome
getPredictThePitchPositions
getPredictThePitchPrizePool
getReferralDetails
getRewardsEnvUrl
getSeasonMetadata
getSeasonOneLineaRewardTokens
getSeasonStatus
getState
getUnlockedRewards
getVIPDashboard
getVipEquityMultiplier
getVipRefereeDashboard
getVipTierForAccount
getVipTransactions
getVipTransactionsIfChanged
getVipTransactionsLastUpdated
handleAuthenticationTrigger
hasActiveSeason
hasActivityChanged
hasPointsEventsChanged
hasVipTransactionsChanged
invalidateSubscriptionAndAccounts
invalidateSubscriptionCache
isOptInSupported
isRewardsFeatureEnabled
isVipFeatureEnabled
linkAccountsToSubscriptionCandidate
linkAccountToSubscriptionCandidate
logout
lookupVipTransaction
optIn
optInToCampaign
optInToCampaigns
optOut
performSilentAuth
postBenefitImpression
registerMoneyAccountBinding
resetAll
resetState
setActiveAccountFromCandidate
setRewardsEnvUrl
shouldSkipSilentAuth
signRewardsMessage

RewardsController:addPointsEstimateToHistory​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:264

Add a successful points estimate to the history for Customer Support diagnostics. Maintains a bounded history of the last N estimates.

Parameters:

NameDescription
requestThe estimate request containing activity details
responseThe estimated points response

Handler signature:

(request: EstimatePointsDto, response: EstimatedPointsDto) => void

RewardsController:calculateTierStatus​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:11

Calculate tier status and next tier information

Handler signature:

(seasonTiers: SeasonTierDto[], currentTierId: string, currentPoints: number) => SeasonTierState

RewardsController:canChangeRewardsEnvUrl​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:44

Returns whether the current MetaMask build allows manually overriding the rewards API environment (true for non-RC / non-production builds).

Handler signature:

() => boolean

RewardsController:checkOptInStatusAgainstCache​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:153

Handler signature:

(addresses: string[], addressToAccountMap: Map<string, InternalAccount>) => {
cachedOptInResults: (boolean | null)[];
cachedSubscriptionIds: (string | null)[];
addressesNeedingFresh: string[];
}

RewardsController:claimReward​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:634

Claim a reward

Parameters:

NameDescription
rewardIdThe reward ID
dtoThe claim reward request body
subscriptionIdThe subscription ID for authentication

Handler signature:

(rewardId: string, subscriptionId: string, dto?: ClaimRewardDto) => Promise<void>

RewardsController:convertInternalAccountToCaipAccountId​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:130

Handler signature:

(account: InternalAccount) => CaipAccountId | null

RewardsController:convertToSeasonStatusDto​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:19

Combine season metadata and season state into a SeasonStatusDto

Handler signature:

(seasonMetadata: SeasonDtoState, seasonState: SeasonStateDto) => SeasonStatusDto

RewardsController:estimatePoints​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:253

Estimate points for a given activity

Parameters:

NameDescription
requestThe estimate points request containing activity type and context

Returns: Promise<EstimatedPointsDto> - The estimated points and bonus information

Handler signature:

(request: EstimatePointsDto) => Promise<EstimatedPointsDto>

RewardsController:getActivePointsBoosts​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:418

Get active points boosts for the current season Get active points boosts for the current season with caching

Parameters:

NameDescription
seasonIdThe season ID to get points boosts for
subscriptionIdThe subscription ID to get points boosts for

Returns: Promise<PointsBoostDto[]> - The active points boosts

Handler signature:

(seasonId: string, subscriptionId: string) => Promise<PointsBoostDto[]>

RewardsController:getActivityIfChanged​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:601

Fetch the first page of activity only if the server data has changed since the last cached entry. Falls back to cached data when unchanged.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<PaginatedOndoGmActivityDto>

RewardsController:getActivityLastUpdated​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:612

Get the last-updated timestamp for Ondo GM campaign activity.

Parameters:

NameDescription
campaignIdThe campaign ID.
subscriptionIdThe subscription ID for authentication.

Returns: The last-updated date, or null if no activity exists.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<Date | null>

RewardsController:getActualSubscriptionId​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:74

Get the actual subscription ID for a given CAIP account ID

Parameters:

NameDescription
accountThe CAIP account ID to check

Returns: The subscription ID or null if not found

Handler signature:

(account: CaipAccountId) => string | null

RewardsController:getBenefits​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:655

Get benefits details with caching

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication
limitThe maximum number of items requested

Returns: Promise<SubscriptionBenefitsState> - The benefits data

Handler signature:

(subscriptionId: string, limit: number) => Promise<SubscriptionBenefitsState>

RewardsController:getCampaignParticipantStatus​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:504

Get the campaign participant status, cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID to check status for.
subscriptionIdThe subscription ID for authentication.

Returns: The participant status.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<CampaignParticipantStatusDto>

RewardsController:getCampaigns​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:449

Get all available campaigns with caching

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication

Returns: Promise<CampaignDto[]> - The list of campaigns

Handler signature:

(subscriptionId: string) => Promise<CampaignDto[]>

RewardsController:getCandidateSubscriptionId​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:378

Get candidate subscription ID with fallback logic

Returns: Promise<string | null> - The subscription ID or null if none found

Handler signature:

() => Promise<string | null>

RewardsController:getClientVersionRequirements​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:734

Fetch the minimum client version requirements from the public API. Cached for 30 minutes using controller state, matching other endpoint caches. This is a public (unauthenticated) endpoint that does not require the rewards feature to be enabled.

Handler signature:

() => Promise<ClientVersionRequirementDto>

RewardsController:getDefaultRewardsEnvUrl​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:53

Returns the default rewards API base URL for the current MetaMask environment, ignoring any manual override.

Handler signature:

() => string

RewardsController:getFirstSubscriptionId​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:83

Get the first subscription ID from the subscriptions map

Returns: The first subscription ID or null if no subscriptions exist

Handler signature:

() => string | null

RewardsController:getHasAccountOptedIn​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:148

Check if the given account (caip-10 format) has opted in to rewards

Parameters:

NameDescription
accountThe account address in CAIP-10 format

Returns: Promise<boolean> - True if the account has opted in, false otherwise

Handler signature:

(account: CaipAccountId) => Promise<boolean>

RewardsController:getMoneyAccountSweepstakesDrawProof​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:822

Fetch the Money Account Sweepstakes draw proof. Public endpoint. Non-null proofs are cached in controller state for 1 hour; null (pending) responses are cached in-memory for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID.

Returns: The draw proof DTO, or null if the draw has not been published yet.

Handler signature:

(campaignId: string) => Promise<MoneyAccountSweepstakesDrawProofDto | null>

RewardsController:getMoneyAccountSweepstakesParticipantOutcome​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:835

Fetch the participant outcome for the current user in a completed Money Account Sweepstakes campaign. Results are cached for 10 minutes using a private in-memory Map.

Parameters:

NameDescription
campaignIdThe campaign ID.
subscriptionIdThe subscription ID for authentication.

Returns: The participant outcome DTO, or null if unavailable.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<MoneyAccountSweepstakesOutcomeDto | null>

RewardsController:getMoneyAccountSweepstakesPrizePool​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:799

Fetch the Money Account Sweepstakes prize pool. Public endpoint — results are cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID.

Returns: The prize pool DTO.

Handler signature:

(campaignId: string) => Promise<MoneyAccountSweepstakesPrizePoolDto>

RewardsController:getMoneyAccountSweepstakesStatsMe​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:788

Fetch the current user's Money Account Sweepstakes stats. Results are cached for 1 minute using controller state.

Parameters:

NameDescription
campaignIdThe campaign ID.
subscriptionIdThe subscription ID for authentication.

Returns: The user's sweepstakes stats.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<MoneyAccountSweepstakesStatsMeDto>

RewardsController:getMoneyAccountSweepstakesVolumeStats​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:810

Fetch the Money Account Sweepstakes aggregate volume stats. Public endpoint — results are cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID.

Returns: The volume stats DTO.

Handler signature:

(campaignId: string) => Promise<MoneyAccountSweepstakesVolumeStatsDto>

RewardsController:getOffDeviceSubscriptionAccounts​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:439

Get CAIP-10 encoded accounts linked to a subscription with caching

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication

Returns: Promise<string[]> - Array of CAIP-10 account strings

Handler signature:

(subscriptionId: string) => Promise<string[]>

RewardsController:getOndoCampaignActivity​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:592

Get paginated activity for an Ondo GM campaign. Always fetches fresh from the API; the first-page result is mirrored to state.ondoCampaignActivity so selectors can read the latest snapshot. Subsequent pages (cursor provided) are fetched directly without going through the cache. When forceFresh is true a last-updated check avoids redundant fetches if the server data hasn't changed.

Parameters:

NameDescription
paramsCampaign ID, subscription ID, pagination cursor, and optional forceFresh flag.

Returns: Paginated activity entries.

Handler signature:

(params: {
campaignId: string;
subscriptionId: string;
cursor: string | null;
forceFresh?: boolean;
}) => Promise<PaginatedOndoGmActivityDto>

RewardsController:getOndoCampaignDeposits​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:528

Get campaign-wide total deposits. This is a public endpoint - no authentication required. Results are cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID to get deposits for.

Returns: The total USD deposited across all participants.

Handler signature:

(campaignId: string) => Promise<OndoGmCampaignDepositsDto>

RewardsController:getOndoCampaignLeaderboard​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:516

Get the campaign leaderboard showing top 20 participants per tier. This is a public endpoint - no authentication required. Results are cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID to get leaderboard for.

Returns: The leaderboard data grouped by tier.

Handler signature:

(campaignId: string) => Promise<CampaignLeaderboardDto>

RewardsController:getOndoCampaignLeaderboardPosition​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:556

Get the current user's position on the campaign leaderboard. This is an authenticated endpoint. Always fetches fresh from the API so the user's rank stays in sync with their latest trades; the result is mirrored to state.ondoCampaignLeaderboardPositions so selectors can read the latest snapshot.

Parameters:

NameDescription
campaignIdThe campaign ID to get position for.
subscriptionIdThe subscription ID for authentication.

Returns: The user's leaderboard position, or null if not found.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<CampaignLeaderboardPositionDto | null>

RewardsController:getOndoCampaignParticipantOutcome​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:561

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<OndoGmCampaignParticipantOutcomeDto | null>

RewardsController:getOndoCampaignPortfolioPosition​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:577

Get the current user's Ondo GM portfolio for a campaign. This is an authenticated endpoint. Always fetches fresh from the API; the result is mirrored to state.ondoCampaignPortfolio[subscriptionId:campaignId] as OndoGmPortfolioState so selectors can read the latest snapshot. Null API responses are not written to the cache.

Parameters:

NameDescription
campaignIdThe campaign ID to get portfolio for.
subscriptionIdThe subscription ID for authentication.

Returns: The portfolio, or null if not found.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<OndoGmPortfolioDto | null>

RewardsController:getOptInStatus​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:163

Get opt-in status for multiple addresses with feature flag check

Parameters:

NameDescription
paramsThe request parameters containing addresses

Returns: Promise<OptInStatusDto> - The opt-in status response

Handler signature:

(params: OptInStatusInputDto) => Promise<OptInStatusDto>

RewardsController:getPerpsDiscountForAccount​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:196

Get perps fee discount for an account.

Calls the authenticated /vip/fees endpoint (bypassing the local subscription.features.vip.enabled flag — the backend is the source of truth) and converts the absolute VIP builder fee into a discount fraction relative to baseFeeBips. Responses are cached per-subscription for VIP_PERPS_FEES_CACHE_THRESHOLD_MS. When the backend returns a valid fee response the controller also flips the subscription's features.vip.enabled flag to true so the rest of the app reflects the user's VIP status.

Parameters:

NameDescription
accountThe account address in CAIP-10 format
baseFeeBipsThe perps MetaMask builder base fee in basis points that the caller would apply absent any discount. Used to convert the VIP absolute fee into a discount fraction (caller owns the source of truth for the base fee; the controller is a pure transformer).

Returns: Promise<number | null> — Discount in basis points (0-10000), or null when the discount is currently unknowable (rewards disabled, no subscription, unhydrated cache, fetch error). Callers should treat null as "no discount available yet" and retry next call. A literal 0 means "no discount applies" (tier-0 / non-VIP response, out-of-range bips).

Handler signature:

(account: CaipAccountId, baseFeeBips: number) => Promise<number | null>

RewardsController:getPerpsTradingCampaignLeaderboard​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:848

Get the perps trading campaign leaderboard. This is a public endpoint - no authentication required. Results are cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID to get leaderboard for.

Returns: The leaderboard entries and metadata.

Handler signature:

(campaignId: string) => Promise<PerpsTradingCampaignLeaderboardDto>

RewardsController:getPerpsTradingCampaignLeaderboardPosition​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:864

Get the current user's position on the perps trading campaign leaderboard. This is an authenticated endpoint. Always fetches fresh from the API so the user's rank stays in sync with their latest trades; the result is mirrored to state.perpsTradingCampaignLeaderboardPositions so selectors can read the latest snapshot.

Parameters:

NameDescription
campaignIdThe campaign ID to get position for.
subscriptionIdThe subscription ID for authentication.

Returns: The user's leaderboard position, or null if not found.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<PerpsTradingCampaignLeaderboardPositionDto | null>

RewardsController:getPerpsTradingCampaignParticipantOutcome​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:540

Fetch the participant outcome for the current user in a completed Perps Trading campaign. Results are cached for 10 minutes using a private in-memory Map.

Parameters:

NameDescription
campaignIdThe campaign ID.
subscriptionIdThe subscription ID for authentication.

Returns: The participant outcome DTO, or null if unavailable.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<PerpsTradingCampaignParticipantOutcomeDto | null>

RewardsController:getPerpsTradingCampaignPrizePool​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:889

Get the perps trading campaign prize ladder and currently unlocked pool. This is a public endpoint - no authentication required. Results are cached for 5 minutes.

Parameters:

NameDescription
campaignIdThe campaign ID to get the prize pool for.

Returns: The prize pool schedule and unlocked amount for the campaign.

Handler signature:

(campaignId: string) => Promise<PerpsTradingCampaignPrizePoolDto>

RewardsController:getPerpsTradingCampaignVolume​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:877

Get the perps trading campaign aggregate volume (public stats). This is a public endpoint - no authentication required. Results are cached for 1 minute.

Parameters:

NameDescription
campaignIdThe campaign ID to get volume for.

Returns: Current aggregate notional volume for the campaign.

Handler signature:

(campaignId: string) => Promise<PerpsTradingCampaignVolumeDto>

RewardsController:getPerpsTradingFeeGrant​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:206

Fetch a trading-fee grant for the requested Perps route. Grant lookup respects Basic Functionality while remaining independent of Rewards opt-in, VIP feature state, and Rewards subscription state.

Handler signature:

(scope: PerpsFeeResolverScope) => Promise<PerpsTradingFeeGrant | null>

RewardsController:getPointsEvents​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:216

Get points events for a given season

Parameters:

NameDescription
paramsThe request parameters

Returns: Promise<PaginatedPointsEventsDto> - The points events data

Handler signature:

(params: GetPointsEventsDto) => Promise<PaginatedPointsEventsDto>

RewardsController:getPointsEventsIfChanged​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:221

Handler signature:

(params: GetPointsEventsDto) => Promise<PaginatedPointsEventsDto>

RewardsController:getPointsEventsLastUpdated​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:231

Get points events last updated for a given season

Parameters:

NameDescription
paramsThe request parameters

Returns: Promise<Date | null> - The points events last updated date

Handler signature:

(params: GetPointsEventsLastUpdatedDto) => Promise<Date | null>

RewardsController:getPredictThePitchLeaderboard​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:756

Handler signature:

(campaignId: string) => Promise<PredictThePitchLeaderboardDto>

RewardsController:getPredictThePitchLeaderboardPosition​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:761

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<PredictThePitchLeaderboardPositionDto | null>

RewardsController:getPredictThePitchParticipantOutcome​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:771

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<PredictThePitchCampaignParticipantOutcomeDto | null>

RewardsController:getPredictThePitchPositions​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:766

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<PredictThePitchPositionsDto | null>

RewardsController:getPredictThePitchPrizePool​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:776

Handler signature:

(campaignId: string) => Promise<PredictThePitchPrizePoolDto>

RewardsController:getReferralDetails​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:343

Get referral details with caching

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication

Returns: Promise<SubscriptionReferralDetailState | null> - The referral details data

Handler signature:

(subscriptionId: string) => Promise<SubscriptionReferralDetailState | null>

RewardsController:getRewardsEnvUrl​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:35

Returns the rewards API base URL the data service is currently targeting.

Handler signature:

() => string

RewardsController:getSeasonMetadata​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:307

Get season metadata with caching. This fetches and caches the season metadata including id, name, dates, tiers, and activity types.

Parameters:

NameDescription
typeThe type of season to get

Returns: Promise<SeasonDtoState> - The season metadata

Handler signature:

(type: 'current' | 'previous') => Promise<SeasonDtoState | null>

RewardsController:getSeasonOneLineaRewardTokens​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:644

Get Season 1 Linea token reward for the subscription.

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication.

Returns: The Linea token reward DTO or null if not found.

Handler signature:

(subscriptionId: string) => Promise<LineaTokenRewardDto | null>

RewardsController:getSeasonStatus​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:318

Get season status with caching

Parameters:

NameDescription
seasonIdThe ID of the season to get status for
subscriptionIdThe subscription ID for authentication

Returns: Promise<SeasonStatusState> - The season status data

Handler signature:

(subscriptionId: string, seasonId: string) => Promise<SeasonStatusState | null>

RewardsController:getState​

Source: app/core/Engine/controllers/rewards-controller/types.ts:3045

The action which can be used to retrieve the state of the RewardsController.

Handler signature:

() => RewardsControllerState

RewardsController:getUnlockedRewards​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:429

Get unlocked rewards with caching

Parameters:

NameDescription
seasonIdThe season ID
subscriptionIdThe subscription ID for authentication

Returns: Promise<RewardDto[]> - The unlocked rewards data

Handler signature:

(seasonId: string, subscriptionId: string) => Promise<RewardDto[]>

RewardsController:getVIPDashboard​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:690

Get the VIP dashboard with caching.

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication

Returns: Promise<VipDashboardState | null> - The dashboard data, or null when the user is not VIP

Handler signature:

(subscriptionId: string) => Promise<VipDashboardState | null>

RewardsController:getVipEquityMultiplier​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:700

Display-only equity multiplier estimate from client-supplied holdings. Must never be persisted as program truth or feed warrant settlement (RWDS-1485). Client balance is untrusted; cache is holdings-keyed TTL only.

Handler signature:

(subscriptionId: string, holdingsUsd: string) => Promise<VipEquityMultiplierDto | null>

RewardsController:getVipRefereeDashboard​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:710

Get the VIP referee stats with caching.

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication

Returns: Promise<VipRefereeMeState | null> - The referee stats, or null when the user is not a VIP referee

Handler signature:

(subscriptionId: string) => Promise<VipRefereeMeState | null>

RewardsController:getVipTierForAccount​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:168

Handler signature:

(account: CaipAccountId) => Promise<number | null>

RewardsController:getVipTransactions​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:660

Handler signature:

(params: GetVipTransactionsDto) => Promise<PaginatedVipTransactionsDto>

RewardsController:getVipTransactionsIfChanged​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:665

Handler signature:

(subscriptionId: string, type: GetVipTransactionsDto['type']) => Promise<PaginatedVipTransactionsDto>

RewardsController:getVipTransactionsLastUpdated​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:670

Handler signature:

(subscriptionId: string, type: GetVipTransactionsDto['type']) => Promise<Date | null>

RewardsController:handleAuthenticationTrigger​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:107

Handle authentication triggers (account changes, keyring unlock)

Handler signature:

(reason?: string) => Promise<void>

RewardsController:hasActiveSeason​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:296

Check if there is an active season. Temporarily hardcoded to false while no season is configured. Callers gate season-scoped flows (points estimates, rewards rows, dashboard fetches) off this; the perps VIP fee discount is independent and unaffected.

Handler signature:

() => Promise<boolean>

RewardsController:hasActivityChanged​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:623

Check if campaign activity has changed since the last fetch. Compares the server's last-updated timestamp against the most recent cached entry's timestamp.

Returns: true if fresh data should be fetched.

Handler signature:

(campaignId: string, subscriptionId: string) => Promise<boolean>

RewardsController:hasPointsEventsChanged​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:241

Check if a new points events have been added since the last fetch

Parameters:

NameDescription
paramsThe request parameters

Returns: Promise<boolean> - True if a new points events have been added since the last fetch, false otherwise

Handler signature:

(params: GetPointsEventsLastUpdatedDto) => Promise<boolean>

RewardsController:hasVipTransactionsChanged​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:675

Handler signature:

(subscriptionId: string, type: GetVipTransactionsDto['type']) => Promise<boolean>

RewardsController:invalidateSubscriptionAndAccounts​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:333

Invalidate local state for a subscription and its linked rewards accounts.

Removes the subscription metadata entry, resets any linked rewards account state to opted-out, resets the active rewards account when it belongs to the subscription, and removes the stored session token. This intentionally does not clear rewards API caches such as vipDashboard; pair it with invalidateSubscriptionCache when cached data must be removed.

Parameters:

NameDescription
subscriptionIdThe subscription ID to invalidate

Handler signature:

(subscriptionId: string) => Promise<void>

RewardsController:invalidateSubscriptionCache​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:751

Invalidate cached data for a subscription

Clears cached rewards API data only. This does not alter linked account auth state, subscription metadata, or stored session tokens; pair it with invalidateSubscriptionAndAccounts when auth/account state must be reset.

Parameters:

NameDescription
optionsCache invalidation scope
options.subscriptionIdThe subscription ID to invalidate cache for
options.seasonIdOptional season ID to limit invalidation to season-scoped cache entries
options.campaignIdOptional campaign ID to limit invalidation to campaign-scoped cache entries

Handler signature:

({
subscriptionId,
seasonId,
campaignId,
}: InvalidateSubscriptionCacheOptions) => void

RewardsController:isOptInSupported​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:125

Check if an internal account supports opt-in for rewards

Parameters:

NameDescription
accountThe internal account to check

Returns: boolean - True if the account supports opt-in, false otherwise

Handler signature:

(account: InternalAccount) => boolean

RewardsController:isRewardsFeatureEnabled​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:273

Check if the rewards feature is enabled

Returns: boolean - True if rewards feature is enabled, false otherwise

Handler signature:

() => boolean

RewardsController:isVipFeatureEnabled​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:284

Check if the VIP feature is enabled. VIP is a sub-feature of rewards, so it requires both the rewards feature and the dedicated VIP feature flag to be enabled.

Returns: boolean - True if the VIP feature is enabled, false otherwise

Handler signature:

() => boolean

RewardsController:linkAccountsToSubscriptionCandidate​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:397

Link multiple accounts to a subscription candidate

Parameters:

NameDescription
accountsArray of accounts to link to the subscription

Handler signature:

(accounts: InternalAccount[]) => Promise<{ account: InternalAccount; success: boolean }[]>

RewardsController:linkAccountToSubscriptionCandidate​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:388

Link an account to a subscription via mobile join

Parameters:

NameDescription
accountThe account to link to the subscription

Returns: Promise<boolean> - The updated subscription information

Handler signature:

(account: InternalAccount, invalidateRelatedData: boolean) => Promise<boolean>

RewardsController:logout​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:369

Logout user from rewards and clear associated data

Parameters:

NameDescription
subscriptionIdOptional subscription ID to logout from

Handler signature:

() => Promise<void>

RewardsController:lookupVipTransaction​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:680

Handler signature:

(subscriptionId: string, key: string) => Promise<VipTransactionDto | null>

RewardsController:optIn​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:352

Perform the complete opt-in process for rewards

Parameters:

NameDescription
accountsArray of internal accounts to opt in

Handler signature:

(accounts: InternalAccount[]) => Promise<string | null>

RewardsController:optInToCampaign​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:461

Opt a subscription into a campaign.

Parameters:

NameDescription
campaignIdThe campaign ID to opt into.
subscriptionIdThe subscription ID for authentication.
profileUsernameSocial profile username captured at opt-in, when the user has one.

Returns: The participant status after opting in.

Handler signature:

(campaignId: string, subscriptionId: string, profileUsername?: string) => Promise<CampaignParticipantStatusDto>

RewardsController:optInToCampaigns​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:479

Opt a subscription into multiple campaigns in one batch. POSTs each opt-in sequentially (up to 3 attempts per campaign on throw or non-opted-in response), continues after exhausted failures, then invalidates once per campaign and publishes a single campaignOptedIn so UI listeners do not refetch after every intermediate opt-in (important for series campaigns). Participant-status cache entries are re-seeded from the POST responses so post-event status fetches hit cache instead of the network.

Parameters:

NameDescription
campaignIdsCampaign IDs to opt into, in call order.
subscriptionIdThe subscription ID for authentication.
profileUsernameSocial profile username captured at opt-in, when the user has one. Applied to every campaign in the batch.

Returns: Per-campaign participant statuses after opting in.

Handler signature:

(campaignIds: string[], subscriptionId: string, profileUsername?: string) => Promise<Record<string, CampaignParticipantStatusDto>>

RewardsController:optOut​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:406

Opt out of the rewards program, deleting the subscription and all associated data

Returns: Promise<boolean> - True if opt-out was successful, false otherwise

Handler signature:

(subscriptionId: string) => Promise<boolean>

RewardsController:performSilentAuth​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:138

Perform silent authentication for the given address

Handler signature:

(internalAccount?: InternalAccount | null, shouldBecomeActiveAccount: unknown, respectSkipSilentAuth: unknown) => Promise<string | null>

RewardsController:postBenefitImpression​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:723

Post a benefit impression with caching to prevent duplicate impressions within a short time frame

Parameters:

NameDescription
subscriptionIdThe subscription ID for authentication
benefitIdThe specific benefit ID that was impressed
benefitTypeThe type of the benefit that was impressed
walletAddressThe wallet address that viewed the benefit (optional)

Returns: Promise<SubscriptionBenefitsState> - The benefits data

Handler signature:

(subscriptionId: string, benefitId: number, benefitType: number, walletAddress?: string) => Promise<void>

RewardsController:registerMoneyAccountBinding​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:493

Register (or re-assert) the Money Account holder address for a subscription. The request carries a personal_sign signature from the Money Account. Results are memoized in-session so repeated re-asserts do not re-POST, and a discovered conflict is returned synchronously on subsequent calls.

Parameters:

NameDescription
moneyAccountAddressThe Money Account holder address to bind.
subscriptionIdThe subscription ID for authentication.

Returns: 'bound' or 'conflict'.

Handler signature:

(moneyAccountAddress: string, subscriptionId: string) => Promise<'bound' | 'conflict'>

RewardsController:resetAll​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:360

Reset rewards account state and clear all access tokens

Handler signature:

() => Promise<void>

RewardsController:resetState​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:27

Reset controller state to default

Handler signature:

() => void

RewardsController:setActiveAccountFromCandidate​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:99

Set the active account from a candidate account

Handler signature:

(candidate: InternalAccount | null) => void

RewardsController:setRewardsEnvUrl​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:64

Switches the active rewards API URL, persists the choice, and resets all cached state so the next fetches target the new environment.

No-ops on production builds where the environment URL cannot be changed.

Handler signature:

(url: string) => Promise<void>

RewardsController:shouldSkipSilentAuth​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:115

Check if silent authentication should be skipped

Handler signature:

(account: CaipAccountId, internalAccount: InternalAccount) => Promise<boolean>

RewardsController:signRewardsMessage​

Source: app/core/Engine/controllers/rewards-controller/RewardsController-method-action-types.ts:91

Sign a message for rewards authentication

Handler signature:

(account: InternalAccount, timestamp: number) => Promise<string>