$ use-cases
Real-world applications of HTTP-native wallet authentication across DeFi, NFT, gaming, and enterprise sectors.
DeFi Trading Platforms
DeFiSecure API access for trading bots and algorithmic strategies
[+]Benefits
- →Stateless authentication for high-frequency trading
- →No session management overhead
- →Cryptographic proof of wallet ownership
- →Token-gate access to premium trading features
[CODE]Implementation
// Protect trading endpoints
const openkit = createOpenKit403({
issuer: 'dex-api',
audience: 'https://api.dex.com',
tokenGate: async (addr) => {
// Require 1000+ tokens for API access
return await checkTokenBalance(addr, MIN_TOKENS);
}
});
app.use('/api/trade', openkit.middleware());NFT Marketplace APIs
NFTWallet-based authentication for listing, bidding, and collection management
[+]Benefits
- →Verify NFT ownership before API access
- →Secure collection management endpoints
- →Token-gate premium features for holders
- →Audit trail of all API operations
[CODE]Implementation
// Verify creator status before listing
const openkit = createOpenKit403({
issuer: 'nft-marketplace',
tokenGate: async (addr) => {
// Check if wallet holds creator NFT
return await hasCreatorBadge(addr);
}
});
app.post('/api/nft/create',
openkit.middleware(),
createNFTHandler
);Web3 Gaming Backend
GamingPlayer authentication and in-game asset management
[+]Benefits
- →Link wallet to game account
- →Verify ownership of game NFTs
- →Secure leaderboard submissions
- →Anti-cheat for wallet-based rewards
[CODE]Implementation
// Protect game state endpoints
app.use('/api/game', openkit.middleware());
app.post('/api/game/claim-reward', (req, res) => {
const wallet = req.openkitx403User.address;
// Award reward to verified wallet
rewardPlayer(wallet, DAILY_BONUS);
});DAO Governance & Voting
EnterpriseSecure proposal submission and voting mechanisms
[+]Benefits
- →Verify token holdings for voting power
- →Prevent sybil attacks
- →Cryptographic proof of votes
- →Transparent audit trail
[CODE]Implementation
// Weight votes by token holdings
const openkit = createOpenKit403({
issuer: 'dao-governance',
tokenGate: async (addr) => {
const balance = await getTokenBalance(addr);
return balance >= MIN_VOTING_TOKENS;
}
});
app.post('/api/vote',
openkit.middleware(),
castVoteHandler
);AI Agent Wallets
AI/AgentsAutonomous agents executing on-chain actions
[+]Benefits
- →LangChain integration for AI workflows
- →Agents can authenticate with APIs
- →Execute trades, mint NFTs autonomously
- →Cryptographic agent identity
[CODE]Implementation
import { SolanaWalletAuthTool } from 'openkitx403';
const tools = [new SolanaWalletAuthTool()];
const agent = await createAgent(tools);
// Agent can now authenticate and trade
await agent.execute(
"Check my NFT portfolio and sell any under 5 SOL"
);Social Media Platforms
SocialWallet-based social profiles and content gating
[+]Benefits
- →Decentralized identity
- →Token-gated communities
- →NFT profile verification
- →Cross-platform portable identity
[CODE]Implementation
// Token-gate premium content
const openkit = createOpenKit403({
tokenGate: async (addr) => {
// Premium members only
return await hasPremiumNFT(addr);
}
});
app.get('/api/premium/content',
openkit.middleware(),
premiumContentHandler
);Lending & Borrowing
DeFiSecure access to lending pools and credit scoring
[+]Benefits
- →Verify collateral ownership
- →Credit scoring based on wallet history
- →API rate limiting per wallet
- →Prevent multi-account abuse
[CODE]Implementation
// Check collateral before loan
const openkit = createOpenKit403({
issuer: 'lending-protocol',
tokenGate: async (addr) => {
const collateral = await getCollateral(addr);
return collateral >= MIN_COLLATERAL;
}
});
app.post('/api/borrow',
openkit.middleware(),
borrowHandler
);Analytics & Data APIs
EnterpriseTiered API access based on token holdings
[+]Benefits
- →Rate limiting by wallet tier
- →Token-gated premium data
- →Prevent API key sharing
- →Usage tracking per wallet
[CODE]Implementation
// Tiered API access
const openkit = createOpenKit403({
tokenGate: async (addr) => {
const tier = await getUserTier(addr);
req.userTier = tier; // Pro, Plus, Free
return tier !== 'banned';
}
});
// Different rate limits per tier
app.use(rateLimitByTier);Token Launchpad
DeFiWhitelist management and allocation verification
[+]Benefits
- →Verify whitelist status on-chain
- →Prevent bot participation
- →Fair launch mechanics
- →Token allocation tracking
[CODE]Implementation
// Whitelist-only participation
const openkit = createOpenKit403({
tokenGate: async (addr) => {
return await isWhitelisted(addr);
}
});
app.post('/api/participate',
openkit.middleware(),
launchpadHandler
);Staking Platforms
DeFiSecure staking operations and reward claims
[+]Benefits
- →Verify staking positions
- →Secure reward calculations
- →Prevent claim exploits
- →Multi-pool management
[CODE]Implementation
// Protect staking operations
app.post('/api/stake',
openkit.middleware(),
async (req, res) => {
const wallet = req.openkitx403User.address;
await processStake(wallet, req.body.amount);
}
);Metaverse Land APIs
GamingVirtual land ownership and asset management
[+]Benefits
- →Verify land ownership
- →Secure asset transfers
- →Permission-based building
- →Rental agreements enforcement
[CODE]Implementation
// Land owner permissions
const openkit = createOpenKit403({
tokenGate: async (addr) => {
return await ownsLandParcel(addr);
}
});
app.post('/api/land/build',
openkit.middleware(),
buildHandler
);Subscription Services
EnterpriseNFT or token-based subscriptions
[+]Benefits
- →No credit card required
- →Transferable subscriptions
- →On-chain payment verification
- →Automatic renewal via token holdings
[CODE]Implementation
// Subscription via NFT ownership
const openkit = createOpenKit403({
tokenGate: async (addr) => {
const nft = await getSubscriptionNFT(addr);
return nft && !nft.expired;
}
});
app.use('/api/premium', openkit.middleware());[BUILD] Start Building Your Use Case
Ready to implement OpenKitx403 in your project? Check out our complete examples and integration guides.