airdrop-api 0.1.0

Mint and Airdrop Framework on Solana for Sovereign Individuals
Documentation
use solana_program::pubkey::Pubkey;
use steel::*;

/// Campaign account stores metadata for an airdrop campaign
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Campaign {
    /// Campaign owner (can allocate and manage campaign)
    pub owner: Pubkey,

    /// SPL Token mint for this campaign (created by CreateMint, can be shared)
    pub mint: Pubkey,

    /// Campaign treasury (token account holding airdrop tokens for distribution)
    pub treasury: Pubkey,

    /// Merkle root for this campaign (single merkle tree per campaign)
    /// Zero = not initialized (on-chain allocation mode)
    pub merkle_root: [u8; 32],

    /// Total allocated tokens (for tracking)
    pub total_allocated: u64,

    /// Total claimed tokens (for tracking)
    pub total_claimed: u64,

    /// Maximum supply cap for this campaign (0 = unlimited)
    /// Note: Tokens are already minted in mint treasury, this is for tracking/documentation
    pub max_supply: u64,

    /// Creation timestamp
    pub created_at: i64,

    /// Campaign status: 0=Active, 1=Paused, 2=Closed
    pub status: u8,

    /// Padding for alignment
    pub _padding: [u8; 7],
}

use crate::consts::AirdropAccount;
account!(AirdropAccount, Campaign);