Overview
Creates an unsigned mint transaction for claiming available tokens. The API validates eligibility, creates the user’s associated token account if needed, and returns a transaction ready for user signing.Request Parameters
The Solana token mint address to claim from
Base58 encoded public key of the user’s wallet
Amount of tokens to claim (as string to handle large numbers)
Response
Indicates if the operation was successful
Base58 encoded unsigned transaction that needs to be signed by the user
Unique identifier for this transaction (needed for confirmation)
The amount of tokens that will be claimed
Array of recipients who will receive tokens from this claim, each containing:
wallet(string): The recipient’s wallet addressamount(string): The amount allocated to this recipientlabel(string, optional): Description of the recipient (e.g., “Developer”)
The amount allocated to protocol fees (10% of total claim)
Number of decimal places for the token
Instructions for the next step in the process
Success Response
Error Responses
400 - Missing Parameters
400 - Missing Parameters
400 - Amount Exceeds Available
400 - Amount Exceeds Available
400 - No Tokens Available
400 - No Tokens Available
400 - No Mint Authority
400 - No Mint Authority
404 - Token Not Found
404 - Token Not Found
500 - Configuration Error
500 - Configuration Error
500 - Transaction Creation Failed
500 - Transaction Creation Failed
Process Flow
This endpoint performs several validations and setup steps:Validate Environment
Checks that required environment variables (RPC_URL, PROTOCOL_PRIVATE_KEY) are configured
Transaction Key
ThetransactionKey is essential for the confirmation step:
- Format:
{tokenAddress}_{userWallet}_{timestamp} - Expiration: Automatically cleaned up after 10 minutes
- Required: Must be provided to
/claims/confirm
Associated Token Account
The API automatically handles associated token account (ATA) creation:- If exists: Uses the existing ATA
- If missing: Creates a new ATA (protocol pays rent)
- Address: Deterministic based on wallet + token mint
Decimal Handling
Token amounts are handled with proper decimal precision:- Input: Raw token amount (e.g., 1000000 for 1M tokens)
- Processing: Multiplied by 10^decimals for blockchain
- Most tokens: Use 9 decimal places
- Returned:
mintDecimalsfield shows the actual decimal count
Rate Limiting
This endpoint is subject to rate limiting:- 8 requests per IP per 2-minute window
- Returns HTTP 429 when limit exceeded
Security Validations
Next Steps
After receiving the unsigned transaction:- Deserialize the transaction using
@solana/web3.js - Sign the transaction with your wallet
- Submit the signed transaction to
/claims/confirm
Transaction Storage
Transaction data is stored temporarily:- Storage Duration: 10 minutes maximum
- Cleanup: Automatic cleanup of expired transactions
- Expiration: You must call
/claims/confirmwithin the time window
