Getting Claims

If you know the claim ID:

import { BitBadgesApi } from 'bitbadges-api';

const getClaims = async () => {
  try {
    const res = await BitBadgesApi.getClaims({ 
      claimIds: ['claimId1', 'claimId2', 'claimId3']
    });
    
    const { claims } = res;
    console.log(claims);
  } catch (error) {
    console.error('Error fetching claims:', error);
  }
};

getClaims();

You can also get claims via the claims field on the returned values for collections and address lists.

Fetching Attempts

For fetching and verifying user claim attempts, we refer you to here:

Verifying Claim Attempts w/ API

Last updated