SDK Integration

The recommended way to interact with the API is through our TypeScript/JavaScript SDK:

import { BigIntify, BitBadgesAPI } from "bitbadgesjs-sdk";

// Initialize the API client
const api = new BitBadgesAPI({
  convertFunction: BigIntify,
  apiKey: 'your-api-key-here'
});

// Example: Fetch collections
const collections = await api.getCollections({
  collectionsToFetch: [{
    collectionId: 1n,
    metadataToFetch: {
      badgeIds: [{ start: 1n, end: 10n }]
    }
  }]
});

Last updated