Easily transfer small amount of MOBI between team members of your Telegram group.
-
Setup Stellar accounts.
TipBot needs two accounts:
- Source pool containing tips to be spent.
- TipBot account holding tips awaiting for withdrawal.
TipBot account must be added as cosigner to source pool. It must be able to make payments from source address.
You can setup test network accounts using
mobius-cli
tool from mobius-client-ruby or Stellar Laboratory. -
Setup Telegram bot.
- Obtain token using BotFather.
- Setup Redis and get credentials.
- Deploy it somewhere (take a look on sample K8s deployment, and Dockerfile)
Environment variables are:
MOBIUS_TIPBOT_REDIS_URL
- Redis URLMOBIUS_TIPBOT_TOKEN
- Telegram token.MOBIUS_TIPBOT_CREDIT_ADDRESS
- Stellar address of source pool.MOBIUS_TIPBOT_APP_PRIVATE_KEY
- Private key of TipBot account.MOBIUS_TIPBOT_RATE
- Tip amount.MOBIUS_TIPBOT_NETWORK
- "public" or "test", Stellar network to use.MOBIUS_TIPBOT_ASSET_CODE
- custom Stellar asset for tips. Should be in Alphanumeric 4-character maximum format. Default is MOBI.MOBIUS_TIPBOT_ASSET_ISSUER
- custom Stellar asset issuer address
Note
MOBIUS_TIPBOT_ASSET_CODE
andMOBIUS_TIPBOT_ASSET_ISSUER
should be provided together. Otherwise defaults will be used silently.
Add TipBot to your Telegram group. It must be supergroup and bot must have privacy mode disabled.
TipBot supports following commands:
/tip <amount>
- reply to any message in your chat. This will display keyboard and current tip stats./balance
- this will show your tip balance (works in DM only)./withdraw <address> <amount>
- this will send of your collected tips to following Stellar address. If is omitted, all of your tips will be withdrawn. Works in DM only./create <funding_address> <amount>
- create and fund your own Tipping Account to send tips from (no more 1 tip per hour limit!).<funding_address>
- is your current Stellar account that will be used fund your Tipping Account.<amount>
- the amount that Tipping Account will be funded with */unregister <withdraw_address>
- unregister your Tipping Account and withdraw your funds. You will revert to tipping from the default pool and be limited to 1 tip per hour<withdraw_address>
- Stellar address where your funds will be withdrawn to and Tipping Account will be merged into/my_address
- returns your deposit address, that was created after/create
command invocation, so you will be able to fund it any way convenient to you
TipBot allows you to use custom Stellar asset instead of MOBI for tips. To achieve this set env variables MOBIUS_TIPBOT_ASSET_CODE
and MOBIUS_TIPBOT_ASSET_ISSUER
, and don't forget to create trustlines for your asset in source pool account and TipBot account
- Rename
.env.example
to.env
and fill it out with your settings - Set env variable
MOBIUS_TIPBOT_ENVIRONMENT
to "development" - Launch
bin/telegram
to start polling for updates
export MOBIUS_TIPBOT_ENVIRONMENT=development
bin/telegram
# or
MOBIUS_TIPBOT_ENVIRONMENT=development bin/telegram
Just press this button for deploying app into Heroku
Then fill in the config variables and click "Deploy for Free" button.
- Using accounts provided by users to send tips.
- Slack support.
- Dynamical change of tip rate using special command.