Magen x404
Magen x404
Magen x404
Advanced Solana wallet authentication with 7 modular verification features beyond simple token-gating. Production-ready package with full TypeScript support.
Key Features
The 7 Authentication Features
Choose the exact authentication mechanism that fits your needs. Modular, flexible, and production-ready.
Example:
"Access denied if you hold competitor tokens"
- Verify user does NOT hold banned/blacklisted tokens
- Set maximum holdings for specific tokens
- Optional geolocation restrictions
- Perfect for exclusive communities
Example:
"Must hold token for 30+ days to access premium features"
- Verify users have held tokens for minimum duration
- Prevents users from buying tokens just to access content
- Ensures commitment and long-term engagement
- Great for loyalty programs
Example:
"Must hold Token A AND Token B to access exclusive content"
- Verify users hold multiple tokens simultaneously
- Support for 'ALL' or 'ANY' modes
- Perfect for ecosystems with multiple tokens
- Enables complex portfolio-based access control
Example:
"Must have 10+ transactions and $1000+ volume in last 30 days"
- Verify minimum transaction count
- Verify minimum trading volume
- Filter by transaction types
- Time-period based verification
Example:
"Gold tier (100k+ tokens) gets exclusive access"
- Automatic tier assignment (Bronze/Silver/Gold)
- Different access levels based on token holdings
- Single authentication returns user's tier
- Perfect for membership programs
Example:
"Access only if you have no outstanding loans"
- Verify users have zero (or minimal) debt
- Check multiple protocols simultaneously
- Prevents access for risky financial positions
- Useful for exclusive financial services
Example:
"Wallet must be 90+ days old with first transaction 30+ days ago"
- Verify minimum wallet age (days since creation)
- Verify minimum time since first transaction
- Prevents new bot accounts from accessing
- Rewards long-term community members
Use Cases & Applications
From exclusive communities to financial services, x404 powers authentication across the Solana ecosystem.
- Filter out holders of competitor tokens
- Ensure members don't hold scam tokens
- Create truly exclusive access
- Reward long-term holders (TimeLock)
- Tier-based benefits (Tier)
- Reward active traders (Activity)
- Ensure no outstanding debts (NoDebt)
- Verify portfolio diversity (MultiToken)
- Filter by trading activity (Activity)
- Filter new wallets (Age)
- Require transaction history (Activity)
- Time-based verification (TimeLock)
- Tiered access levels (Tier)
- Long-term holder rewards (TimeLock)
- Portfolio requirements (MultiToken)
- Easy NPM package integration
- Works with React, Vue, vanilla JS
- Tree-shakeable modular exports
How Authentication Works
Simple, secure, and nonce-based authentication flow with signature verification.
Client requests nonce from server
User signs challenge with wallet
Server verifies signature and performs feature checks
Server returns JWT token on success
Client stores token in localStorage (30-day expiry)
import { X404Blacklist } from "magenx404/blacklist";
const result = await X404Blacklist({
wallet: "phantom",
excluded_mints: ["scam_token_address"],
// ... config
});
if (result.success) {
console.log("Authenticated!", result.token);
}