Salvium Tip Bot

A PHP-based Telegram tip bot for the Salvium (Monero fork) cryptocurrency.

Features

  • Telegram tipping via subaddresses
  • Wallet interaction via JSON-RPC
  • Secure MySQL backend using PDO
  • Deposit, withdraw, balance, and tipping commands
  • Per-user balances for SAL1 and token assets such as salCULT
  • Cron-compatible monitoring of deposits and withdrawals

Installation

  1. Clone the repo
  2. Copy config.sample.php to config.php and fill in your credentials
  3. Update config.php with your RPC, DB, and Telegram Bot credentials
  4. Set WITHDRAWALS_ENABLED to true only when wallet RPC withdrawals should be active
  5. Run the SQL migrations in migrations/
  6. Run salvium_tipbot.php as a Telegram webhook listener
  7. Schedule salvium_tipbot_monitor.php using cron for periodic checks

Requirements

  • PHP 8.1+
  • MySQL 5.7+/MariaDB
  • Telegram Bot Token
  • Salvium RPC Wallet node

Commands

  • /withdraw <address> <amount> withdraws SAL1
  • /withdraw <asset> <address> <amount> withdraws SAL1 or a token asset, for example CULT/salCULT
  • /unsweep <asset> <outputs> [amount] admin-only command that self-transfers unlocked wallet funds into multiple smaller outputs

Withdrawal fees

  • WITHDRAWAL_FEE is charged in SAL1 for SAL1 withdrawals.
  • TOKEN_WITHDRAWALS_CHARGE_SAL1_FEE=false lets token withdrawals use wallet-paid SAL1 network fees.
  • Set TOKEN_WITHDRAWALS_CHARGE_SAL1_FEE=true to require and reserve WITHDRAWAL_FEE SAL1 from the user when withdrawing token assets.
  • MAX_UNSWEEP_OUTPUTS defaults to 4 because larger single-run SAL1 fan-outs fail in wallet RPC.
  • MAX_TOKEN_UNSWEEP_OUTPUTS limits token unsweep fan-out per run because token self-transfers also need SAL1 fee transactions.

License

MIT

S
Description
Telegram tip bot for Salvium
Readme 186 KiB
Languages
PHP 100%