Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhivgadearav/cloud-wallet-bot
A lightweight Telegram bot for managing Solana wallets on the go. Securely create, monitor, and transfer SOL tokens directly from your Telegram messenger.
https://github.com/bhivgadearav/cloud-wallet-bot
python solana telegram-bot
Last synced: about 8 hours ago
JSON representation
A lightweight Telegram bot for managing Solana wallets on the go. Securely create, monitor, and transfer SOL tokens directly from your Telegram messenger.
- Host: GitHub
- URL: https://github.com/bhivgadearav/cloud-wallet-bot
- Owner: bhivgadearav
- Created: 2024-12-17T06:43:24.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T14:19:54.000Z (about 2 months ago)
- Last Synced: 2025-02-13T05:45:23.009Z (about 8 hours ago)
- Topics: python, solana, telegram-bot
- Language: Python
- Homepage: https://t.me/sol_pal_bot
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solana Wallet Telegram Bot ๐ค๐ธ
## Overview
A powerful Telegram bot for seamless Solana wallet management. Empowering users to interact with their cryptocurrency wallets directly through Telegram, with features including:
- ๐ User Registration
- ๐ Network Switching
- ๐ฐ Balance Checking
- ๐ธ SOL Token Transfers## Table of Contents
- [Installation](#installation)
- [Configuration](#configuration)
- [Commands](#commands)
- [Handlers](#handlers)
- [Running the Bot](#running-the-bot)
- [License](#license)## Installation ๐ ๏ธ
1. **Clone the repository:**
```sh
git clone
cd bot-code
```2. **Create a virtual environment:**
```sh
python -m venv .venv
```3. **Activate the virtual environment:**
- On Windows:
```sh
.venv\Scripts\activate
```
- On macOS/Linux:
```sh
source .venv/bin/activate
```4. **Install dependencies:**
```sh
pip install -r requirements.txt
```## Configuration ๐ง
Create a `.env` file in the `bot-code` directory with the following variables:
```env
TELEGRAM_TOKEN=your_telegram_bot_token
API_BASE_URL=your_backend_api_base_url
API_TOKEN=your_api_token
```## Commands ๏ฟฝไปค
### `/start`
- **Description:** Start the bot and display a welcome message with available commands
- **Handler:** `start_command`### `/signup`
- **Description:** Register a new Solana wallet
- **Handler:** `signup_command`
- **Conversation States:**
- `SIGNUP_PASSWORD`: Collect the user's password
- `WALLET_NAME`: Collect the wallet name### `/switchnetwork`
- **Description:** Switch to mainnet, devnet, or connect to Solana blockchain using a custom RPC URL
- **Handler:** `switchnetwork_command`
- **Conversation States:**
- `SIGNUP_PASSWORD`: Collect the user's password
- `NETWORK_SELECTION`: Collect the network selection
- `CUSTOM_RPC_URL`: Collect the custom RPC URL### `/balance`
- **Description:** Check the native SOL balance of a wallet
- **Handler:** `balance_command`
- **Conversation States:**
- `SIGNUP_PASSWORD`: Collect the user's password
- `BALANCE`: Collect the wallet name and display the balance### `/transfer`
- **Description:** Transfer SOL to another wallet
- **Handler:** `transfer_command`
- **Conversation States:**
- `TRANSFER_RECEIVER`: Collect the receiver's wallet address
- `TRANSFER_AMOUNT`: Collect the amount of SOL to transfer
- `SIGNUP_PASSWORD`: Collect the user's password
- `TRANSFER_WALLET`: Collect the wallet name and complete the transfer## Handlers ๐ฎ
### `start_command`
- **Description:** Handles the `/start` command and sets the bot commands### `signup_command`
- **Description:** Initiates the signup process and collects the user's password and wallet name### `switchnetwork_command`
- **Description:** Initiates the network switching process and collects the user's password and network selection### `balance_command`
- **Description:** Initiates the balance check process and collects the user's password and wallet name### `transfer_command`
- **Description:** Initiates the SOL transfer process and collects the receiver's wallet address, amount, password, and wallet name## Running the Bot ๐
1. **Activate the virtual environment:**
- On Windows:
```sh
.venv\Scripts\activate
```
- On macOS/Linux:
```sh
source .venv/bin/activate
```2. **Start the bot:**
```sh
python bot.py
```## License ๐
This project is licensed under the MIT License.
## Technologies ๐ฅ๏ธ
![Python](https://img.shields.io/badge/Python-blue?logo=python)
![Telegram](https://img.shields.io/badge/Telegram-blue?logo=telegram)
![Solana](https://img.shields.io/badge/Solana-purple?logo=solana)## Contributing ๐ค
Contributions are welcome! Please feel free to submit a Pull Request.