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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the drop |
name | string | Yes | Display name of the drop |
isActive | boolean | Yes | Whether the drop is currently active |
startDate | number | Yes | Drop start timestamp in milliseconds |
endDate | number | Yes | Drop end timestamp in milliseconds |
contractAddress | string | Yes | Smart contract address for the drop |
hasMultipleContracts | boolean | Yes | Whether the drop has multiple contracts |
isVIP | boolean | Yes | Whether this is a VIP-only drop |
whitelistEnabled | boolean | Yes | Whether whitelist is enabled |
chain | string | Yes | Blockchain chain name |
chainId | number | Yes | Blockchain chain ID |
network | string | Yes | Network name (mainnet, testnet, etc.) |
description | string | Yes | Detailed description of the drop |
moreInfoUrl | string | Yes | URL for additional information |
logo | string | Yes | URL to the drop logo image |
numberOfRarities | number | Yes | Number of rarity tiers |
hasDailyCheckIn | boolean | Yes | Whether daily check-in is required |
magicEdenGoldTokenName | string | No | Magic Eden gold token name if applicable |
cards | RarityDto[] | Yes | Array of rarity tier definitions |
marketplaces | MarketPlaceDto[] | No | Supported marketplace information |
phases | MintPhaseDto[] | No | Minting phase definitions |
slug | string | Yes | URL-friendly identifier |
Related Schemas
- RarityDto - Rarity tier definitions
- MarketPlaceDto - Marketplace information
- MintPhaseDto - Minting phase definitions
API Endpoints
This schema is used by the following endpoints:
GET /v2/drop/:slug- Get drop by slugPOST /v2/drop- Create new dropGET /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>orx-game-server-key: <server_key> - Permissions: User must have drop creation permissions
- JWT Bearer Token:
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>orx-game-server-key: <server_key> - Permissions: User must have drop viewing permissions
- JWT Bearer Token: