Convert a user’s accrued pending YCR into a real YCRRewards ERC-20 balance, without the user paying gas. The indexer calls YCRRewards.claimFor(user, activeActionTypes) from the authorized oracle wallet.
This is a testnet-only fallback path for app teams that don’t want to gate the claim UX on the user having native YCE for gas. The whitepaper-compliant path is YCRRewards.claim(uint8) called by the user wallet (see YCRRewards). Mainnet will require the wallet-signed path.

Request

Fields

string
required
User’s address. Must have accrued pending YCR (see /api/mobile/rewards/:address).
integer
default:"7"
Bitmask of action types to claim. 0xff (255) claims all 7 action types. Defaults to 7 which covers the first 3 types only; pass 255 to claim everything.

Response — 200 OK

Poll eth_getTransactionReceipt for confirmation. After confirmation, the YCR moves from pendingOf(user) into balanceOf(user) on the YCR ERC-20 contract.
Empty-claim guard. The endpoint reads YCRRewards.pendingOf(address) before submitting. If it’s 0 the call returns 400 { error: { code: "NOTHING_TO_CLAIM" }, pendingYcr: "0" } and no transaction is sent — so a claim with nothing pending never reverts on-chain or wastes relayer gas. Check pendingYcr via /rewards/:address before offering a claim.

Example

On-chain effect

The oracle wallet (0x1a64…14f1) is authorized as a setMinter on YCR. It calls claimFor(user, activeActionTypes) which sweeps the pending into the user’s balance and emits Claim(user, amount).