Claiming Boosts

Claiming boosts in V2 follows a two-step process:

  1. Generate a valid signature using the boost API
  2. Execute an on-chain claim transaction using the Boost SDK

Getting the Signature

First, get the claim signature by passing the boostId and transaction hash to the /signatures endpoint:

const { data } = await axios.get('https://api-v2.boost.xyz/signatures', {
  params: {
    boostId: `${chainId}:${boostCoreAddress}:${boost.id}`,
    txHash,
  }
});

You can also get signatures by providing a wallet address using the /transactions endpoint. This is useful when you want to check if a user has completed the boost requirements without knowing the specific transaction hash. See Fetching Signature by Address for details.

Claiming the Boost

The signature endpoint returns an array of signatures, one for each available incentive. You can claim these using either claimIncentive (called by claimant) or claimIncentiveFor (claim on behalf of claimant):

  const { data } = await axios.get('https://api-v2.boost.xyz/signatures', {
    params: {
      boostId: `${chainId}:${boostCoreAddress}:${boost.id}`,
      txHash,
    }
  });

for (const item of data) {
  const { signature, incentiveId, claimant } = item;
  await core.claimIncentive(boost.id, incentiveId, claimant, signature);
}