X --> https://t.me/c/2543738939/12146 Website --> https://authbnb.org
Manage AI agent payments on-chain. Deploy in 5 minutes, test with mock data, or go live on BSC.
A modern Web3 platform for authorizing and tracking AI agent payments with configurable spending limits, real-time activity feeds, and full smart contract integration on Binance Smart Chain.
- Quick Start
- What is EVMAuth?
- Two Deployment Modes
- Features
- Tech Stack
- Installation
- Usage Guide
- Smart Contract Integration
- Configuration
- Development
- Deployment
- Troubleshooting
- Contributing
- License
Get EVMAuth running locally in under 2 minutes:
# Clone and install
git clone https://github.com/AuthProtocol/EVMAuth.git
cd EVMAuth
npm install
# Set up environment
cp .env.example .env
# Edit .env and add your WalletConnect Project ID
# Run development server
npm run devOpen http://localhost:3000, connect your wallet, and start creating AI agents.
No blockchain setup required - the default /dashboard route uses mock data for instant testing.
EVMAuth is a decentralized platform that enables secure, on-chain authorization for AI agent payments. Think of it as a permission system for autonomous agents to spend funds on behalf of their owners with built-in safety limits.
Key Capabilities:
- Create multiple AI agents with individual spending limits
- Authorize payments from agents to any recipient
- Track all transactions in real-time
- Enforce daily spending caps automatically
- Full audit trail via smart contract events
Perfect for:
- Trading bots that need controlled fund access
- Content creation agents that purchase API credits
- Analytics agents that pay for data sources
- DeFi automation agents managing protocol interactions
EVMAuth supports both simulated and production blockchain environments:
- Simulated blockchain - No real transactions or gas fees
- Auto-generated payments - New transactions every 10 seconds for demos
- Instant confirmations - Perfect for development and testing
- No wallet funding required - Just connect to explore
- BSC integration - Full smart contract deployment on Binance Smart Chain
- Real BNB transactions - Production-ready payment authorization
- Gas fees apply - Actual on-chain settlement
- Complete setup guide - See BLOCKCHAIN_SETUP.md
Start with mock mode to explore the interface, then deploy contracts for production use.
AI Agent Management
- Create agents with configurable types (Trading, Analytics, Content, DeFi)
- Set maximum daily spending limits per agent
- Activate/deactivate agents instantly
- Decentralized Identity (DID) support in
did:ethrformat
Payment Authorization
- One-click payment authorization from any active agent
- Real-time payment status tracking (pending → settled/failed)
- Auto-settling payments after 5-second confirmation
- Optional payment memos for transaction notes
Real-time Dashboard
- Live statistics: total agents, payment volume, transaction count
- Activity feed with auto-updating payment stream
- Wallet-gated access with RainbowKit integration
- Mobile-responsive design with dark theme
Smart Contract Backend
- On-chain agent registry with ownership verification
- Automated 24-hour spending limit resets
- Complete event emission for audit trails
- Secure payment execution with recipient validation
Developer Experience
- TypeScript throughout for type safety
- Mock data system for rapid development
- Toast notifications for all user actions
- Loading states and empty states with helpful guidance
Frontend
- Next.js 14 (App Router)
- TypeScript 5.6
- Tailwind CSS 3.4
- Lucide React (icons)
- Sonner (toast notifications)
Web3
- wagmi v2 (React hooks for Ethereum)
- viem (TypeScript Ethereum library)
- RainbowKit (wallet connection)
Blockchain
- Binance Smart Chain (Mainnet & Testnet)
- Solidity 0.8.24
- Hardhat (development environment)
- Node.js 18+ - Download here
- WalletConnect Project ID - Get one free
- npm or yarn - Package manager
1. Clone the repository
git clone https://github.com/AuthProtocol/EVMAuth.git
cd EVMAuth2. Install dependencies
npm install3. Configure environment variables
Create .env file:
cp .env.example .envEdit .env and add your WalletConnect Project ID:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id_here4. Run the development server
npm run dev5. Open your browser
Navigate to http://localhost:3000 to see the landing page.
EVMAuth/
├── app/
│ ├── layout.tsx # Root layout with Web3 providers
│ ├── providers.tsx # Wagmi + RainbowKit configuration
│ ├── page.tsx # Landing page
│ ├── dashboard/ # Mock mode dashboard
│ │ └── page.tsx
│ ├── dashboard-real/ # Real blockchain dashboard
│ │ └── page.tsx
│ └── globals.css # Global styles & theme
├── components/
│ ├── navbar.tsx # Navigation + wallet connect
│ ├── stats-card.tsx # Statistics display
│ ├── agent-card.tsx # Agent information card
│ ├── payment-row.tsx # Payment activity row
│ ├── create-agent-form.tsx # Agent creation form
│ └── authorize-payment-form.tsx
├── contracts/
│ └── EVMAuth.sol # Smart contract source
├── lib/
│ ├── wagmi-config.ts # Web3 configuration
│ ├── contract-config.ts # Contract ABI & address
│ ├── mock-data.ts # Mock data generators
│ └── utils.ts # Utility functions
└── public/ # Static assets
- Review platform features and statistics
- Click "Launch Dashboard" to access mock mode
- Or connect wallet via navbar to proceed
- Access GitHub repository link in footer
- Connect wallet - Click "Connect Wallet" in navbar
- Navigate to dashboard - Go to
/dashboard(mock) or/dashboard-real(blockchain) - Fill in agent details:
- Name: e.g., "Alpha Trading Bot"
- Type: Choose from Trading, Analytics, Content, DeFi
- Max Daily Spend: e.g., "0.1" BNB
- Click "Create Agent"
- Agent appears with "pending" status
- After 3 seconds, status auto-updates to "active"
- Select an active agent from dropdown
- Enter recipient address (0x... format)
- Specify amount in BNB (e.g., "0.01")
- (Optional) Add memo for transaction notes
- Click "Authorize Payment"
- Payment appears in activity feed with "pending" status
- After 5 seconds, payment auto-settles to "settled" or "failed"
Stats Cards (Top Row)
- Total Agents created
- Total Volume in BNB
- Total Payments processed
Your Agents (Left Column)
- Lists all created agents
- Shows status badges (pending/active/inactive)
- Click copy icon to copy agent DID
- Color-coded by agent type
Activity Feed (Right Column)
- Real-time payment stream
- Auto-updates with new transactions
- Shows amount, recipient, status, timestamp
- Includes payment memos if provided
| Type | Icon | Use Case | Badge Color |
|---|---|---|---|
| Trading Bot | 🤖 | Automated trading agents | Blue |
| Analytics | 📊 | Data analysis & research | Purple |
| Content Creator | ✍️ | Content generation agents | Pink |
| DeFi Automation | 💎 | DeFi protocol interactions | Green |
The EVMAuth smart contract provides the on-chain infrastructure for agent management and payment authorization.
Core Functions:
createAgent()- Register new AI agent with spending limitsactivateAgent()/deactivateAgent()- Control agent statusauthorizePayment()- Execute payment from agent to recipientupdateMaxDailySpend()- Modify agent spending limitsgetRemainingDailyBudget()- Check available daily budget
Security Features:
- Owner-only operations via
onlyAgentOwnermodifier - Automatic 24-hour spending limit resets
- Daily spend tracking per agent
- Recipient address validation
- Agent status verification before payments
Events Emitted:
AgentCreated- New agent registrationAgentStatusUpdated- Status changesPaymentAuthorized- Payment initiationPaymentSettled- Successful paymentPaymentFailed- Failed payment with reason
For complete smart contract deployment instructions including:
- Hardhat configuration
- BSC Testnet setup
- Contract deployment scripts
- Frontend integration
See the detailed guide: BLOCKCHAIN_SETUP.md
After deployment, update lib/contract-config.ts:
export const CONTRACT_ADDRESS = "0xYourDeployedContractAddress" as `0x${string}`;The contract ABI is already configured in the same file.
Edit lib/wagmi-config.ts to support additional chains:
import { bsc, bscTestnet, polygon, mainnet } from "wagmi/chains";
export const config = getDefaultConfig({
chains: [bsc, bscTestnet, polygon, mainnet], // Add networks here
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!,
appName: "EVMAuth",
// ...
});Modify colors and gradients in app/globals.css:
/* Purple gradient */
.gradient-purple {
background: linear-gradient(135deg, #9333ea 0%, #3b82f6 100%);
}
/* Glassmorphism card */
.glass-card {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}In app/dashboard/page.tsx, modify mock data timing:
// Change payment generation interval (default: 10s)
useEffect(() => {
const interval = setInterval(() => {
const newPayment = generateMockPayment();
setPayments((prev) => [newPayment, ...prev]);
}, 10000); // Change this value in milliseconds
return () => clearInterval(interval);
}, []);npm run dev # Start development server
npm run build # Build for production
npm run start # Run production build
npm run lint # Run ESLintnpx tsc --noEmit # Check TypeScript errors without building- Update type definition in
lib/mock-data.ts:
export type AgentType = "trading" | "analytics" | "content" | "defi" | "new-type";- Add to AGENT_TYPES mapping:
export const AGENT_TYPES = {
// ... existing types
"new-type": { label: "New Type", icon: "🆕", color: "orange" },
};-
Update form options in
create-agent-form.tsx -
Update smart contract enum if using real blockchain mode
Linting:
npm run lintAuto-fix issues:
npm run lint -- --fixTest production build before deployment:
npm run build
npm run startVisit http://localhost:3000 to test.
EVMAuth supports any Next.js-compatible hosting:
- Netlify - Add build command:
npm run build - Cloudflare Pages - Framework preset: Next.js
- AWS Amplify - Node.js 18+ runtime
- Railway - Auto-detects Next.js
All platforms require the NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID environment variable.
- Lighthouse Score: 95+ (Desktop)
- Bundle Size: ~250KB (gzipped)
- First Load: <2s on 3G
- Time to Interactive: <3s
Problem: Wallet won't connect or shows errors
Solutions:
- Verify
NEXT_PUBLIC_WALLETCONNECT_PROJECT_IDis set in.env - Check browser console for specific errors
- Clear browser cache and reload
- Update wallet extension to latest version
- Try a different wallet (MetaMask, Rainbow, Coinbase)
Check configuration:
# Verify env variable is loaded
echo $NEXT_PUBLIC_WALLETCONNECT_PROJECT_IDProblem: UI appears unstyled or broken
Solutions:
# Reinstall dependencies
rm -rf node_modules
npm install
# Clear Next.js cache
rm -rf .next
npm run dev
# Verify Tailwind configuration
cat tailwind.config.tsProblem: npm run build fails
Solutions:
# Check Node.js version (must be 18+)
node --version
# Update all dependencies
npm update
# Clean install
rm -rf node_modules package-lock.json
npm installProblem: Payments fail or don't appear on-chain
Solutions:
- Ensure wallet has sufficient BNB for gas + payment amount
- Check network (BSC Mainnet vs Testnet)
- Verify contract address in
lib/contract-config.ts - Check daily spending limit hasn't been exceeded
- View transaction on BscScan for error details
Problem: Activity feed doesn't show new payments
Solutions:
- Check browser console for JavaScript errors
- Verify you're on
/dashboardnot/dashboard-real - Refresh the page
- Check
useEffectintervals in component code
Problem: Error: listen EADDRINUSE: address already in use :::3000
Solution:
# Find process using port 3000
netstat -ano | findstr :3000
# Kill the process (replace PID with actual process ID)
taskkill /PID <PID> /F
# Or run on different port
PORT=3001 npm run devContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Make your changes
- Follow existing code style
- Add comments for complex logic
- Update README if adding features
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Describe your changes
- Link any related issues
- Add screenshots for UI changes
- Use TypeScript for all new files
- Follow existing component patterns
- Maintain mobile responsiveness
- Test on multiple wallets before submitting
- Run
npm run lintbefore committing
This is a demonstration application. For production deployment:
Required Implementations:
- Server-side input validation
- Rate limiting on all endpoints
- CSRF protection
- Proper error handling without exposing internals
- Transaction verification before state updates
- Audit of smart contracts by professionals
Best Practices:
- Never commit
.envfiles - Use environment variables for all secrets
- Implement access control lists
- Enable contract pause functionality
- Set up monitoring and alerts
- Regular dependency updates
Disclaimer: The authors are not responsible for any losses incurred from using this software. Always test thoroughly on testnets before mainnet deployment.
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Brave (Chromium-based)
Mobile browsers supported via responsive design.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with these amazing open-source projects:
- Next.js - React framework
- wagmi - React hooks for Ethereum
- RainbowKit - Wallet connection
- viem - TypeScript Ethereum library
- Tailwind CSS - Utility-first CSS
- Lucide - Icon library
- Sonner - Toast notifications
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Full Docs
Built for the Web3 community. Open source. No fees. No middlemen.