Skip to main content

Drop DTO

Schema for drop data transfer objects used in GET /api/v2/drop/{id}/walletNFTs.

Description

This schema defines the structure of NFT drop objects returned by the drop API. It includes complete metadata, configuration, contract information, and associated data for NFT drops.

Class Validator Schema

import { Type } from "class-transformer";
import { IsArray, IsBoolean, IsNumber, IsString, ValidateNested } from "class-validator";
import { MintPhaseDto } from "./MintPhaseDto";
import { MarketPlaceDto } from "./MarketPlaceDto";
import { RarityDto } from "./RarityDto";

export class DropDto {
@IsString()
id: string;

@IsString()
name: string;

@IsBoolean()
isActive: boolean;

@IsNumber()
startDate: number;

@IsNumber()
endDate: number;

@IsString()
contractAddress: string;

@IsBoolean()
hasMultipleContracts: boolean;

@IsBoolean()
isVIP: boolean;

@IsBoolean()
whitelistEnabled: boolean;

@IsString()
chain: string;

@IsNumber()
chainId: number;

@IsString()
network: string;

@IsString()
description: string;

@IsString()
moreInfoUrl: string;

@IsString()
logo: string;

@IsNumber()
numberOfRarities: number;

@IsBoolean()
hasDailyCheckIn: boolean;

@IsString()
magicEdenGoldTokenName: string | null;

@IsArray()
@ValidateNested({ each: true })
@Type(() => RarityDto)
cards: RarityDto[];

@IsArray()
@ValidateNested({ each: true })
@Type(() => MarketPlaceDto)
marketplaces: MarketPlaceDto[] | null;

@IsArray()
@ValidateNested({ each: true })
@Type(() => MintPhaseDto)
phases: MintPhaseDto[] | null;

@IsString()
slug: string;
}

TypeScript Type

interface DropDto {
id: string;
name: string;
isActive: boolean;
startDate: number;
endDate: number;
contractAddress: string;
hasMultipleContracts: boolean;
isVIP: boolean;
whitelistEnabled: boolean;
chain: string;
chainId: number;
network: string;
description: string;
moreInfoUrl: string;
logo: string;
numberOfRarities: number;
hasDailyCheckIn: boolean;
magicEdenGoldTokenName: string | null;
cards: RarityDto[];
marketplaces: MarketPlaceDto[] | null;
phases: MintPhaseDto[] | null;
slug: string;
}

Example Response

{
"id": "drop-123",
"name": "Bored Ape Yacht Club",
"isActive": true,
"startDate": 1640995200000,
"endDate": 1641081600000,
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e0a6a9c8d0c0b0a",
"hasMultipleContracts": false,
"isVIP": false,
"whitelistEnabled": true,
"chain": "ethereum",
"chainId": 1,
"network": "mainnet",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs",
"moreInfoUrl": "https://boredapeyachtclub.com",
"logo": "https://example.com/logo.png",
"numberOfRarities": 5,
"hasDailyCheckIn": false,
"magicEdenGoldTokenName": null,
"cards": [
{
"id": "rarity-1",
"name": "Common",
"probability": 0.7,
"maxSupply": 7000
}
],
"marketplaces": [
{
"id": "marketplace-1",
"name": "OpenSea",
"url": "https://opensea.io"
}
],
"phases": [
{
"id": "phase-1",
"name": "Whitelist",
"startDate": 1640995200000,
"endDate": 1641081600000
}
],
"slug": "bored-ape-yacht-club"
}

Field Descriptions

FieldTypeRequiredDescription
idstringYesUnique identifier for the drop
namestringYesDisplay name of the drop
isActivebooleanYesWhether the drop is currently active
startDatenumberYesDrop start timestamp in milliseconds
endDatenumberYesDrop end timestamp in milliseconds
contractAddressstringYesSmart contract address for the drop
hasMultipleContractsbooleanYesWhether the drop has multiple contracts
isVIPbooleanYesWhether this is a VIP-only drop
whitelistEnabledbooleanYesWhether whitelist is enabled
chainstringYesBlockchain chain name
chainIdnumberYesBlockchain chain ID
networkstringYesNetwork name (mainnet, testnet, etc.)
descriptionstringYesDetailed description of the drop
moreInfoUrlstringYesURL for additional information
logostringYesURL to the drop logo image
numberOfRaritiesnumberYesNumber of rarity tiers
hasDailyCheckInbooleanYesWhether daily check-in is required
magicEdenGoldTokenNamestringNoMagic Eden gold token name if applicable
cardsRarityDto[]YesArray of rarity tier definitions
marketplacesMarketPlaceDto[]NoSupported marketplace information
phasesMintPhaseDto[]NoMinting phase definitions
slugstringYesURL-friendly identifier

API Endpoints

This schema is used by the following endpoints:

  • GET /v2/drop/:slug - Get drop by slug
  • POST /v2/drop - Create new drop
  • GET /v2/drop/list - List drops (paginated)

Authentication Requirements

Get Drop by Slug (GET /v2/drop/:slug)

  • Authentication: No authentication required
  • Purpose: Public access to view drop details

Create Drop (POST /v2/drop)

  • Authentication: Dual authentication required
    • JWT Bearer Token: Authorization: Bearer <jwt_token>
    • Game Key Header: x-game-key: <client_key> or x-game-server-key: <server_key>
    • Permissions: User must have drop creation permissions

List Drops (GET /v2/drop/list)

  • Authentication: Dual authentication required
    • JWT Bearer Token: Authorization: Bearer <jwt_token>
    • Game Key Header: x-game-key: <client_key> or x-game-server-key: <server_key>
    • Permissions: User must have drop viewing permissions

Next Steps