Skip to main content
Distribute NFTs to players through claims, fixed-price sales, or custom distribution mechanics.

Why Use Primary Sales?

Monetise your game directly by selling NFTs. Set your own prices and capture 100% of primary sale revenue.
Manage who gets what—whitelist early supporters, limit purchases per wallet, or gate access by achievement.
Create hype with timed drops, reveal mechanics, and limited editions that drive player engagement.

Sale Types

Free Claim

Give NFTs to eligible players—airdrops, rewards, promotional items

Fixed Price

Sell at a set price in IMX or ERC-20 tokens

Whitelist

Restrict purchases to pre-approved addresses

Limited Edition

Cap supply or time-limit availability

Free Claim

Distribute NFTs without payment—ideal for rewards, airdrops, or promotional items.
app.post('/claim', async (req, res) => {
  const { address } = req.body;
  
  // Check eligibility (e.g., achievement, whitelist, one-per-wallet)
  if (!await isEligible(address)) {
    return res.status(403).json({ error: 'Not eligible' });
  }
  
  // Mark as claimed to prevent double-claims
  await markClaimed(address);
  
  // Mint via Minting API
  const tokenId = generateTokenId();
  await mintNFT(address, tokenId, metadata);
  
  res.json({ success: true, tokenId });
});

Fixed Price Sale

Accept payment before minting:
import { ethers } from 'ethers';

const PRICE = ethers.parseEther('10'); // 10 IMX

app.post('/purchase', async (req, res) => {
  const { address, txHash } = req.body;
  
  // Verify payment transaction
  const tx = await provider.getTransaction(txHash);
  if (!tx || tx.to !== TREASURY_ADDRESS || tx.value < PRICE) {
    return res.status(400).json({ error: 'Invalid payment' });
  }
  
  // Wait for confirmation
  await tx.wait(1);
  
  // Mint to buyer
  const tokenId = generateTokenId();
  await mintNFT(address, tokenId, metadata);
  
  res.json({ success: true, tokenId });
});

Whitelist Sale

Restrict purchases to approved addresses:
const whitelist = new Set([
  '0xAddress1...',
  '0xAddress2...',
]);

app.post('/whitelist-purchase', async (req, res) => {
  const { address } = req.body;
  
  if (!whitelist.has(address.toLowerCase())) {
    return res.status(403).json({ error: 'Not whitelisted' });
  }
  
  // Process sale...
});

Hub Integration

Hub provides a Primary Sales widget for no-code setup:
  1. Go to HubPrimary Sales
  2. Configure:
    • Price and currency
    • Sale duration
    • Purchase limits
    • Whitelist (optional)
  3. Embed the widget in your site

Launch Checklist

  • Contract deployed with correct supply
  • Metadata prepared for all tokens
  • Eligibility rules defined
  • Payment handling tested
  • Rate limiting configured
  • Reveal mechanism ready (if applicable)