πŸͺ™Claim Flow Integration

If your program distributes token rewards, users need a way to claim them. This section covers what to display and how to wire up the claiming flow.

Show claimable balances

Before asking users to submit a transaction, show them what they have available to claim:

import { Fuul } from '@fuul/sdk';

const totals = await Fuul.getClaimCheckTotals({
  user_identifier: '0x1234...',
  user_identifier_type: 'evm_address',
  status: 'unclaimed'
});
// Returns: [{ currency_name, amount, currency_address, currency_chain_id }]

Display [] as "No rewards available to claim" β€” it is not an error.

Fetch claim checks

When the user is ready to claim, fetch their signed vouchers:

const claimChecks = await Fuul.getClaimableChecks({
  user_identifier: '0x1234...',
  user_identifier_type: 'evm_address',
});

Pass these directly to the Fuul contract claim function. See the chain-specific guides for the full transaction:

circle-exclamation

Show claim history

After claiming, or to display past activity:

Claim on behalf of users

Projects can submit claim transactions on behalf of users β€” tokens land in the user's wallet with no action required from them. See the EVM Claiming guide for implementation details.

Last updated