mini app
Telegram Mini App for SwiftBridge - Web interface with wallet connection for crypto operations on Base network.
- π Wallet Connection - Connect via Reown AppKit (WalletConnect)
- π Dashboard - View balances and portfolio
- π Token Swaps - Exchange tokens via Uniswap V3
- π€ P2P Transfers - Send to Telegram usernames
- π¨ Modern UI - Beautiful, responsive design
- π± Telegram Integration - Works as Telegram Mini App
- Node.js v18+
- Reown Project ID (get from https://cloud.reown.com/)
- Deployed SwiftBridge contracts on Base Sepolia
# Install dependencies
npm install
# Copy environment file
cp .env.local.example .env.local
# Edit .env.local with your values
nano .env.local- Go to https://cloud.reown.com/
- Sign up / Log in
- Create a new project
- Copy the Project ID
- Add to
.env.local
NEXT_PUBLIC_REOWN_PROJECT_ID=your_reown_project_id
NEXT_PUBLIC_USER_REGISTRY=0xFaaE04873914c0102B3c1aA5BCE05C51d0BD3667
NEXT_PUBLIC_ESCROW_MANAGER=0xBd5287110A78d32A5435E97449BBA408E4F52568
NEXT_PUBLIC_P2P_TRANSFER=0x2B1160DCAAbFBC21508629425901c809Db923774
NEXT_PUBLIC_SWAP_ROUTER=0xb71A9C877B0C5CFee262E6039be2439964E0DCdf
NEXT_PUBLIC_CHAIN_ID=84532
NEXT_PUBLIC_RPC_URL=https://sepolia.base.org
NEXT_PUBLIC_BOT_USERNAME=swiftbridgebot# Development
npm run dev
# Production build
npm run build
npm startswiftbridge-miniapp/
βββ src/
β βββ app/
β β βββ layout.tsx # Root layout with providers
β β βββ page.tsx # Main page
β β βββ globals.css # Global styles
β βββ components/
β β βββ Providers.tsx # Wagmi & React Query providers
β β βββ WalletConnect.tsx # Wallet connection button
β β βββ Dashboard.tsx # Balance dashboard
β β βββ SwapInterface.tsx # Token swap UI
β β βββ SendInterface.tsx # P2P transfer UI
β βββ config/
β βββ wagmi.ts # Wagmi configuration
β βββ contracts.ts # Contract addresses & ABIs
βββ package.json
- Open @BotFather in Telegram
- Send
/mybots - Select your bot
- Click "Bot Settings" β "Menu Button"
- Set URL to your deployed mini app URL
Add these commands to link to mini app:
/app - Open SwiftBridge App
In bot code:
bot.command('app', async (ctx) => {
await ctx.reply('Open SwiftBridge App', {
reply_markup: {
inline_keyboard: [[
{ text: 'π Launch App', web_app: { url: 'https://your-app-url.com' } }
]]
}
})
})# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Set environment variables in Vercel dashboard- Netlify: Connect GitHub repo, set env vars
- Railway: Deploy from GitHub, add env vars
- Cloudflare Pages: Connect repo, configure build
- Total balance in USD and Naira
- Individual token balances
- Username registration status
- Quick action buttons
- Token selection
- Amount input
- Live rate preview
- Slippage settings
- Fee display
- Username input
- Token & amount selection
- Optional message
- Instant or pending transfer
- Transaction confirmation
Via Reown AppKit, supports:
- MetaMask
- WalletConnect compatible wallets
- Coinbase Wallet
- Trust Wallet
- Rainbow
- And 300+ other wallets
Built with Tailwind CSS:
- Responsive design
- Dark mode support
- Modern gradients
- Smooth animations
# Test in browser
npm run dev
# Test as Telegram Mini App
# 1. Deploy to public URL
# 2. Add to bot via BotFather
# 3. Open bot in Telegram
# 4. Click app button- Check Reown Project ID is correct
- Verify network is Base Sepolia (84532)
- Try different wallet
- Ensure wallet has Base Sepolia ETH for gas
- Check contract addresses are correct
- Verify token approvals
- Ensure URL is HTTPS
- Check Telegram WebApp SDK loaded
- Verify URL in BotFather settings
- β All transactions signed by user's wallet
- β No private keys stored
- β Contract interactions via ethers.js
- β Reown AppKit for secure wallet connection
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Open Pull Request
MIT License
- GitHub Issues
- Telegram: @SwiftBridgeSupport
Built with β€οΈ using Next.js, Reown AppKit, and Wagmi