//#region extensions/crypto/src/services/airdrop-service.d.ts /** * Airdrop Service — check eligibility and generate claim calldata. * * Layered approach: * 1. Known airdrop contracts with hardcoded merkle root endpoints * 2. On-chain eligibility checks via direct contract calls * 3. PinchTab (browser tool) fallback for UI-based claims * * No single API covers all airdrops. This service maintains a registry * of known active/recent airdrops and their claim mechanisms. * * No external dependencies — uses viem for contract reads and * guardedFetch for any HTTP endpoints. */ interface AirdropInfo { id: string; name: string; token: string; tokenSymbol: string; chain: string; chainId: number; status: 'active' | 'ended' | 'upcoming'; claimContract: string; /** URL to check eligibility (REST API or dApp) */ eligibilityUrl?: string; /** If true, claim requires browser automation (no direct contract call) */ requiresBrowser?: boolean; deadline?: string; description: string; } interface EligibilityResult { airdropId: string; airdropName: string; eligible: boolean; amount?: string; amountFormatted?: string; proof?: string[]; claimIndex?: number; claimed?: boolean; error?: string; } interface ClaimCalldata { to: string; data: string; value: string; description: string; } declare class AirdropService { /** * List known airdrops, optionally filtered by status or chain. */ listAirdrops(opts?: { status?: 'active' | 'ended' | 'upcoming' | 'all'; chain?: string; }): AirdropInfo[]; /** * Check eligibility for a specific airdrop. * Returns eligibility info including amount and claim status. */ checkEligibility(airdropId: string, address: string, publicClient?: any): Promise; /** * Check eligibility for ALL active airdrops. */ checkAll(address: string, publicClient?: any): Promise; /** * Generate claim calldata for a Merkle distributor airdrop. * Requires the merkle proof and claim index (from eligibility check). */ generateClaimCalldata(airdropId: string, claimIndex: number, address: string, amount: string, proof: string[]): ClaimCalldata | null; /** * Get a specific airdrop by ID. */ getAirdrop(id: string): AirdropInfo | undefined; private checkViaApi; private checkOnchain; } declare function getAirdropService(): AirdropService; declare function resetAirdropService(): void; //#endregion export { AirdropInfo, AirdropService, ClaimCalldata, EligibilityResult, getAirdropService, resetAirdropService }; //# sourceMappingURL=airdrop-service.d.mts.map