Skip to main content

RewardsMoneyController Actions

26 actions registered.

NameDeprecated
canChangeRewardsMoneyEnvUrl
clearTaxFormSubmitted
getClaimById
getClaimHistory
getCommissions
getDefaultRewardsMoneyEnvUrl
getEarningsLedger
getEarningsSummary
getPerpsRebateQuote
getReferralCodes
getReferralFunnel
getReferralMe
getRewardsMoneyEnvUrl
getState
getSwapsRebateQuote
getTaxFormSubmitted
getTaxMe
initiateClaim
isRewardsMoneyFeatureEnabled
mintTaxFormToken
noteTaxFormSubmitted
registerReferee
setRewardsMoneyEnvUrl
submitTaxAttestation
submitTaxUsActivity
validateReferralCode

RewardsMoneyController:canChangeRewardsMoneyEnvUrl​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:18

Handler signature:

() => boolean

RewardsMoneyController:clearTaxFormSubmitted​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:178

Drop the form-success snapshot after tax/me has moved on.

Handler signature:

() => Promise<void>

RewardsMoneyController:getClaimById​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:203

Handler signature:

(params: GetClaimByIdDto) => Promise<ClaimDto>

RewardsMoneyController:getClaimHistory​

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

Handler signature:

(params: GetClaimHistoryDto) => Promise<ClaimHistoryPageDto>

RewardsMoneyController:getCommissions​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:135

Handler signature:

(params: GetCommissionsDto) => Promise<CommissionsPageDto>

RewardsMoneyController:getDefaultRewardsMoneyEnvUrl​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:23

Handler signature:

() => string

RewardsMoneyController:getEarningsLedger​

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

Handler signature:

(params: GetEarningsLedgerDto) => Promise<EarningsLedgerPageDto>

RewardsMoneyController:getEarningsSummary​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:120

Handler signature:

(params: GetEarningsSummaryDto) => Promise<EarningsSummaryDto>

RewardsMoneyController:getPerpsRebateQuote​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:103

Rebate a perps confirmation screen should show. trade is optional and the server drops it today; the answer does not depend on it. A trade the server would refuse (see PerpsRebateTrade) is left out rather than sent, so it cannot turn the quote into a 400.

A refusal rejects with RewardsMoneyRebateQuoteError, a 401 with RewardsMoneyAuthorizationError. A timeout or a network failure rejects with a plain Error. A 401 is not retried.

A 503 or 429 whose Retry-After is at most 5 seconds is retried once inside the data service, after that delay plus up to a second of jitter. The promise includes that wait. Callers must not retry again. A 429 (RATE_LIMITED) shares the profile read budget, 60 requests per 30 seconds, with the Earnings reads. A 503 (UNAVAILABLE) means the server is unavailable, whether the body reason is SERVER_BUSY or JWKS_UNAVAILABLE.

Parameters:

NameDescription
tradeWhat the user is about to trade, when known.

Returns: The rebate to show; eligible: false means no rebate row.

Handler signature:

(trade?: PerpsRebateTrade) => Promise<RebateQuoteResponse>

RewardsMoneyController:getReferralCodes​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:43

Handler signature:

(params: GetReferralCodesDto) => Promise<OwnReferralCodesDto>

RewardsMoneyController:getReferralFunnel​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:38

Handler signature:

(params: GetReferralFunnelDto) => Promise<ReferralFunnelDto>

RewardsMoneyController:getReferralMe​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:33

Handler signature:

(params: GetReferralMeDto) => Promise<ReferralMeDto>

RewardsMoneyController:getRewardsMoneyEnvUrl​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:13

Handler signature:

() => string

RewardsMoneyController:getState​

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

Handler signature:

() => RewardsMoneyControllerState

RewardsMoneyController:getSwapsRebateQuote​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:77

Rebate a swaps confirmation screen should show. The bridge quote decides fee-token eligibility. Not cached: the rate has to disappear the moment an operator ends the window, and a different quote can name a different fee token.

Pass the quote of the bridge QuoteResponse, not the response. Only its feeData.metabridge is sent.

A refusal rejects with RewardsMoneyRebateQuoteError, a 401 with RewardsMoneyAuthorizationError. A timeout or a network failure rejects with a plain Error. A 401 is not retried.

A 503 or 429 whose Retry-After is at most 5 seconds is retried once inside the data service, after that delay plus up to a second of jitter. The promise includes that wait. Callers must not retry again. A 429 (RATE_LIMITED) shares the profile read budget, 60 requests per 30 seconds, with the Earnings reads. A 503 (UNAVAILABLE) means the server is unavailable, whether the body reason is SERVER_BUSY or JWKS_UNAVAILABLE.

Parameters:

NameDescription
quoteThe bridge quote the confirmation screen holds.

Returns: The rebate to show; eligible: false means no rebate row.

Handler signature:

(quote: SwapsRebateBridgeQuote) => Promise<RebateQuoteResponse>

RewardsMoneyController:getTaxFormSubmitted​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:161

The form-success snapshot for this profile, or null when none is stored. Claim force-reads tax/me while one is set.

Handler signature:

() => Promise<TaxFormSubmittedSnapshot | null>

RewardsMoneyController:getTaxMe​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:152

GET /tax/me, cached for five minutes per profile.

forceFresh does not join a read already running, and its result wins if that older read lands last. A tax POST drops the entry, so the next read cannot return the determination that POST replaced.

Handler signature:

(params: GetTaxMeDto) => Promise<TaxMeDto>

RewardsMoneyController:initiateClaim​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:140

Handler signature:

(route: ClaimRouteSlug, body: InitiateClaimBody) => Promise<InitiateClaimResult>

RewardsMoneyController:isRewardsMoneyFeatureEnabled​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:8

Handler signature:

() => boolean

RewardsMoneyController:mintTaxFormToken​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:198

Mints one form token. The token is returned to the caller and is not written into controller state. Minting closes can_change_answer, so the cached determination is dropped with the other tax writes.

Handler signature:

() => Promise<TaxFormTokenDto>

RewardsMoneyController:noteTaxFormSubmitted​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:170

Remember a form submission, or clear it when snapshot is null. The caller decides which reads still count as "checking".

Handler signature:

(snapshot: TaxFormSubmittedSnapshot | null) => Promise<void>

RewardsMoneyController:registerReferee​

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

Enrols the session profile under a referrer's code. Drops that profile's cached referral me after the write succeeds, so a later read cannot return the pre-registration roles for the rest of the cache window. A read already in flight cannot write its payload back. The new role is read through getReferralMe({ forceFresh: true }).

Handler signature:

(params: RegisterRefereeDto) => Promise<void>

RewardsMoneyController:setRewardsMoneyEnvUrl​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:28

Handler signature:

(url: string) => Promise<void>

RewardsMoneyController:submitTaxAttestation​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:183

Handler signature:

(usPersonOrActivity: boolean) => Promise<TaxAnswerResultDto>

RewardsMoneyController:submitTaxUsActivity​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:188

Handler signature:

(usActivity: boolean) => Promise<TaxAnswerResultDto>

RewardsMoneyController:validateReferralCode​

Source: app/core/Engine/controllers/rewards-money-controller/RewardsMoneyController-method-action-types.ts:48

Handler signature:

(code: string) => Promise<{ success: boolean }>