Giter Club home page Giter Club logo

woofbotapp's Introduction

Twitter

WoofBot

WoofBot is a chat bot that runs on your personal Bitcoin node and sends alerts based on pre-configured conditions.

โš ๏ธ WoofBot is currently in beta and is not considered secure.

It is currently supports only the Telegram chat platform. I recommend using Umbrel to run this app.

Development

The development environment is based on docker containers that communicate with each other. For simplicity, I run each docker in a new terminal (easier to see logs).

To simulate an LND node, I recommend installing https://lightningpolar.com, and creating a basic network with an LND node named "alice". See .env.dev-polar which configures LND_TLS_PATH to $HOME/.polar/networks/1/volumes/lnd/alice/tls.cert (You can configure it to something else if you already have a network with some other names).

Then run yarn dev:build and follow the instructions: it will print the yarn commands that need to run, each in a separated terminal.

woofbotapp's People

Contributors

seccour avatar woofbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

woofbotapp's Issues

Users whitelist

Kick them out if they are not in the list.

Once a user entered, he'll be removed from the list. i.e. if he changed his name, nobody else could enter with his username.

Feature Request: Differentiate watchlists for groups/users

I use woofbot personally to watch my own addresses. But I also want to use it in a group so we can watch certain entities BTC movements.

Any interaction I have with the bot in a group is the same as if I interact in a direct message. If I restart the bot in the group, messages go to that group instead of me. Ideally the group should be a new user in the dashboard/console. I'd love to have group watchlists, etc separated from individuals with the bot.

Refactor telegram commands that don't use the user parameter

WatchReboot, UwatchReboot, WatchNewBlocks, UnwatchNewBlocks, Links - still find the user with the telegram id (ctx.from?.id) but it was already discovered and is given as a second param after ctx.

The Quit function also follows this, but maybe we should keep it this way (using the telegram-id) because it is special indeed.

Add timeout to CoinGecko fetch

If CoinGecko is not responding when the first price-watch is set, it could theoretically take a lot of time to respond to the user.

Feature: Dead man's switch

Do some operation if the user is not responding to any message (sent periodically) for a certain time.
Any message from the user could restart the intervals.

The operation could be sending a Telegram message to a specific user (assuming the user initiated a chat first - I don't think a Telegram bot can initiate chats with random users).
The operation could also be broadcasting a given transaction.

Time could be measured by the current block-height - in case we don't trust the computer's clock.

Command Parameters

On the main page, alongside the command list it would be nice to see if the command has any mandatory or optional parameters. It will be easier than just having to do the command first on Telegram to get the answer for that.

User permission groups

Allow to associate every user to one or more groups.

Allow admin to limit each command to:

  • Everyone
  • None
  • Specific groups

(Unsubscribe commands should always be open for everyone).

This will be useful in the future to prevent users from getting notifications about sensitive information (i.e. lightning node earning fees).

Special warning when a transaction being watched is spending from an unconfirmed UTXO

Spending from a UTXO of a transaction that is still in the mempool, could lead to sophisticated double-spend attempts (instead of spending the current UTXO twice, the attacker can try to spend the previous transaction's UTXO).

The current mechanism doesn't cover this - it only watches for transactions that conflict with the watched transaction-id, not with its parent transaction. It can get incredibly complicated to watch all the chain of transactions, but a warning about this kind of transaction would be good enough.

Short block id - remove prefix zeros

All the "00000000000" could be replaced with "0...0"
Even if we're on test environment and there are no zeros in the prefix, it's ok to begin block ids with "0...0".

This should also simplify the mempool-links command

Feature: Watch for new transactions

Having a command to automatically see if the node has receive any on-chain or lightning transaction (maybe with an option to see the routing fees that have been earned)

Bot sometimes runs twice?

After setting the token there were two responses for each message/command.

Maybe a new Telegraf instance was created but the old one kept running.

Would be best in each handler to check that the notifying bot is the active one, and to carefully clear event listeners from the old Telegraf instances.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.