A Telegram bot built with Next.js, created by Send Arcade and inspired by Solana Agent Kit by Send AI. This is the private bot version that's specifically designed for one-on-one interactions with users, providing a secure and personalized experience for managing Solana blockchain operations.
- 🤖 Private chat support for secure interactions
- 💼 Individual wallet management per user
- 📊 PostgreSQL database for chat history
- 🔥 Firebase integration for wallet storage
- ⚡ Concurrent user state management
- 🎯 Context-aware responses
- 🔐 Secure private key handling
- 🔒 End-to-end encrypted communications
- Node.js (v16 or higher)
- PostgreSQL database
- Firebase project
- Telegram Bot Token
- Solana RPC URL
- OpenAI API Key
-
Clone the repository
git clone <your-repo-url> cd <your-repo-name>
-
Install dependencies
pnpm install
-
Configure environment variables Create a
.envfile with the following variables:OPENAI_API_KEY=your_openai_api_key RPC_URL=your_solana_rpc_url SOLANA_PRIVATE_KEY=your_solana_private_key TELEGRAM_BOT_TOKEN=your_telegram_bot_token -
Start the development server
pnpm run dev
-
Set up webhook
- Run ngrok to expose your local server:
ngrok http 3000
- Set the webhook using the ngrok URL:
curl https://api.telegram.org/bot<telegram_bot_token>/setWebhook?url=https://<your-ngrok-url>/api/bot
- Verify the webhook setup:
{"ok":true,"result":true,"description":"Webhook was set"}
- Run ngrok to expose your local server:
The bot is specifically designed for private chats with the following features:
- Direct one-on-one interactions with users
- Secure handling of sensitive information
- Individual wallet management
- Personalized responses based on user context
- Private transaction handling
- Secure key management
The bot can be deployed on Vercel:
- Push your code to GitHub
- Import the project on Vercel
- Configure environment variables
- Deploy
To create a new bot and get a token:
- Message @BotFather on Telegram
- Use the
/newbotcommand - Follow the instructions to create your bot
- Save the provided token
Contributions are welcome! Please feel free to submit a Pull Request.
- Send AI for the Solana Agent Kit inspiration
- Send Arcade for creating this project
- Next.js for the framework
- Telegram Bot API for the bot functionality