API Reference
Types

Types

Campaign

type Campaign = {
  title: string;
  conditions?: Condition[];
  operator?: Operator;
  active: boolean;
  withdrawTxHash?: string;
  remoteCampaignId: string;
  token_addr: string;
  expiry: string;
  slug: string;
  custom_slug?: string;
  number_of_recipients?: number | null;
  amount_per_recipient: number;
  user_addr: string;
  user: User;
  network_chain_id: string;
  txHash?: string;
  txStatus?: TxStatus;
  description?: string;
  isGnosisSafeTx: boolean;
  gnosisSafeAddress?: string;
  isFromCampaignV2: boolean;
  imageUrl?: string;
  soulbound?: boolean;
  isOpenEdition?: boolean;
  brandColor?: string;
  version: number;
  mintToLensTBA: boolean;
  allowedPartners?: Array<AllowedPartner>;
  startsAt: string | null;
  spam: boolean;
  handPicked: boolean;
};
 
type AllowedPartners = "orb";

User

type User = {
  name?: string | null;
  user_name?: string | null;
  email: string | null;
  twitter_handle?: string | null;
  insta_handle?: string | null;
  discord_user_id?: string | null;
  telegram_user_handle?: string | null;
  telegram_user_id?: string | null;
  github_profile?: string | null;
  mirror_profile?: string | null;
  snapshot_space?: string | null;
  reddit_page?: string | null;
  wallet_address: string;
  ens_name?: string | null;
  website_url?: string | null;
  profile_pic_url?: string | null;
  cover_pic_url?: string | null;
  is_verified: boolean;
  followers: number;
  following: number;
  bio?: string | null;
};

Operator

enum Operator {
  AND = "AND",
  OR = "OR",
}

CampaignStatus

enum CampaignStatus {
  EXPIRED = "EXPIRED",
  LIVE = "LIVE",
  NOT_STARTED = "NOT_STARTED",
}

AirdropConditionType

enum AirdropConditionType {
  NFT = "NFT",
  TOKENS = "TOKENS",
  NATIVE_TOKEN = "NATIVE_TOKEN",
  ALLOWLIST = "ALLOWLIST",
  TWITTER_ALLOWLIST = "TWITTER_ALLOWLIST",
  POAP = "POAP",
  _101 = "101",
  TWITTER_FOLLOW = "TWITTER_FOLLOW",
  OTTERSPACE = "OTTERSPACE",
  LENS_FOLLOW = "LENS_FOLLOW",
  LENS_COLLECT_POST = "LENS_COLLECT_POST",
  LENS_ORB_POST = "LENS_ORB_POST",
  ORB_JOIN_COMMUNITY = "ORB_JOIN_COMMUNITY",
  MIRROR_SUBSCRIBE = "MIRROR_SUBSCRIBE",
  MIRROR_MINT = "MIRROR_MINT",
  SUBMIT_EMAIL = "SUBMIT_EMAIL",
  JOIN_DISCORD = "JOIN_DISCORD",
  TWITTER_RETWEET = "TWITTER_RETWEET",
  TELEGRAM_JOIN = "TELEGRAM_JOIN",
  ORB_FOLLOW = "ORB_FOLLOW",
  ORB_COLLECT_POST = "ORB_COLLECT_POST",
  LENS_MIRROR_POST = "LENS_MIRROR_POST",
  ORB_MIRROR_POST = "ORB_MIRROR_POST",
}

Condition

type Condition =
  | {
      type: AirdropConditionType.NFT;
      metadata: {
        address: string;
        chainId: number;
        name?: string;
        symbol?: string;
        decimals?: number;
        imageUrl?: string;
        nftLink?: string;
      };
    }
  | {
      type: AirdropConditionType.TOKENS;
      metadata: {
        address: string;
        minAmount: string;
        chainId: number;
        name?: string;
        symbol?: string;
        decimals?: number;
      };
    }
  | {
      type: AirdropConditionType.NATIVE_TOKEN;
      metadata: {
        minAmount: string;
        chainId: number;
      };
    }
  | {
      type: AirdropConditionType.ALLOWLIST;
      metadata: {
        addresses: string[];
      };
    }
  | {
      type: AirdropConditionType.TWITTER_ALLOWLIST;
      metadata: {
        twitterUsernames: string[];
      };
    }
  | {
      type: AirdropConditionType.POAP;
      metadata: {
        eventId: number;
        image: string;
        name: string;
      };
    }
  | {
      type: AirdropConditionType.TWITTER_FOLLOW;
      metadata: {
        targetTwitterUsername: string;
      };
    }
  | {
      type: AirdropConditionType.LENS_FOLLOW;
      metadata: {
        targetHandle: string;
        targetProfileId: string;
      };
    }
  | {
      type: AirdropConditionType.LENS_COLLECT_POST;
      metadata: {
        postId: string;
        postName: string;
        postUrl: string;
      };
    }
  | {
      type: AirdropConditionType.OTTERSPACE;
      metadata: {
        badgeUrl: string;
        specId: string;
        name: string;
        isStaging: boolean;
      };
    }
  | {
      type: AirdropConditionType.LENS_ORB_POST;
      metadata?: {};
    }
  | {
      type: AirdropConditionType.ORB_JOIN_COMMUNITY;
      metadata: {
        communityUrl: string;
        communityId: string;
        name: string;
        description?: string;
        image?: string;
        membershipQualification?: string;
        shouldHavePost: boolean;
      };
    }
  | {
      type: AirdropConditionType.SUBMIT_EMAIL;
      metadata?: {};
    }
  | {
      type: AirdropConditionType.MIRROR_SUBSCRIBE;
      metadata: {
        projectAddress: string;
      };
    }
  | {
      type: AirdropConditionType.MIRROR_MINT;
      metadata: {
        contentDigest: string;
        link: string;
      };
    }
  | {
      type: AirdropConditionType.JOIN_DISCORD;
      metadata: {
        serverId: string;
        joinUrl: string;
        serverName: string;
        serverIcon?: string;
      };
    }
  | {
      type: AirdropConditionType.TELEGRAM_JOIN;
      metadata: {
        channelHandle: string;
        joinUrl: string;
        channelName: string;
        channelIcon?: string;
      };
    }
  | {
      type: AirdropConditionType.TWITTER_RETWEET;
      metadata: {
        tweetUrl: string;
      };
    }
  | {
      type: AirdropConditionType.ORB_FOLLOW;
      metadata: {
        targetHandle: string;
        targetProfileId: string;
      };
    }
  | {
      type: AirdropConditionType.ORB_COLLECT_POST;
      metadata: {
        postId: string;
        postName: string;
        postUrl: string;
      };
    }
  | {
      type: AirdropConditionType.LENS_MIRROR_POST;
      metadata: {
        postId: string;
        postName: string;
        postUrl: string;
      };
    }
  | {
      type: AirdropConditionType.ORB_MIRROR_POST;
      metadata: {
        postId: string;
        postName: string;
        postUrl: string;
      };
    };

AirdropConditionWithEligibility

type AirdropConditionWithEligibility = Condition & {
  eligible: boolean;
};